Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#29529 closed defect (bug) (fixed)

Shift-click widget editing issues the Customizer

Reported by: hardeepasrani's profile hardeepasrani Owned by: ocean90's profile ocean90
Milestone: 4.1 Priority: normal
Severity: normal Version: 4.0
Component: Customize Keywords: has-patch
Focuses: ui, javascript Cc:


Hey folks,

I like the new Customizer API which allows us to add panels to the Customizer but it's also causing a simple problem with "Shift-click to edit this widget" option.

Shift-click feature is not working on the Customizer, unless you're editing the Widgets panel.

Thanks :)

Change History (7)

#1 @karpstrucking
10 years ago

  • Focuses ui added

#2 @celloexpressions
10 years ago

  • Milestone changed from Awaiting Review to 4.1

Confirmed. This is something that should be able to leverage the Customizer deep-linking functionality that westonruter is working on for 4.1 rather than all of the widgets-specific code it's currently using (which doesn't account for panels).

#3 @celloexpressions
10 years ago

  • Milestone changed from 4.1 to Future Release

No reason that this necessarily needs to be in 4.1, but it does depend on #28709 - we'll wait for a patch.

#4 @westonruter
10 years ago

Yeah, so once #28709 lands, as the patch exists right now, then the issue in this ticket can be resolved by first invoking (not final):

wp.customize.panel( 'widgets' ).toggle( true )

And actually, this should be automatic. So when something like this is called:

wp.customize.control( 'widget_text[123]' ).focus()

It should automatically cause the containing section and panel to also expand.

#5 @westonruter
10 years ago

  • Focuses javascript added
  • Keywords has-patch added

This is now fixed in the most recent patch for #28709 (now on a GitHub PR). Namely, now WidgetControl.expandControlSection() is using the new API api.section( this.section() ).expand() which automatically expands the containing panel if it is not expanded.

#6 @westonruter
10 years ago

  • Milestone changed from Future Release to 4.1

#7 @ocean90
10 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 30102:

Improve/introduce Customizer JavaScript models for Controls, Sections, and Panels.

  • Introduce models for panels and sections.
  • Introduce API to expand and focus a control, section or panel.
  • Allow deep-linking to panels, sections, and controls inside of the Customizer.
  • Clean up accordion.js, removing all Customizer-specific logic.
  • Add initial unit tests for wp.customize.Class in customize-base.js. provides an overview of how to use the JavaScript API.

props westonruter, celloexpressions, ryankienstra.
see #28032, #28579, #28580, #28650, #28709, #29758.
fixes #29529.

Note: See TracTickets for help on using tickets.