WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#33687 closed defect (bug) (worksforme)

Customizer: Widgets x Menu inconsistencies

Reported by: pavelevap Owned by: SergeyBiryukov
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Customize Keywords: needs-patch close
Focuses: Cc:
PR Number:

Description

Customizer Widgets:

Button: Add a Widget (singular)
New section title: Add a Widget (same string)

Customizer Menu:

Button: Add Items (plural)
New section title: Add Menu Items (different string)

I would change "Add a Widget" to "Add Widgets" and maybe use two different contexts (button x title can be different in some languages and for menu we have two different strings).

I also do not understand why new panels with widgets and menu items have title section when they are not visible?

And one more glitch, everytime I open Customizer, Widgets panel is loaded a little bit later. I tested some other websites and it looks like it is waiting for something (Menu panel works well).

Change History (13)

#1 in reply to: ↑ description ; follow-up: @DrewAPicture
4 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.4

Replying to pavelevap:

And one more glitch, everytime I open Customizer, Widgets panel is loaded a little bit later. I tested some other websites and it looks like it is waiting for something (Menu panel works well).

This is a known issue and is being addressed in #28580.

#2 in reply to: ↑ 1 @westonruter
4 years ago

Replying to DrewAPicture:

Replying to pavelevap:

And one more glitch, everytime I open Customizer, Widgets panel is loaded a little bit later. I tested some other websites and it looks like it is waiting for something (Menu panel works well).

This is a known issue and is being addressed in #28580.

Actually, this issue has been closed as wontfix in #33052. See explanation there.

#3 @pavelevap
4 years ago

Ah, I see, but this issue should not be wontfix, because it is really annoying... What about loading this panel everytime and show some kind of message (Your theme does not register any widget area) when there are no widget areas? Users should know, that they can work with Widgets in Customizer (Widget admin page is also not hidden) even if their theme does not support them. And it is a long time I saw theme without widget areas, so it seems better to show panel without delay to 99 % of users and 1 % will see that there are no widget areas when they click Widgets panel.

#4 @westonruter
4 years ago

@pavelevap: It's not necessarily that the theme does not register any widget areas. In this case, the widgets panel should be hidden from the start (I'd have to double check that). The issue is when there are no dynamic_sidebar() calls in the current preview.

But I think you have a point: if no sidebars are rendered in the preview, there will not be any sidebar sections shown in the widgets panel. In this case, the panel is empty. What we could do in this situation is show some message in the panel when there are no active sidebar sections to explain why nothing is there, and to instruct users that they should navigate around the site within the preview to access the template that has the sidebar they want to modify.

I'll re-open the ticket.

#5 follow-up: @pavelevap
4 years ago

Great, thank you, I was waiting many times for Widgets panel and asking "why?" :-)

Any idea why new panels with widgets and menu items have title section when they are not visible?

#6 in reply to: ↑ 5 @westonruter
4 years ago

Replying to pavelevap:

Any idea why new panels with widgets and menu items have title section when they are not visible?

I don't understand. Can you please explain more?

#7 @pavelevap
4 years ago

Sorry, for example this part: https://core.trac.wordpress.org/browser/tags/4.3/src/wp-includes/class-wp-customize-nav-menus.php#L701

There is "Add Menu Items" title, but it is never visible (also not for screen readers) or at least I never saw this title in Customizer... But maybe I am missing something...

#8 @celloexpressions
4 years ago

With regards to the plurality, it stems from the fact that you add multiple menu items at once but only one widget at a time (the panel is automatically closed after a selection is made).

The customize-section-title section in the add-items panels is used on small screens as the navigation back.

#9 @pavelevap
4 years ago

Thank you for explanation!

Single and plural forms now seems OK to me, I did not realize that I can add only one widget at once... Titles are also fine, I just tried mobile device...

I am not sure if we should have different context for button and title? We have also string "Add Widget" (from widget admin page), but I am not sure if it is the same meaning as "Add a Widget" from Customizer?

Also adding some more translators comments would be helpful.

This ticket was mentioned in Slack in #core by sergey. View the logs.


4 years ago

#11 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

#12 @ocean90
4 years ago

  • Keywords close added
  • Milestone changed from 4.4 to Awaiting Review
  • Version changed from trunk to 4.3

What's the issue here?

#13 @celloexpressions
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from accepted to closed

To summarize:

Button: Add a Widget (singular)
New section title: Add a Widget (same string)
Customizer Menu:
Button: Add Items (plural)
New section title: Add Menu Items (different string)
I would change "Add a Widget" to "Add Widgets" and maybe use two different contexts (button x title can be different in some languages and for menu we have two different strings).

The singular vs. plural is because menus add multiple at a time, while widgets add one at a time.

I also do not understand why new panels with widgets and menu items have title section when they are not visible?

This is used for the mobile view, and provides back-navigation. The main panel header is visible on larger screens, so we don't need an additional header in the add- panels.

And one more glitch, everytime I open Customizer, Widgets panel is loaded a little bit later. I tested some other websites and it looks like it is waiting for something (Menu panel works well).

See #33052.

Add Widget vs. Add a Widget

I think this is because the "Add Widget" button is used with respect to a specific widget, while "Add a Widget" is to open the panel where a widget can be selected, then added (also with the "Add Widget" text for screen readers, I think). If this needs translator contexts for clarity, let's do a new ticket for that since this one is getting a bit confusing.

Note: See TracTickets for help on using tickets.