[wp-trac] [WordPress Trac] #40432: Customizer: Should we stop contextually hiding features?
WordPress Trac
noreply at wordpress.org
Fri Dec 15 19:11:47 UTC 2017
#40432: Customizer: Should we stop contextually hiding features?
-------------------------+------------------------------
Reporter: melchoyce | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.0
Severity: normal | Resolution:
Keywords: | Focuses: ui
-------------------------+------------------------------
Comment (by westonruter):
Replying to [comment:53 daviedR]:
> Then why do we have "Homepage Settings" (or formerly known as "Static
Front Page") section always active on customizer regardless of what page
are currently previewed? If you use the same principle, the section should
be inactive when not previewing home page. Why is it active on all
previewed pages?
The Homepage Settings can be shown unconditionally because we know the
URLs for the homepage and the page for posts. As of #30677, when you try
changing the homepage, the Customizer preview will automatically refresh
to show you the new homepage you just selected. The same happens for the
page for posts.
Widget sidebars are different because we have no idea the templates in
which a sidebar will appear, so we do not know which URLs to navigate to
in the preview when a user starts to interact with the sidebar.
> Or, as a theme developer, I could optionally add a custom control into
each sidebar section. The control would act as a link with this text:
"View pages with this sidebar". Then we can use custom JS and take
advantage of this: `wp.customize.previewer.previewUrl( url )` to set the
preview URL to any page that showcase the sidebar.
Yes, this is great. And it should absolutely be done. However, it requires
a theme to support it. When registering a sidebar, there could be an
additional parameter to indicate which kinds of queries the sidebar will
appear on, and that could then feed into such a control (or actually a
notification containing a link) to display in the sidebar section.
Nevertheless, I don't expect this to be given high priority. The work
being done on Gutenberg and migrating from widgets to blocks and block-
driven templates will allow for this problem to be solved since then be
able to query for where on a site a given widget (block) appears and then
navigate to its containing page automatically. At least, this is what I
anticipate will be possible.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40432#comment:54>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list