-
Notifications
You must be signed in to change notification settings - Fork 92
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
Change open in editor tab to menu button #5733
Conversation
Displays alternate editor targets Sets target selection as default action
E2E Tests 🚀 ? |
Running the e2e tests before exiting draft. I ran them locally but wanted to see if it worked in PR as well. |
The failing test is for Data Explorer and appears unrelated. |
iconId='go-to-file' | ||
align='right' | ||
tooltip={localize('positron-open-plot-editor', "Open plot in editor")} | ||
ariaLabel={localize('positron-open-plot-editor', "Open plot in editor")} |
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.
I think we may have lost the ariaLabels on the Open plot in [location]
elements
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.
Good catch, it is missing the aria on the menu button. I think the menu items are okay but it doesn't hurt to double check. It's actually the context menu service that takes IAction
and it doesn't have aria labels. The Menu
object does support an aria label but it looks like it's for the entire menu. I suspect that we don't need an aria label for each action since the label is already describing what it should do and a screen reader will use that.
}, | ||
{ | ||
'editorTarget': SIDE_GROUP, | ||
'label': localize('positron-editor-new-tab-right', 'Open in editor tab to the right') |
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.
I wonder if we could use similar verbiage to the File Explorer and hook into this preference: workbench.editor.openSideBySideDirection
? Then the user can define whether the plot will open to the right or down based on the same preference as the File Explorer. Maybe something like "Open in editor tab to the side"?
Or maybe the user will want "to the Side" for plots to be different than the File Explorer?
Here's the context menu when right-clicking on a file in the File Explorer:
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.
Oh, you're right about the verbiage. I think it probably uses the same setting since I'm calling the editor service. I didn't realize there was a setting for this.
I tested the dropdown menu and it does read the actions correctly with a screen reader. I will open an issue about the drop down though since I see now that it's missing the aria label. |
Address #5446
Adds changing the default action on the
ActionBarMenuButton
to the checked action. Refactors plots service to use a new editor's group target and store the last used option.There are now three options when opening a plot in an editor tab:
Screen.Recording.2024-12-12.at.4.31.37.PM.mov
@:plots
QA Notes