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

Change open in editor tab to menu button #5733

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timtmok
Copy link
Contributor

@timtmok timtmok commented Dec 13, 2024

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:

  1. New window (default)
  2. New editor in active editor group
  3. In the editor group to the right of the active group (creates a new one if necessary)
Screen.Recording.2024-12-12.at.4.31.37.PM.mov

@:plots

QA Notes

Displays alternate editor targets
Sets target selection as default action
Copy link

E2E Tests 🚀  ?
This PR will run tests tagged with: @critical @plots

@timtmok
Copy link
Contributor Author

timtmok commented Dec 13, 2024

Running the e2e tests before exiting draft. I ran them locally but wanted to see if it worked in PR as well.

@timtmok
Copy link
Contributor Author

timtmok commented Dec 16, 2024

The failing test is for Data Explorer and appears unrelated.

@timtmok timtmok marked this pull request as ready for review December 16, 2024 14:58
@timtmok timtmok requested a review from sharon-wang December 16, 2024 14:58
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")}
Copy link
Member

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

},
{
'editorTarget': SIDE_GROUP,
'label': localize('positron-editor-new-tab-right', 'Open in editor tab to the right')
Copy link
Member

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:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants