Skip to content

Moving a feature from 0.7.1 into the 0.7.0 release#492

Open
tnaum-ms wants to merge 4 commits intonextfrom
rel/release-0.7.1
Open

Moving a feature from 0.7.1 into the 0.7.0 release#492
tnaum-ms wants to merge 4 commits intonextfrom
rel/release-0.7.1

Conversation

@tnaum-ms
Copy link
Collaborator

@tnaum-ms tnaum-ms commented Feb 6, 2026

This pull request updates sorting logic throughout the codebase to improve how lists are ordered, especially when labels or names contain numeric values. By enabling numeric-aware sorting, items like "Item 2" and "Item 10" will now appear in the expected order, enhancing user experience in various selection prompts and tree views.

Sorting improvements in wizard steps and prompts:

  • Updated sorting of prompt items and quick pick lists to use localeCompare with the { numeric: true } option, ensuring numbers in labels are sorted naturally across wizard steps such as registry selection, data migration extension selection, folder selection, service discovery, and subscription filtering. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Sorting improvements for tenant and account lists:

  • Enhanced sorting for tenant and account lists by applying numeric-aware sorting to display names and labels, improving ordering in tenant selection and account management steps. [1] [2] [3] [4] [5]

Sorting improvements in Azure resource tree views:

  • Applied numeric-aware sorting to subscriptions and accounts in Azure resource tree views, resulting in more intuitive ordering for service root items and subscription items across Azure Mongo RU, Azure Mongo VCore, and Azure VM plugins. [1] [2] [3] [4] [5] [6]

@tnaum-ms tnaum-ms requested a review from a team as a code owner February 6, 2026 21:08
Copilot AI review requested due to automatic review settings February 6, 2026 21:08
Copy link
Contributor

Copilot AI left a comment

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 updates list sorting across the VS Code extension to use numeric-aware comparisons, improving the ordering of items whose names/labels include numbers (e.g., “Item 2” before “Item 10”) in tree views and wizard quick-picks.

Changes:

  • Switched many Array.sort comparators from plain localeCompare to localeCompare(..., { numeric: true }) for more natural numeric ordering.
  • Added numeric-aware sorting for DocumentDB tree nodes (databases, collections, indexes).
  • Applied numeric-aware sorting to Azure discovery/service selection prompts and subscription/account/tenant lists.

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tree/documentdb/IndexesItem.ts Numeric-aware sort for index names
src/tree/documentdb/DatabaseItem.ts Numeric-aware sort for collection names
src/tree/documentdb/ClusterItemBase.ts Numeric-aware sort for database names
src/tree/discovery-view/DiscoveryBranchDataProvider.ts Numeric-aware sort for discovery root items by id
src/tree/connections-view/LocalEmulators/LocalEmulatorsItem.ts Numeric-aware sorts for emulator folders/connections
src/tree/connections-view/FolderItem.ts Numeric-aware sorts for folders and connections
src/tree/connections-view/ConnectionsBranchDataProvider.ts Numeric-aware sorts for root folders/connections
src/plugins/service-azure-vm/discovery-wizard/SelectVMStep.ts Numeric-aware sort for VM quick-picks
src/plugins/service-azure-vm/discovery-tree/AzureSubscriptionItem.ts Numeric-aware sort for discovered VM items
src/plugins/service-azure-vm/discovery-tree/AzureServiceRootItem.ts Numeric-aware sort for Azure subscriptions
src/plugins/service-azure-mongo-vcore/discovery-wizard/SelectClusterStep.ts Numeric-aware sort for cluster quick-picks
src/plugins/service-azure-mongo-vcore/discovery-tree/AzureSubscriptionItem.ts Numeric-aware sort for discovered accounts
src/plugins/service-azure-mongo-vcore/discovery-tree/AzureServiceRootItem.ts Numeric-aware sort for Azure subscriptions
src/plugins/service-azure-mongo-ru/discovery-wizard/SelectRUClusterStep.ts Numeric-aware sort for cluster quick-picks
src/plugins/service-azure-mongo-ru/discovery-tree/AzureMongoRUSubscriptionItem.ts Numeric-aware sort for discovered accounts
src/plugins/service-azure-mongo-ru/discovery-tree/AzureMongoRUServiceRootItem.ts Numeric-aware sort for Azure subscriptions
src/plugins/api-shared/azure/wizard/SelectSubscriptionStep.ts Numeric-aware sort for subscription selection quick-picks
src/plugins/api-shared/azure/subscriptionFiltering/InitializeFilteringStep.ts Numeric-aware sort for tenant lists
src/plugins/api-shared/azure/subscriptionFiltering/FilterSubscriptionSubStep.ts Numeric-aware sort for subscription filtering quick-picks
src/plugins/api-shared/azure/credentialsManagement/SelectAccountStep.ts Numeric-aware sort for account selection
src/plugins/api-shared/azure/credentialsManagement/AccountTenantsStep.ts Numeric-aware sort for tenant selection
src/commands/updateCredentials/PromptTenantStep.ts Numeric-aware sort for tenant quick-picks
src/commands/newConnection/PromptTenantStep.ts Numeric-aware sort for tenant quick-picks
src/commands/newConnection/PromptServiceDiscoveryStep.ts Numeric-aware sort for service provider quick-picks
src/commands/connections-view/moveItems/PromptTargetFolderStep.ts Numeric-aware sort for folder destination quick-picks
src/commands/chooseDataMigrationExtension/chooseDataMigrationExtension.ts Numeric-aware sort for migration provider quick-picks
src/commands/addDiscoveryRegistry/PromptRegistryStep.ts Numeric-aware sort for discovery registry provider quick-picks

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