WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#30690 closed defect (bug) (fixed)

Customizer: Hide button for moving widgets to another area when there is only one area

Reported by: pavelevap Owned by: ocean90
Milestone: 4.2 Priority: normal
Severity: normal Version: 3.9
Component: Customize Keywords: has-patch
Focuses: ui Cc:

Description

Moving widgets to another widgetized area should be available only when there is one more widget area...

Attachments (2)

30690.diff (523 bytes) - added by celloexpressions 6 years ago.
If there's only one available sidebar, hide the move-widget button.
30690.2.diff (1.6 KB) - added by ocean90 6 years ago.

Download all attachments as: .zip

Change History (7)

#1 @ocean90
6 years ago

  • Focuses ui added
  • Keywords needs-patch added
  • Version changed from trunk to 4.0.1

@celloexpressions
6 years ago

If there's only one available sidebar, hide the move-widget button.

#2 @celloexpressions
6 years ago

  • Keywords has-patch needs-testing added; needs-patch removed
  • Milestone changed from Awaiting Review to 4.2
  • Type changed from enhancement to defect (bug)
  • Version changed from 4.0.1 to 3.9

Definitely shouldn't have the option to move a widget if there's nowhere to move it too. With the attached patch, my understanding is that if a second sidebar becomes available when navigating in the preview, the move-widget buttons should become visible again, although I couldn't find any themes that do that in my quick testing.

#3 @ocean90
6 years ago

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

In 31252:

Customizer: If there's only one available sidebar, hide the move-widget button.

props celloexpressions.
fixes #30690.

@ocean90
6 years ago

#4 @ocean90
6 years ago

  • Keywords needs-testing removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Since the sidebar selector shows only rendered sidebars we can't use $sidebarItems.length. 30690.2.diff should fix this.

#5 @ocean90
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 31419:

Customizer: Improve [31252] to show the move-widget buttons only if there is more than one *rendered* sidebar.

fixes #30690.

Note: See TracTickets for help on using tickets.