-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify masterbar module to include new unified admin color schemes file #17762
Conversation
Scheduled Jetpack release: December 1, 2020. E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-17762 Thank you for the great PR description! When this PR is ready for review, please apply the |
I've just noticed that @obenland has already started work on customising the masterbar module here so we could look to land that. However, as it stands my PR (ie: this one) contains less code and is more "bare bones" and thus might be easier to merge. |
This works well for me and the testing I think we are missing one last step and that is updating the module definition in |
Also fixes to align with new PHPCS lint rules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've rested everything again with a code confirmed to be run in the color schemes class. With remaining issues externalized, I think we should be good proceeding and have a base for other color scheme tasks.
FYI anyone who comes to this and wonders what happened to syncing this code via Fusion please see p1605115584001400-slack-ajax-reports
|
Thanks for merging @obenland. I really appreciate that. |
The file was edited to pass phpcs in #17762, so now every `yarn build` overwrites it with a changed version. Attempting to commit that changed version will wind up whining about all the phpcs failures in the generated version, and fixing them (mostly with phpcbf, some manually) will wind up as a no-op. This patch updates tools/build-module-headings-translations.php to fix some of the errors and emit `phpcs:disable` for two others that isn't worth trying to generate the way the WordPress coding standards want.
The file was edited to pass phpcs in #17762, so now every `yarn build` overwrites it with a changed version. Attempting to commit that changed version will wind up whining about all the phpcs failures in the generated version, and fixing them (mostly with phpcbf, some manually) will wind up as a no-op. This patch updates tools/build-module-headings-translations.php to fix some of the errors and emit `phpcs:disable` for two others that isn't worth trying to generate the way the WordPress coding standards want.
Alternative to #17750.
As discussed in p1604929101083300-slack-ajax this PR repurposes and extends the existing Masterbar module to become a more all purpose module for any customizations required to the WPAdmin Dashboard experience on WP.com.
Specifically, where there was previously only the
A8C_WPCOM_Masterbar
class, we now add an additionalA8C_WPCOM_Unified_Admin_Color_Schemes
class and init that from the main file as well.In the future, other classes could be added.
Please note that @obenland has already started work on customising the masterbar module here so we could look to land that. However, as it stands my PR (ie: this one) contains less code and is more "bare bones" and thus might be easier to merge.
Changes proposed in this Pull Request:
A8C_WPCOM_Unified_Admin_Color_Schemes
class to masterbar module and init from main file.namespace
to the module./masterbar
,/unified-admin-color-schemes
...etc).Jetpack product discussion
Does this pull request change what data or activity we track or use?
No
Testing instructions:
init
method ofmodules/masterbar/unified-admin-color-schemes.php
to include some debug output.Proposed changelog entry for your changes:
class
to masterbar module and init from main file.namespace
to the module./masterbar
,/unified-admin-color-schemes
...etc).