ampproject / amp-wp

Enable AMP on your WordPress site, the WordPress way.
https://wordpress.org/plugins/amp/
GNU General Public License v2.0
1.79k stars 383 forks source link

Indicate which controls in the AMP Customizer for a Reader theme are shared with the non-AMP active theme #5008

Closed westonruter closed 4 years ago

westonruter commented 4 years ago

Feature description

When a Reader theme has been selected for Reader mode, the Customizer opened from an AMP page will be distinctly for the theme that was chosen for Reader mode. It will have the theme-specific settings for the Reader theme instead of the settings for the active theme. Additionally, the Themes panel and Widgets panels are removed from the AMP Customizer:

Non-AMP Customizer AMP Customizer
Twenty Twenty Customizer Twenty Fifteen AMP Customizer

Nevertheless, there are settings which are common to both versions of the Customizer: any which are not tied to theme_mod settings.

Section/Panel Shared Not Shared
Site Identity Site Title, Tagline, Site Icon Logo, Retina Logo (in Twenty Twenty), Display Site Title and Tagline (in Twenty Fifteen, etc)
Colors None Primary color, header color, background color, etc
Header Media/Image None Video, image, etc
Background Image None Selected image, Position, Size, etc
Menus Nav Menus, Nav Menu Items Menu location assignments
Homepage Settings Static front page and page for posts None
Additional CSS None Theme-specific!

Themes may add/remove controls to each of these sections or even add new sections. Plugins may also add/remove controls to any of these sections.

When in the AMP Customizer, there should be some indication for the controls that will impact the non-AMP version of the site.

The Customizer API for adding notifications to controls can be seen here: https://make.wordpress.org/core/2016/07/05/customizer-apis-in-4-6-for-setting-validation-and-notifications/

image

The Customizer API for adding notifications to sections and panels can be found here: https://make.wordpress.org/core/2017/11/01/improvements-to-the-customize-js-api-in-4-9/#notification-improvements

image

The notifications should be added with JS as opposed to PHP to account for dynamically-created controls.


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

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

pierlon commented 4 years ago

QA Passed

When customizing a Reader theme:

image

image

image