Skip to content

2.1 Release Candidate 1

Pre-release
Pre-release
Compare
Choose a tag to compare
@westonruter westonruter released this 29 Apr 06:01
· 5474 commits to develop since this release
c2248ca

This is the first release candidate for v2.1, after the first beta and second beta. For the full list of changes coming in this release, see the previous prerelease changelogs, as well as the exhaustive list in the 2.1 milestone. We were originally going to release 2.1 on the WordPress plugin directory by the end of April, but due to a couple bugs discovered during QA for the release candidate, 2.1 will be released the first week of May.

On top of the changes in the first and second betas, this prerelease includes 10 closed issues and 20 merged pull requests (excluding Dependabot updates). Please report any issues you encounter while testing!

The key changes since the second beta include:

  • Visual refresh of validation screens. The way to represent “unreviewed” validation errors has changed. Instead of being styled like unmoderated comments with an orange background, they now appear with bolded text and a white background. In contrast, reviewed errors get a gray background and unbolded text. In this way, they are styled similarly to unread/read messages in an email client. When the invalid markup causing a validation error is kept, then the error gets a red left border. This new design language is carried throughout all the validation screens as well as the new AMP Validation sidebar in the block editor. #5995, #6067
  • Editor theme support styling from primary theme now applies to Reader templates. If you added blocks that used any colors from the primary theme's palette (defined in the editor-color-palette theme support), these predefined colors would be entirely absent when you viewed an AMP page in Reader mode—both for AMP Legacy templates and Reader themes. Styles were likewise missing for gradient presets (editor-gradient-presets) and font sizes (editor-font-sizes). This has now been fixed. All styles for these theme support features are now dynamically generated in PHP for inclusion on AMP pages. On the AMP Legacy templates, where the primary theme context is present, the theme support features are pulled straight from get_theme_support(). When a Reader theme is active, however, the primary active theme's support features are not registered in memory; in this case, the active theme's support features are stored in an option so that they can then be available when the plugin switches to another theme for serving AMP pages in Reader mode. #5229, #6042
  • Support for PDF embeds in File block. In Gutenberg 10.5, the File block now supports embedding PDFs (see WordPress/gutenberg#30857). When such a File block appears on an AMP page, its object[type=application/pdf] element will be automatically converted into an amp-google-document-embed element. #6083, #6112
  • Optimization of amp-bind. A new transformer has been added to the Optimizer which improves performance of amp-bind by making it faster to locate the elements that have bound attributes when server-side rendering is enabled (as it is by default). #6117, ampproject/amp-toolbox-php#84, ampproject/amp-toolbox-php#162
  • Improved support for late-defined AMP slugs. If you happen to change the AMP slug (query var) from the default amp to something else like lite, you can do so either via the amp_query_var filter or via the (deprecated) AMP_QUERY_VAR constant. In early versions of the AMP plugin, this customization was commonly done in the theme. However, this happens much too late for the AMP plugin to be able to switch to a Reader theme or now to properly route paired AMP requests. Instead of limiting the user to the AMP Legacy theme and the ?amp=1 paired URL structure, when the query var is defined late it is now cached in an option so that it can be made available early in WordPress's execution (at plugins_loaded). Since such late-defined slugs are still not ideal, a new Site Health check will recommend that you move it from the theme to a plugin. #6125

The amp-toolbox-php package was updated to include changes from the 0.5.0 milestone.

Also merged since the second beta is the a new QA Tester Plugin which can be installed to greatly facilitate switching between prereleases and builds for unmerged pull requests.

Installation

You can also install the amp.zip build linked below by uploading it in the WordPress admin.

For up-to-the-minute builds, see the Development Builds Wiki page.