Skip to content

Support when clause for terminal.profiles contribution point #183354

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

Open
isc-bsaviano opened this issue May 24, 2023 · 4 comments
Open

Support when clause for terminal.profiles contribution point #183354

isc-bsaviano opened this issue May 24, 2023 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities terminal-profiles
Milestone

Comments

@isc-bsaviano
Copy link

I am in the process of implementing a virtual terminal using ExtensionTerminalOptions for my extension. The terminal can only be created if some conditions are met. I would like to hide the terminal profile from the menu if the conditions aren't true. Can you add support for a when clause in the terminal.profiles contribution point so this becomes possible? Thanks!

@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@Tyriar
Copy link
Member

Tyriar commented May 24, 2023

My main concern here is that it's very easy for when clauses to change a lot during the lifecycle of the editor, it would be easy for extension authors to make mistakes that could look like bugs in VS Code. Having a default profile configured with a when clause would also show warnings in settings and lead to other weird behavior like falling back to the default.

Could you elaborate on your use case? It's not clear when this would be used exactly intersystems-community/vscode-objectscript#1150. Is this just a minor polish issue in your view/

@Tyriar Tyriar added the info-needed Issue requires more information from poster label May 24, 2023
@isc-bsaviano
Copy link
Author

The virtual terminal that I am implementing requires a remote server connection. That connection is defined in the settings.json file, but it could be "inactive" for many reasons (bad network connection, bad credentials, intentionally turned off by the user, etc). We use a custom context key and when clauses to hide menu options that can't be used without that server connection. Since we can't do that for the terminal profile, users will still see ours in the menu and will get an error message popup when they do. IMO it's much cleaner to be able to hide that option entirely, but I agree that this is just minor polish.

@gjsjohnmurray
Copy link
Contributor

I support this and have upvoted it. Previously requested in #144135 but closed with #144135 (comment)

Pinging @SeaDve

@meganrogge meganrogge removed the info-needed Issue requires more information from poster label May 25, 2023
@meganrogge meganrogge modified the milestones: Backlog Candidates, Backlog Jun 5, 2023
@meganrogge meganrogge added the help wanted Issues identified as good community contribution opportunities label Jun 5, 2023
@Tyriar Tyriar removed their assignment Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities terminal-profiles
Projects
None yet
Development

No branches or pull requests

5 participants