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

Allow for Editor Action icons to be shown on inactive Editor Groups #209962

Closed
IanMatthewHuff opened this issue Apr 9, 2024 · 6 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality on-testplan workbench-tabs VS Code editor tab issues
Milestone

Comments

@IanMatthewHuff
Copy link
Member

IanMatthewHuff commented Apr 9, 2024

For our extension (VS Code for Education) we have a main webview content pane parked in editor group 1 that hosts our lesson content and we often have a runnable code file parked in editor group 2. To help students with running their code files, we provide a run Editor Action that we add to the editor actions for code files. We also don't show the usual run and debug sidebar section in our basic student profiles, so they need to run via the file editor actions.

Our discoverability problem with this is that in our default layout focus is usually in the lesson content where students are reading text, navigating lesson parts, or answering questions. This means that most of the time the run button on the code file is invisible, and only shows up when clicking over to it. We've seen a lot of new students stuck on initially finding out how to run their code files.

Recording 2024-04-09 at 08 48 47

Ideally, we'd like some way to work around this, either by a general setting we could turn on to show all editor actions in inactive windows, or by letting specific editor action contributions opt into being shown on inactive editor groups. So here we could opt in all or specific primary actions:

// Inactive: only show "Unlock" and secondary actions

@asmeets

@andreamah andreamah assigned bpasero and unassigned andreamah Apr 9, 2024
@bpasero bpasero assigned benibenj and unassigned bpasero Apr 9, 2024
@benibenj benibenj added the workbench-tabs VS Code editor tab issues label Apr 10, 2024
@bpasero
Copy link
Member

bpasero commented Apr 26, 2024

Maybe as a setting? One thing we have to ensure is not broken is that these actions get the right context. When you click on them while the other group is active, they might make wrong assumptions about which group is active because that state only updates based on focus changes.

@benibenj
Copy link
Contributor

This is not easily possible currently due to context keys and focus

Code_-_OSS_NrL4eyLtq5.mp4

@asmeets
Copy link

asmeets commented Apr 26, 2024

I completely understand given the context of the desktop environment, and working specifically with side-by-side code. For the extension in the .dev web context where we have curriculum on one side and code on the right, we're facing discoverability issues from new users in EDU, even with prompting - who can't "see" the run button unless focused in that panel.

Also, adding these two HITS reports which talk about user discoverability of the run button:

Just to clarify, is it something that is possible and can be worked on and could be accessed as a setting or another option, or not possible?

CC: Adding @bamurtaugh to this issue.

@benibenj
Copy link
Contributor

benibenj commented Apr 27, 2024

I think we should be able to figure out a solution for your case. I currently see two options:

  1. Add a setting which shows all actions on non-focused Editor Groups: This is probably much harder to support and it might not be possible to guarantee that it always works correctly
  2. Add a setting which allows users to specify which actions should be shown on inactive Editor Groups. This probably could work well for your case but might have in general similar problems to option 1.

Option 2. seems more likely currently, but requires more investigation. I'll have a closer look next week and follow up here

@benibenj benibenj added the feature-request Request for new features or functionality label Apr 27, 2024
@benibenj benibenj added this to the Backlog milestone Apr 27, 2024
@benibenj benibenj modified the milestones: Backlog, May 2024 May 13, 2024
@benibenj
Copy link
Contributor

@IanMatthewHuff @asmeets in tomorrows insiders we will support the workbench.editor.alwaysShowEditorActions setting which will show editor actions also on inactive groups. Please let me know if you see any unexpected behaviour.

There is still some work to be done for our existing actions such as making sure they extract the context correctly.

@IanMatthewHuff
Copy link
Member Author

@benibenj Thanks so much! Excited to check it out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

6 participants