WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.16k stars 4.05k forks source link

Inserter / List View: Refactor panels to use the same code #61549

Open scruffian opened 2 months ago

scruffian commented 2 months ago

What problem does this address?

Right now the inserter sidebar and the list view share a lot of functionality but are different code bases. We'd like to ensure that they offer the same affordances and UX.

What is your proposed solution?

We should refactor these panels to use the same code so that each benefits from improvements to the other and we have a consistent experience.

alexstine commented 2 months ago

So to be 100% clear, we're talking same code loading different conditional components? Not talking say the inserter and list view in the same sidebar UI at the same time?

Thanks.

jeryj commented 2 months ago

So to be 100% clear, we're talking same code loading different conditional components?

Yes. It's just about making the wrapping components share the same code and hook-up the similarities like managing focus between the button that opens it and closes, and maybe adding the tabs. The UI of everything would stay as it is today.

alexstine commented 2 months ago

I do have concerns about another level of tabs though. We'd be left with a very complex experience in having to select the block inserter, patterns, then a category. Just something to keep in mind before this train goes off the rails. Not an explicit accessibility failure, but could be a not great UX.

jeryj commented 2 months ago

Sorry this has been confusing to communicate. We're not changing the current UI in any way with this idea. Only refactoring code to be easier to maintain. There should not be any functional change to the semantics or interactions.