Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Integrate admin bar with AMP dev mode #3187
See full writeup: Integrating with AMP Dev Mode in WordPress.
When themes have too much CSS for the admin bar to fit, the admin bar was removed from the page:
When there was not too much CSS, the admin bar was included in post-processing, converting all elements in the admin bar to AMP (including the Gravatar to
The admin bar element tree, the admin bar stylesheets (
The root HTML element, the admin bar element tree, the styles for the admin bar (
Now plugins can exempt JS administrative functionality in the admin bar from AMP validation. For example, with Automattic/jetpack#13450 the Notifications module in Jetpack now works on AMP pages:
The required scripts and styles all get the
Even when there is excessive CSS on the page, the admin bar will still be included:
Build for testing: amp.zip - v1.3-alpha-20190910T210727Z-e15bbe33
…dev mode) * Eliminate need for keeping forked version of admin-bar.css in plugin. * Automatically add data-ampdevmode attributes to scripts and styles that depend on the admin bar, excluding them from being sanitized out of the document. * Skip processing stylesheets that have data-ampdevmode attributes.
…ode-support * 'develop' of github.com:ampproject/amp-wp: (28 commits) Exclude development files from production build ZIPs Add filter to allow more video types in AMP story background se… (#3171) Update dependency @babel/cli to v7.6.0 (#3203) Update dependency @babel/core to v7.6.0 (#3204) Remove deprecated AMP_WP_Utils class Refresh Composer lock file Run build in a temporary folder Add shell script to clean up the current folder and then trigger a build Adapt Gruntfile to fetch optimized Composer dependencies within the build folder Retrieve Sabberworm patch directly from the GitHub PR Adding regression test for vertical text alignment issues Fixing minor errors in test descriptions Only restrict height inside non-fit text blocks Rewritten block size tests Limit height declaration to only direct descendant Remove now obsolete withEnforcedVideoUploadType HOC Update eslint-plugin-jest and apply fixes (#3192) Update dependency postcss to v7.0.18 (#3200) Update dependency terser-webpack-plugin to v2 (#3195) Update dependency webpack-cli to v3.3.8 (#3194) ...
Just found an issue. When the theme has a lot of CSS and the admin bar is showing up, the
We should probably mark the
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.
We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only
Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the