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

add menu contribution for python manage config #216018

Merged
merged 7 commits into from
Jul 8, 2024
Merged

Conversation

eleanorjboyd
Copy link
Member

related to this issue: microsoft/vscode-python#21845

@eleanorjboyd eleanorjboyd self-assigned this Jun 17, 2024
@vscodenpa vscodenpa added this to the June 2024 milestone Jun 17, 2024
profileActions.shift();
const menuActions: IAction[] = [];

const key = this.contextKeyService.createOverlay([]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One key we probably should have in the overlap is the current group (run/debug/coverage) for extensions who want different behavior

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, sorry could you clarify a bit what you mean here? There should be a context key for the current group and have it only show for some or make that configurable for the extension author?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The menu logic can run for all of them, but an author might want to only have a menu visible in one group, or have different menu entries for each group. So letting them do something like profileKind == "run" would be good.

@eleanorjboyd eleanorjboyd modified the milestones: June 2024, July 2024 Jun 27, 2024
Copy link
Member

@connor4312 connor4312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, one comment

Comment on lines +358 to 366
if (group === TestRunProfileBitset.Run) {
contextKeys.push(['testing.profile.context.group', 'run']);
}
if (group === TestRunProfileBitset.Debug) {
contextKeys.push(['testing.profile.context.group', 'debug']);
}
if (group === TestRunProfileBitset.Coverage) {
contextKeys.push(['testing.profile.context.group', 'coverage']);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you register the key in testingContextKeys.ts? That way it'll be automatically picked up for our docs :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!

@eleanorjboyd eleanorjboyd merged commit 3e4e91e into main Jul 8, 2024
6 checks passed
@eleanorjboyd eleanorjboyd deleted the rainy-dragonfly branch July 8, 2024 05:36
aaronchucarroll pushed a commit to aaronchucarroll/vscode that referenced this pull request Jul 10, 2024
Menu contribution to allow extensions to contribute a configuration submenu for testing
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants