-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Site Editor: Rename left sidebar → block library #26517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both the post editor and site editor are working! The new name sounds good so take my ✅
On the other hand, I'm not sure if we are going to put anything else in the left sidebar. If we are going to do so, then we need to rename it again to something else that's more general so we can put anything in the left sidebar. So let's see what others think.
Seems like the changes to the Interface component would be breaking changes as well? There have been proposals to add other types of content to the left sidebar (#22113), so it'd be good not to make |
@talldan raised a really good point about the specificity of the block library name proposed. I agree that using the word sidebar isn't the best choice we made a long time ago. It quickly became evident that on smaller screens it can never be displayed as a sidebar. In mobile apps, it's handled in yet another way. When searching for a more general name, I recommend looking at WAI-ARIA roles that exist in HTML specification: |
I browsed through this list but none of the names seem like a good fit. @talldan or @gziolo do you have some alternative proposal in mind? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
descriptive of function rather than location.
Given this is an interface skeleton, I think it makes sense to be more about location than function. Most of the 'bone names' are location based (header, footer, sidebar, content, etc.). The boneName
(for lack of a better term) should be somewhere we can choose to put the BlockLibrary
in, and it shouldn't be named with a bias of its functionality.
An analogy to a video game - we would name the item slots of a character something like 'left hand', 'right hand', 'body', etc. where someone might equip a 'sword' item to the 'left hand'. Its a bit odd naming the slot 'sword' and equipping a sword to it, and that kind of feels like what we are doing here with naming the interface slot blockLibrary
🤔
We could just call it |
It looks like https://www.npmjs.com/package/@wordpress/interface It isn't exposed in WordPress under It should be fine to rename both props in the
The current distinction between left and the regular sidebar is indeed confusing. There is one more thing to consider, how it should be announced for folks that use screen readers for navigation?
Some options: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Complementary_role
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Region_role
Anyway, I agree that they aren't a perfect match name wise. |
Since this is actually experimental and renaming should be possible without breaking things, this is what I'm inclined towards:
Because it's one thing to use ARIA roles, it's another to name things. I think that this strikes the right balance. I don't think that ARIA roles make for good actual names. Also, every area in
|
@mattwiebe, I agree with your proposal in general. There are some pre-existing conditions that need to be taken into account. WP-Admin already defines some roles like "main" and it is above the code that controls the block editor: There should be only one
Anyway, if there aren't better ideas we can proceed with those names 👍 |
Finding the balance between too general and too specific is tricky. Fixes WordPress#25616
293185e
to
641f7b1
Compare
Thanks for all of the helpful feedback and context @gziolo - much appreciated. I ultimately decided to stay a bit more simplistic here with just renaming |
It looks good to go alone. I like this proposal, it makes the most sense 👍 We should add a soft depreciation for the old name in case some 3rd party projects use the package. I can tackle that part on Monday or share some prior examples. |
I'll open a follow-up PR with a proposal with deprecations as this branch was created in the forked repository :) Thanks, @mattwiebe for driving this change 🙇 |
Hmmm, I'm not quite sure if technically speaking we need this deprecation anymore knowing that we won't publish those changes to npm before WordPress 5.6 is out. Anyway, it won't harm to add it and remove it in a few weeks. See: #26826. |
Description
Rename Left Sidebar to Secondary Sidebar to be more semantic and descriptive of function rather than location.
Fixes #25616
How has this been tested?
Types of changes
Renaming. What could go wrong?
Checklist: