-
Notifications
You must be signed in to change notification settings - Fork 381
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
Rebrand Classic as Reader mode and Paired as Transitional mode; add Exit Reader Mode link #2034
Conversation
</label> | ||
</dt> | ||
<dd> | ||
<?php esc_html_e( 'Display AMP responses in classic (legacy) post templates in a basic design that does not match your theme\'s templates.', 'amp' ); ?> | ||
<?php esc_html_e( 'Display AMP responses in a simplified reader mode design that does not match your theme\'s templates.', 'amp' ); ?> |
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.
We might need to discuss how to best phrase this here. Do we want to highlight that it's not respecting the theme's design? Should we maybe phrase this as "separate from your theme" to sound less negative?
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.
Display AMP responses in a simplified reader mode design separate from your theme
could work
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.
Another alternative: Generates AMP content using simplified templates, which are light but may not match the look-and-feel of your site
'post_modified_timestamp' => $post_modified_timestamp, | ||
'post_author' => $post_author, | ||
'post_canonical_link_url' => get_permalink( $this->ID ), | ||
'post_canonical_link_text' => __( 'Exit Reader Mode', 'amp' ), |
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.
Alternatively, we could say "View Canonical". What do you think?
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 don't think the average user knows what "Canonical" means in this context. Not to speak of translators. "Original" or "Full Version" would work better though
Exit Reader Mode
sounds reasonable though.
For comparison, Safari uses "Hide Reader View".
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 see the point of "View Canonical", but it is true that is will be confusing for most users. OTOH, having "Exit Reader Mode" implies that the user is aware that she is in Reader Mode. Probably we can express the duality by a exit route with a message along these lines: "You are viewing the Reader Mode version of <this post>
", where <this post>
links to the canonical version.
readme.txt
Outdated
1. A WP-CLI command is provided to check the URLs on a site for AMP validity. Results are available in the admin for inspection. | ||
2. Many themes can be served as AMP without any changes; the default experience is as if JavaScript is turned off in the browser since scripts are removed. | ||
3. Reader mode templates are still available, but they are are limited. Not only do they differ from the active theme, any validation errors are silently sanitized. | ||
4. Switch from Reader mode to Paired or Native mode in AMP settings screen. You may need to disable the admin bar in AMP if your theme has a larger amount of CSS. |
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.
Screenshots 3 and 4 need to be refreshed. @westonruter @ThierryA Do you have the originals there?
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.
@felixarntz what to do you mean by originals?
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.
Original screenshots? Yes. For screenshot 3 I just went to https://2017-theme.amp-wp.org/roads-of-the-city/ and enabled classic mode.
And I took the screenshot of the AMP settings screen from that environment too.
I will continue work on this on Monday, and also cover the rebranding of Paired mode, per our earlier conversation. |
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.
We should add a configuration option on the Reader mode selection panel, where the user opts in to having the "Exit Reader" mode link added to their templates. This would be important in cases where the addition of the link would interfere with customizations made to classic templates.
The latest commits take care of rebranding Paired Mode and making the Reader mode exit link opt-in via a Customizer control. |
Another piece of this PR: rebranding of Native mode to Strict AMP Mode. |
I can't see the |
I think we should have a separate discussion around this and keep this PR focused on Reader and Paired modes. To me, Strict Mode is different from Native Mode:
I think Strict Mode should either be a fourth mode, or a checkbox that is available when Native Mode is active.
The exit link is now opt-in as you suggested. You can control it in the Customizer together with the other header bar customizations. |
|
||
$native_description = __( 'Reuses active theme\'s templates to display AMP responses but does not use separate URLs for AMP. This means your site is <b>AMP-first</b> and your canonical URLs are AMP.', 'amp' ); | ||
$transitional_description = __( 'Reuses active theme\'s templates to display AMP responses, but uses separate URLs for AMP. Each canonical URL may have a corresponding AMP URL, if the content is fully AMP valid.', 'amp' ); | ||
$reader_description = __( 'Generates AMP content using simplified templates, which are light but may not match the look-and-feel of your site.', 'amp' ); |
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 think this description should perhaps note something about classic, like “These include the classic templates.”
This also should note that only posts/pages can be served as AMP in this mode. It is not suitable for other kinds of queries.
$theme_support = AMP_Options_Manager::get_option( 'theme_support' ); | ||
|
||
$native_description = __( 'Reuses active theme\'s templates to display AMP responses but does not use separate URLs for AMP. This means your site is <b>AMP-first</b> and your canonical URLs are AMP.', 'amp' ); | ||
$transitional_description = __( 'Reuses active theme\'s templates to display AMP responses, but uses separate URLs for AMP. Each canonical URL may have a corresponding AMP URL, if the content is fully AMP valid.', 'amp' ); |
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 think the transitional mode and (especially) reader mode should both include a note that says mobile visitors to origin will not be automatically redirected to the AMP version. The AMP version is presented to mobile users encountering your content via Google Search, Twitter, etc.
readme.txt
Outdated
1. Activate the plugin through the 'Plugins' menu in WordPress. | ||
1. If you currently use older versions of the plugin in `Classic mode`, it is strongly encouraged to migrate to `Paired` or `Native mode`. | ||
2. Activate the plugin through the 'Plugins' menu in WordPress. | ||
3. If you currently use older versions of the plugin in `Reader` mode, it is strongly encouraged to migrate to `Transitional` or `Native` mode. |
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.
The note about the behavior of reader/transitional modes should also be added here, that they are for mobile visitors from Google Search, Twitter, etc. No redirection is done. This is not a mobile theme.
/cc @amedina
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.
Agree. Same line from the Admin Settings page would work.
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.
@amedina Here is is what the setting looks like:
With the exit link displayed:
@felixarntz There seems to be a styling issue with the link with the site icon.
…r-mode * 'develop' of github.com:ampproject/amp-wp: (50 commits) Fix printing of PHP upgrade notice Fix PHP notice for undefined theme support arg for service_worker Remove admin pointer tests that fail in 1.1 Discontinue showing theme support admin pointer in 1.1 Add tests for AMP integration with PWA plugin Ensure is_amp_endpoint() returns false for service worker requests Account for element attributes when determining if a parent is empty and can be removed Fix tests after always including Gutenberg Add check for argument type in add_google_fonts_caching; advise to update to PWA 0.2 Align default-enabled service worker features with ABE SW Remove todo resolved by GoogleChromeLabs/pwa-wp#147 Make AMP service worker opt-out instead of opt-in Opt-in to amp-img-auto-sizes experiment when there are converted images Remove obsolete add_auto_width_to_figure from #1086 Add test for sizes attribute being removed from converted img Improve aligncenter, alignwide, and alignfull in classic templates Rename method to adjust_twentynineteen_images Eliminate sizes from amp-img converted from img Ensure featured image gets responsive layout in Twenty Nineteen, as it is essentially alignwide Give responsive layout to alignwide/alignfull instead of intrinsic layout ...
Updates to description after iterating with @amedina: Outstanding is the styling of the exit link. |
…r-mode * 'develop' of github.com:ampproject/amp-wp: Add missing amp-install-serviceworker script in classic mode
I like the design of the "Exit Reader Mode" style. |
Fixes #1943. Fixes #2022.
I decided on going with an additional link to the canonical version because using the current comments link for that would be misleading. It points to the comments section of the post, where what we want is just a link to exit Reader mode and view the canonical version. Furthermore, if we just replaced that "Leave a Comment" link with an "Exit Reader Mode" link, it would be an unexpected location for such a link, as you typically add comments below a post.