xwp / engineering-best-practices Goto Github PK
View Code? Open in Web Editor NEWXWP Engineering Best Practices
Home Page: https://xwp-co.atlassian.net/wiki/spaces/KB
XWP Engineering Best Practices
Home Page: https://xwp-co.atlassian.net/wiki/spaces/KB
https://github.com/xwp/wp-foo-bar
And also the init script: https://gist.github.com/westonruter/70d226aae2c322e66467
composer.json
impact the results of composer update
.composer update
when you don't want to update all dependencies.Commit messages deliver a lot of information to a developer. There should be a paragraph dedicated to commit messages in workflows section.
Changes can then be pushed up to GitHub.
Would this result in Travis running again?
In order to modify this run-on sentence, my suggestion is that we change:
Take a look at our Config-Driven WP project for some (dated) examples for a common approach we take for normalizing the theme's configuration into a config.php
array which then be cleanly merged with a child theme's configuration array.
to:
Take a look at our Config-Driven WP project for some (dated) examples of a common approach we take at normalizing the theme's configuration into a config.php
array. The config array can then be cleanly merged with a child theme's configuration array.
The first 3 links in the Table of Contents on the Home page are leading to 404 pages. This is because the links have a (/) prior to the # tag.
The file update-toc.php needs to be updated to add a conditional (or something like that) that will remove the (/) in cases where the link simply points to an anchor on the page.
The current React guide should be updated to cover the latest best practices, i.e. using simple functional components along with both built-in and custom hooks.
Hooks and functional components are becoming an important part of React apps development, slowly but surely superseding the "traditional" class components and higher-order components.
Our docs should reflect this shift, promoting the most up-to-date approach to React development.
Explain use of pull requests, our preview server setup, unit testing, Travis integration, code review, etc
JS should use wp.ajax.send()
when possible.
https://xwp.github.io/engineering-best-practices/javascript/
Needs to be added to PHP design patterns: https://xwp.github.io/engineering-best-practices/php/#design-patterns
From @edmundcwm:
wp_localize_script()
type-casts all values to string (as seen here) so on the JS side weโd need to parse them back to the intended type.
// foo.php
wp_localize_script( 'foo-js', 'fooObj', array( 'age' => 31 ) );
// foo.js
const age = fooObj.age;
console.log(typeof age); // "string" instead of "number"
But the newer wp_add_inline_script()
works differently.
// bar.php
wp_add_inline_script( 'bar-js', 'const barObj = {age: 31}' );
// bar.js
const age = barObj.age;
console.log(typeof age); // "number"
Guess this is another good reason to use wp_add_inline_script()
.
Connecting to an mysql database running in Chassis (or other Vagrant machine), requires some additional steps and connection process. This issue tracks that documentation.
Extending and modifying the WordPress block editor is becoming one of the common tasks nowadays.
We should consider creating a guide on how to best work with the Gutenberg codebase, taking advantage of the multitude of @wordpress
JS packages, and dealing with the @wordpress/data
layer.
When trying to visit docs.xwp.co
I received an error that the domain was inaccessible. It has been this way for a few days now.
Just wanted to flag this as the site is a good resource that I like to share with folks. ๐
There are goodies not in the WordPress
standard for PHPCS which we would be good to adopt as standard.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.