-
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
Remove Stories codebase #4315
Remove Stories codebase #4315
Conversation
Video files in |
I suppose the Stories project management guidelines can also be removed? |
@pierlon Unless you all are using those? No idea 🤷♂ |
Starting to look really good! No just need to address the todos. 28k deleted lines of code already, crazy! |
@westonruter would you consider keeping the Stories deprecation admin pointer? The notice on the AMP options page will still be present. |
Also, how much of an impact will removing the 'Experiences' option create? I know that its used in the |
'theme_support' => AMP_Theme_Support::READER_MODE_SLUG, | ||
'supported_post_types' => [ 'post' ], | ||
'analytics' => [], | ||
'all_templates_supported' => true, | ||
'supported_templates' => [ 'is_singular' ], | ||
'enable_response_caching' => true, | ||
'version' => AMP__VERSION, | ||
'story_templates_version' => false, |
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.
Removed Story relation settings; see ceab012.
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.
Shouldn't that be a database upgrade routine instead?
This right now causes database queries on every page load.
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.
Addressed in d67421e.
@@ -473,7 +297,7 @@ public function render_supported_templates() { | |||
$checked = ( | |||
post_type_supports( $post_type->name, AMP_Post_Type_Support::SLUG ) | |||
|| | |||
( ! AMP_Options_Manager::is_website_experience_enabled() && in_array( $post_type->name, $supported_post_types, true ) ) |
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.
With this change, the post
post type will be enabled by default in the supported post types.
Also the welcome notice may need to be reworded; it currently states:
With the Stories experience now being removed, that technically isn't true anymore. |
@@ -257,11 +257,6 @@ public function add_debug_information( $debugging_information ) { | |||
'value' => AMP_Theme_Support::get_support_mode(), | |||
'private' => false, | |||
], | |||
'amp_experiences_enabled' => [ |
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.
Site Health no longer shows the enabled experiences (since Website will be the only one).
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 catch
@@ -393,8 +391,6 @@ function amp_add_generator_metadata() { | |||
} | |||
$content .= sprintf( '; mode=%s', $mode ); | |||
|
|||
$content .= sprintf( '; experiences=%s', implode( ',', AMP_Options_Manager::get_option( 'experiences' ) ) ); |
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.
experiences
property is no longer shown in the meta generator
tag.
@@ -379,13 +379,12 @@ function amp_init() { | |||
add_action( 'parse_query', 'amp_correct_query_when_is_front_page' ); | |||
add_action( 'admin_bar_menu', 'amp_add_admin_bar_view_link', 100 ); | |||
add_action( 'wp_loaded', 'amp_editor_core_blocks' ); | |||
add_action( 'amp_plugin_update', 'remove_amp_story_templates' ); |
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.
Story related templates will be removed after a plugin update; see d67421e.
@@ -145,7 +118,7 @@ | |||
"lint:pkg-json": "wp-scripts lint-pkg-json --ignorePath .gitignore", | |||
"start": "wp-scripts start", | |||
"test": "npm-run-all --parallel test:*", | |||
"test:e2e": "cross-env WP_BASE_URL=http://localhost:8890 node ./bin/local-env/run-e2e-tests.js --config=tests/e2e/jest.config.js", | |||
"test:e2e": "cross-env WP_BASE_URL=http://localhost:8890 wp-scripts test-e2e --config=tests/e2e/jest.config.js", |
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 idea to use wp-scripts
@pierlon Ready for merge conflicts to be resolved for merge. @swissspidy Please approve the PR when you are satisfied. |
…tories-removal # Conflicts: # includes/class-amp-theme-support.php # package-lock.json # package.json
…tories-removal # Conflicts: # tests/php/test-class-site-health.php
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.
Let's do it
@swissspidy or @pierlon would you resolve the package conflicts? |
…tories-removal # Conflicts: # package-lock.json # package.json
I can get this resolved 👷♂️ . |
Summary
This PR removes the Stories codebase.
Fixes #4203.
Todo
Checklist