Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix patterns explorer pop-up sidebar navigation #56442

Open
andrewhayward opened this issue Nov 22, 2023 · 14 comments
Open

Fix patterns explorer pop-up sidebar navigation #56442

andrewhayward opened this issue Nov 22, 2023 · 14 comments
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Accessibility Feedback Need input from accessibility [Type] Discussion For issues that are high-level and not yet ready to implement. [Type] Enhancement A suggestion for improvement.

Comments

@andrewhayward
Copy link
Contributor

What problem does this address?

The patterns explorer dialog, with "all patterns" selected in the sidebar

The sidebar of the patterns explorer pop-up is currently a collection of buttons, with no semantic indication of their purpose or context.

What is your proposed solution?

The tab pattern would probably be most appropriate here, but it is arguably a menu too.

@andrewhayward andrewhayward added [Type] Enhancement A suggestion for improvement. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Accessibility Feedback Need input from accessibility [Type] Discussion For issues that are high-level and not yet ready to implement. labels Nov 22, 2023
@afercia
Copy link
Contributor

afercia commented Nov 23, 2023

Noting that making these buttons anr ARIA tab interface would partially solve #55110 / #56162

Regarding the general issue, I wouldn't recommend to use modal dialogs for such highly dynamic user interfaces in teh first place. Having the dialog content that updates dynamically doesn't seem to me ideal from an usability perspective. Also, it creates problems with some important features of the modal dialog such as constrainet tabbind and detecting focus outside to close the dialog.

That said, I'd be all for consistency in the first place. There are other modal dialogs that use some mechanism to 'navigate' content. For example, the Preferences modal dialog does use ARIA tabs:

Screenshot 2023-11-23 at 16 45 56

Conceptually, it's very similar to the Patterns explorer dialog. On the left, there's a collection of buttons that allow 'navigating' the content. Should this pattern always use Tabs? Or maybe use buttons wrapped within a properly labelled nav element?

Does the Tab design pattern helps users?

  • It does reduce the amount of Tab stops, while still allowing to navigate / select the tabs with arrow keys.
  • Does it help discoverability of all the preference sections and the Pattern categories?

Anyways, I'd vote for standardizing and always use either Tabs or simple buttons + nav.

@joedolson
Copy link
Contributor

From all of the related issues, it seems like we have a fundamental problem that we're making heavy use of a pattern with a side panel of navigation and a main panel of content, and not using a consistent navigation across the site.

From the accessibility bug scrub on 4/16/2024, we agreed that while either the tabpanel pattern or the nav menu pattern are viable, we'd probably prefer the nav menu. One argument (from @Rcreators) was that using a nav menu pattern could allow increased reuse across components that require navigation, as it would support submenus.

It seems like it would be worthwhile to work on unifying all of these navigation patterns into a single base component.

@jwgoedert
Copy link

Not sure if I am trying to access this from the correct path but I do not seem to get the same Pattern modal when accessing the patterns explorer via Appearance>Editor>Patterns. Is there a different route that calls the modal? Attaching screenshot of my Patterns view which looks more aligned with our discussion from last week.
WP_56442_PatternsSidebar
Also am still doing some exploring to identify other areas where similar patterns appear. The "Help" dropdown located on most(if not all) pages also contains a side nav with content area. It appears to use 'tab-link-*' IDs contextually assigned. May warrant refactor to whatever pattern we decide on?
WP_56442_HelpMenu

@joedolson
Copy link
Contributor

Path to get to this interface: What you need is to go to the Post Editor > click the 'plus' button in the upper left corner > switch to the 'Patterns' tab > click on 'Explore all patterns'

@joedolson
Copy link
Contributor

See comments in #56442 regarding the use of a tabpanel there, as it's relevant to this discussion.

@joedolson
Copy link
Contributor

It would be good to get some movement on this. While it might be better down the road to shift these to a menu pattern, moving to a tabpanel pattern would be a significant immediate improvement. The advantage to going to a tabpanel is that the Patterns navigation in the sidebar is already a tabpanel - these two ways of navigating patterns should at least use the same mechanism for exploration.

@jeryj jeryj self-assigned this Jul 16, 2024
@jeryj
Copy link
Contributor

jeryj commented Jul 16, 2024

I'll give this a look 👍🏻

@jeryj
Copy link
Contributor

jeryj commented Jul 16, 2024

Took a look at this -- I think it's going to be a heavy lift in its current state. Also, it seems like it's not adding much now that the inserter in the sidebar has advanced. I'd propose removing this modal entirely and relying on the sidebar pattern inserter. The only thing the modal gives us right now is a larger view for seeing the patterns if you're on a desktop.

@WordPress/gutenberg-design - What do you think of removing the pattern modal now that the pattern inserter has progressed?

@joedolson
Copy link
Contributor

I'm 100% in favor of having fewer alternative interfaces; Gutenberg already suffers from excess complexity, and I see very limited benefit to having both of these experiences.

@jeryj
Copy link
Contributor

jeryj commented Jul 16, 2024

Here's a quick PR to remove it: #63636

@richtabor
Copy link
Member

What do you think of removing the pattern modal now that the pattern inserter has progressed?

We need much more clarity on if this is being used, relied on even, by users before considering removing it.

@joedolson
Copy link
Contributor

That should start with an assessment of the paths that reach it. The only one I specifically know about is via the sidebar patterns tab in the inserter, using the 'Explore all patterns' button; and a user has to go through the other pattern library interface in order to reach that option, so it wouldn't close off any pathways. But if there's another way of reaching it that's more isolated, that could introduce problems for some users.

@draganescu
Copy link
Contributor

I believe lots of plugins that offer additional patterns use this modal interaction to showcase their specific patterns? Even if not the same modal, the interaction itself.

@jameskoster
Copy link
Contributor

Using tabs here seems like a clear win in the short-term, especially given the ongoing effort to improve the underlying component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Accessibility Feedback Need input from accessibility [Type] Discussion For issues that are high-level and not yet ready to implement. [Type] Enhancement A suggestion for improvement.
Projects
No open projects
Status: Todo
Development

No branches or pull requests

8 participants