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

Remove reliance on quickPickOptions, use TreeItems directly #1239

Merged
merged 17 commits into from
Sep 23, 2022

Conversation

alexweininger
Copy link
Member

@alexweininger alexweininger commented Sep 22, 2022

Instead of grabbing contextValues: string[] and isLeaf: boolean from the elements (aka things returned by vscode.TreeDataProvider.getChildren), call vscode.TreeDataProvider.getTreeItem to get a vscode.TreeItem back.

We can derive the info we need from the TreeItem. isLeaf -> collapsibleState, contextValues -> contextValue.

I ran into issues because isLeaf and contextValues weren't the only things we attached to the elements that we need in the quick pick wizard. For compatibility with the old createChildImpl, I was attaching info related to create.

I've moved that compatibility logic into CompatibilityRecursiveQuickPickStep.

See how these changes impact Resource Groups: microsoft/vscode-azureresourcegroups#392

alexweininger and others added 7 commits September 22, 2022 09:47
Co-authored-by: Brandon Waterloo [MSFT] <36966225+bwateratmsft@users.noreply.github.com>
Co-authored-by: Brandon Waterloo [MSFT] <36966225+bwateratmsft@users.noreply.github.com>
Co-authored-by: Brandon Waterloo [MSFT] <36966225+bwateratmsft@users.noreply.github.com>
Copy link
Contributor

@bwateratmsft bwateratmsft left a comment

Choose a reason for hiding this comment

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

Approved but maybe the other subtypes should keep ResourceGroupsItem (in the comment).

@bwateratmsft
Copy link
Contributor

:shipit:

@alexweininger alexweininger marked this pull request as ready for review September 22, 2022 18:26
@alexweininger alexweininger requested a review from a team as a code owner September 22, 2022 18:26
Copy link
Contributor

@bwateratmsft bwateratmsft left a comment

Choose a reason for hiding this comment

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

:shipit: :shipit:

@alexweininger alexweininger merged commit 25018ea into bmw/quickPick_v8.30 Sep 23, 2022
@alexweininger alexweininger deleted the alex/tip-get-tree-item branch September 23, 2022 18:26
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