-
Notifications
You must be signed in to change notification settings - Fork 383
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
Hide Stories options and add deprecation notice #4219
Conversation
It looks like this also fixes #4202, right?
|
Nope. The notice here is only applied to the AMP settings screen and is shown irregardless of Stories being enabled or not. Should this PR also fix #4202, @westonruter? |
Ah, if this PR doesn't fix #4202, I don't think this PR needs to fix it. |
The entire experiences selection should be omitted entirely now: So this code should not be run if Stories is not available: amp-wp/includes/options/class-amp-options-menu.php Lines 82 to 91 in 19d54bd
|
I mean, if no |
Yes. |
|
Rather, the code should not yet be removed, but the experiences can be omitted. Issue #4203 would need to be fixed in a subsequent PR which removes all stories code. |
Please also link the Story export text to https://amp-wp.org/documentation/amp-stories/exporting-stories/ |
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 important change needed in this PR: if I have amp_story
posts in my database and I have the stories experience enabled, if I then turn off stories the experience options should not all of a sudden disappear. I need to be able to re-enable the Stories experience to be able to export the stories if need be.
printf( | ||
'%s %s %s', | ||
esc_html__( 'The Stories experience is being extracted from the AMP plugin into a separate standalone plugin which will be available soon. Please backup or', 'amp' ), | ||
sprintf( | ||
'<a href="%s">%s</a>', | ||
esc_url( 'https://amp-wp.org/documentation/amp-stories/exporting-stories/' ), | ||
esc_html__( 'export your existing Stories', 'amp' ) | ||
), | ||
esc_html__( 'as they will not be available in the next version of the AMP plugin.', 'amp' ) | ||
); | ||
echo '</p></div>'; |
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.
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.
Good point, made the change in 8c14de5.
Co-Authored-By: Weston Ruter <westonruter@google.com>
Co-Authored-By: Weston Ruter <westonruter@google.com>
Co-Authored-By: Weston Ruter <westonruter@google.com>
da4735b
to
5c10eed
Compare
|
The following can be observed when the Stories experience is disabled while editing a Story and refreshing the page: Along with the following stack-trace:
I don't think this needs to be looked into since it would be such a rare edge case, but just want it to be known. |
@westonruter how should the failing E2E tests be handled? All are related to the experiences section not being shown. |
…nter Also use 'back up' instead of 'backup' for verb.
One minor thing that I found is that if I trash all the stories and then empty the trash, then I get |
* Hide Stories options if no `amp_story` posts are found * Add Stories deprecation notice * Reword notice Co-Authored-By: Weston Ruter <westonruter@google.com> * Refactor how stories experience is considered enabled * Hide experiences section options if Stories not enabled * Always show the Stories deprecation notice if the user has `amp_story` posts Fixes #4202. * Show a different notice if the user has no Story posts * Show warning notice only on AMP settings screen & Stories list page * Show warning notice in Story editor * Reword deprecation notice Co-Authored-By: Weston Ruter <westonruter@google.com> * Use `wp_json_encode` to sanitize notice in editor * Add link to docs on how to export Stories * Rename 'Website Mode' to 'Template Mode' * Make action label translatable Co-Authored-By: Weston Ruter <westonruter@google.com> * Refactor Stories deprecation notice on AMP settings page * Get Story post count irregardless of the post type being registered * Handle story options only if the experience is enabled * Fix failing test * Remove failing E2E tests * Fix failing test * Add admin pointer for exporting stories; remove old Stories admin pointer Also use 'back up' instead of 'backup' for verb. * Use title case for 'Template Mode' Co-authored-by: Weston Ruter <westonruter@google.com>
* tag '1.4.3': (22 commits) Update readme and screenshots for Stories removal (#4259) Open story export instructions in a new window (#4258) Bump version to 1.4.3-RC1 Hide Stories options and add deprecation notice (#4219) Fix malformed conversion of relative action URLs for forms (#4250) Limit Stories experience to WP 5.3 & Gutenberg 7.1.0 (#4217) Prevent errors in admin bar filters from non-array arguments (#4207) Update @wordpress/e2e-test-utils dependency Revert update of mustache/mustache dependency Update composer.lock Update WP CLI to 2.4.0 For WordPress.tv embed, Use an oembed filter instead of block filter (#4164) Update readme to add FAQs section (#4159) Apply workaround to fix test__multiple_valid_image_files (#4034) Ignore Story editor tests (#4043) Update amp-video embed regex pattern to include other Vimeo URL formats (#4051) Update amp-instagram embed regex (#4053) Update wp-dev-lib package (#4029) Fix conversion of forms with relative action URLs (#4003) Improve release instructions (#3995) ...
Summary
Stories experience enabled
The following table summarizes what happens when the Stories experience is enabled:
amp_story
postsamp_story
postsNB: In the case with existing
amp_story
posts, the deprecated notice is also shown on the Stories post list page:And also in the Story editor:
And an admin pointer on non-story screens, when the Stories experience is enabled:
Stories experience disabled
The following table summarizes what happens when the Stories experience is disabled:
amp_story
postsamp_story
postsFixes #4201.
Fixes #4202.
Checklist