-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Enhance: Added show outline command #69015
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
base: trunk
Are you sure you want to change the base?
Enhance: Added show outline command #69015
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Overall, this PR tests well for me.
test.mov
|
@t-hamano Would you mind having a look into this whenever available? I would like to get this merged if everything looks good. |
t-hamano
left a comment
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.
Can you check the following points?
- Rewolve conflicts
- Don't persist the Outline tab. After you run this command, when you reopen the Document Overview, the Outline tab will be visible. Clicking the Document Overview button should always open the ListView tab.
- Change the command text to "Show or hide ...".
|
Another issue that needs to be resolved is accessibility. When executing a command, the screen reader does not announce that the outline tab has been opened. Furthermore, the focus does not move. At the very least, it's a good idea to always be aware of the following accessibility checks:
|
b1105c7 to
246273c
Compare
@t-hamano I think the focus is broken for entire component as tested on trunk. I think I will open separate issue regarding this. probably after #70624 lands in trunk |
|
Tested focus: https://q7utzrengv.ufs.sh/f/Wgl9eBAmTj29gtvhdExbvUVCLRtOZBc09F7pY3E1zdm6eXIS You can see its broken on trunk aswell |
…ab handling and notifications
What Updated?
Why?
How?
Testing InstructionsTest the new outline command:
Test Document Overview button:
Test toggle list view command:
ScreenCasthttps://q7utzrengv.ufs.sh/f/Wgl9eBAmTj29WUcJbYAmTj29whDvJ487kFt0Sz6RbdQVMYrN |
I'm not talking about a problem with the command palette itself. If you're experiencing issues with the Safari browser, #50846 may be relevant. When I run the "Open List View" command, the List View opens and the first block gets the focus. But when I run "Document outline opened", it doesn't get the focus anywhere in the outline sidebar. I think the focus should be on the Outline tab or the close button. d0fe804442b2afe672327ea3d96f27da.mp4 |
I am using chrome so might worth exploring it further.
Interesting, I will check why this is happening, because I just registered the command only. |
|
@Mayank-Tripathi32 Do you still have the bandwidth to move forward with this PR? Thanks! |
I will add this to my calendar for this week! Sorry for delay. I got a little busy. |
|
Nice work. Took a quick look from a design perspective. The base functionality is pretty good: One of the niceties of the original proposal is that it mostly shows the action to open the document outline, it doesn't actually show any of the values. That's not a blocker for this landing, rather, that might still be good to follow up on at some point: There's a bit of a meta question here, which is around command palette action design, where as an incomplete rule of thumb I've approached it as: any menu item that is available in the current context should eventually find its way into the command palette. Beyond a simple API for registering items, it opens questions around what icon, if any, to show here. For document outline, this used to actually be a separate button with a (i) icon ( I'm leaning towards suggesting this action should not have an icon, and that as part of expanding the range of command palette actions, we'll eventually end up with a lot of actions that don't have icons, and that's fine too. But just for a broader bit of opinion, cc: @WordPress/gutenberg-design. |
|
The question on my mind is whether the icon should represent the thing the action applies to, or the action itself. Additionally there are navigational actions to consider which are not really “do something to an object” commands. Somewhat related are action groups/headers. I agree we need some guidelines about this, but it's a pretty big topic and warrants a separate discussion. |


Attempt to resolve #53191
What?
Added "Show document outline" command to open List View in outline tab.
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
ScreenCast
Screen.Recording.2025-02-04.at.12.44.36.AM.mov