[wp-trac] [WordPress Trac] #37974: Add multi-panel feature to pages through add_theme_support
WordPress Trac
noreply at wordpress.org
Sat Oct 8 01:05:17 UTC 2016
#37974: Add multi-panel feature to pages through add_theme_support
----------------------------+------------------
Reporter: karmatosed | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 4.7
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: ux-feedback | Focuses: ui
----------------------------+------------------
Comment (by celloexpressions):
My technical concerns with timing in [comment:64] represent only the time
I would expect initial development of the customizer UI to take. Theme API
and rewrites/URL work would be on top of that, and that excludes code
review and iterations.
I did get an idea to compromise a bit on the UI so that it can be built
more quickly (I'd estimate more like 10-20 hours for that part). If
someone is found that has time to build this, here's the direction I would
recommend for building the customizer UI:
- Within the static front page section, add a new custom control for pages
called "Additional front page sections"
- The page sections control has an associated setting with an ordered
array of post object ids that gets saved
- The page sections control provides drag & drop, delete, and reorder
buttons that are keyboard and touch accessible when reordering doesn't
work.
- A basic (existing) `dropdown-pages` control is added after the page
sections control, with the default empty option saying "add another
section" instead of "select" via a new parameter on the control. When a
page is selected, it gets added to the other control (there may need to be
a button added for this to make it accessible, in which case I'd either
add another parameter for showing a button to the dropdown pages control,
or make the dropdown pages control into its own independent control).
- The page sections and add page section controls have an active callback
function that returns `( is_front_page() && ! is_home() )`, which will
show the section options only when the front page is previewed and set to
a static page.
Specific pieces that will take significant extra time to build are the
flyout panel (there isn't an API for reusing this yet), nesting a section
within the section and doing another sliding panel, and structuring this
with a control for each section plus a container control like the way
widgets and menus work. This approach would also create much less new code
that has to be maintained over time and potentially improves existing API
functionality for others.
If we can't get this into core in time, this approach would be feasible
within the theme and be more conformant with customizer best practices
that what the theme currently does. If needed, features like reordering
could be excluded to make it simpler but still improve over the current
experience in the theme.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37974#comment:87>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list