Skip to content

Add Select Subscriptions button to Resources view toolbar#1538

Open
alexweininger wants to merge 3 commits into
mainfrom
alexweininger-select-subscriptions-toolbar-button
Open

Add Select Subscriptions button to Resources view toolbar#1538
alexweininger wants to merge 3 commits into
mainfrom
alexweininger-select-subscriptions-toolbar-button

Conversation

@alexweininger

@alexweininger alexweininger commented Jul 1, 2026

Copy link
Copy Markdown
Member

I've always wondering if this would provide a better UX. I've added the Select Subscriptions button to the title bar for the Azure Resources tree view.

Screenshot 2026-07-01 at 3 40 26 PM

What do we think? In my opinion this doesn't hurt anything, and can only help users who would potentially not see the button on the subscription items.

Place the Select Subscriptions command between the group-by and
refresh buttons in the Azure Resources view title bar.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 19:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves discoverability of the existing Select Subscriptions command by adding it to the Azure Resources view title toolbar, placing it between the existing Group By submenu and Refresh actions.

Changes:

  • Added a menus.view/title contribution for azureResourceGroups.selectSubscriptions scoped to view == azureResourceGroups at navigation@3.
  • Shifted the existing refresh titlebar commands (azureFocusView.refreshTree, azureResourceGroups.refreshTree) from navigation@3 to navigation@4 to preserve the intended ordering.
Show a summary per file
File Description
package.json Adds Select Subscriptions to the Azure Resources view title bar and adjusts toolbar ordering for refresh actions.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Low

@alexweininger

Copy link
Copy Markdown
Member Author

Matt H. approved

@alexweininger alexweininger marked this pull request as ready for review July 1, 2026 20:01
@alexweininger alexweininger requested a review from a team as a code owner July 1, 2026 20:01
motm32
motm32 previously approved these changes Jul 1, 2026
MicroFish91
MicroFish91 previously approved these changes Jul 2, 2026

@MicroFish91 MicroFish91 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like it too

@alexweininger

Copy link
Copy Markdown
Member Author

Realized we probably need to hide this button in states where there's no subscriptions in the tree yet, @copilot can you look into that? What if the user isn't signed in yet, does the command handle it fine? Should we hide the button in some cases?

Copilot AI dismissed stale reviews from MicroFish91 and motm32 via 1ada6c5 July 2, 2026 17:04

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Realized we probably need to hide this button in states where there's no subscriptions in the tree yet, @copilot can you look into that? What if the user isn't signed in yet, does the command handle i...

The command already handles the "not signed in" case gracefully — it catches isNotSignedInError and shows an info message with a "Sign In" button. That said, it's better UX to hide the toolbar button when there are no subscriptions in the tree yet.

I've added a new context key azureResourceGroups.isSignedIn (commit Hide Select Subscriptions toolbar button when not signed in):

  • Set to true after subscriptions are successfully loaded (regardless of count — even "all filtered out" still shows the button so the user can change their filter)
  • Set to false when isNotSignedInError is caught

The toolbar button's when clause now includes && azureResourceGroups.isSignedIn, so it's hidden when the user isn't signed in and during initial load (key is undefined = falsy), and appears once the user is authenticated.

motm32
motm32 previously approved these changes Jul 2, 2026
@alexweininger

Copy link
Copy Markdown
Member Author

@copilot what do we do for the other buttons on the ribbon, we should just handle this button the same as those. I think it's fine to keep it visible if the user isn't signed in yet if that's what we do for the other buttons and since the command handles the not signed in error gracefully.

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@copilot what do we do for the other buttons on the ribbon, we should just handle this button the same as those. I think it's fine to keep it visible if the user isn't signed in yet if that's what we ...

Reverted — the button now uses the same when: "view == azureResourceGroups" condition as the other toolbar buttons, with no sign-in gating.

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.

6 participants