Skip to content
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

Plugin settings page: Handle post type/template selection via REST/React #5015

Closed
johnwatkins0 opened this issue Jul 9, 2020 · 4 comments · Fixed by #5044
Closed

Plugin settings page: Handle post type/template selection via REST/React #5015

johnwatkins0 opened this issue Jul 9, 2020 · 4 comments · Fixed by #5044
Assignees
Labels
Changelogged Whether the issue/PR has been added to release notes. UX WS:UX Work stream for UX/Front-end
Milestone

Comments

@johnwatkins0
Copy link
Contributor

Feature description

Following up on #4998, which rebuilt the plugin settings screen using REST endpoints and components built for the setup wizard. One part that was largely left out of the updates due to its potential size and complexity was this:

Screen Shot 2020-07-09 at 4 57 13 PM

Currently this is wrapped in the new settings page but handled the traditional way with settings saved on the backend via form submission.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • Options make sense in the context of the page
  • Saving doesn't require a full page refresh

Implementation brief

  • Details for for the various conditions will need to be ironed out
  • Can probably use the AMP options endpoint.

QA testing instructions

Demo

Changelog entry

@johnwatkins0
Copy link
Contributor Author

@westonruter Just confirming as I translate this bit into React, is this user_supported thing obsolete now?

<?php if ( ! empty( $option['user_supported'] ) ) : ?>
							<input type="hidden" name="<?php echo esc_attr( $element_name ); ?>" value="<?php echo esc_attr( $id ); ?>">
						<?php endif; ?>

@westonruter
Copy link
Member

Correct! The user_supported is gone.

@westonruter
Copy link
Member

I mean, it's just redundant now with supported.

@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Jul 17, 2020
@kmyram kmyram assigned pierlon and unassigned johnwatkins0 Aug 24, 2020
@pierlon
Copy link
Contributor

pierlon commented Aug 25, 2020

QA Passed

  • Supported Templates options are correctly saved via a REST request
  • The Templates section is hidden when Reader mode is chosen
  • Toggling the "Pages" content type shows an alert and hides the Homepage template if all templates are not being served AMP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelogged Whether the issue/PR has been added to release notes. UX WS:UX Work stream for UX/Front-end
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants