Skip to content

Refactor azure sub dropdown property and add multi select dropdown#1604

Merged
bigfluffycookie merged 4 commits intomainfrom
lb/ref
Nov 12, 2025
Merged

Refactor azure sub dropdown property and add multi select dropdown#1604
bigfluffycookie merged 4 commits intomainfrom
lb/ref

Conversation

@bigfluffycookie
Copy link
Copy Markdown
Contributor

Part of OPS-2860

@linear
Copy link
Copy Markdown

linear Bot commented Nov 12, 2025

@bigfluffycookie bigfluffycookie changed the title Lb/ref @bigfluffycookie Refactor azure sub dropdown property and add multi select dropdown Nov 12, 2025
@bigfluffycookie bigfluffycookie changed the title @bigfluffycookie Refactor azure sub dropdown property and add multi select dropdown Refactor azure sub dropdown property and add multi select dropdown Nov 12, 2025
@bigfluffycookie bigfluffycookie marked this pull request as ready for review November 12, 2025 12:48
Copilot AI review requested due to automatic review settings November 12, 2025 12:48
Copy link
Copy Markdown
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 refactors the Azure subscription dropdown property system to support both single and multi-select modes. The refactoring extracts common logic into reusable helper functions and introduces configuration-based dropdown creation.

Key changes:

  • Introduced a configuration-based approach for subscription dropdowns with SubscriptionDropdownConfig interface
  • Added support for multi-select subscription dropdowns alongside existing single-select functionality
  • Extracted common logic into helper functions (fetchSubscriptionsFromHostSession, createSubscriptionDropdown, getSubscriptionsDropdown)

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

Comment thread packages/blocks/azure/src/lib/common-properties.ts
Comment thread packages/blocks/azure/src/lib/common-properties.ts
Comment thread packages/blocks/azure/src/lib/common-properties.ts
Comment thread packages/blocks/azure/src/lib/common-properties.ts
Comment thread packages/blocks/azure/src/lib/common-properties.ts

export const subDropdown = Property.DynamicProperties({
displayName: '',
export interface SubscriptionDropdownConfig {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

its an attempt to avoid the duplication of 2 basically identical properties, the alternative is to just copy paste the subDropdown implementation and simply using staticmultiselect instead of staticdropdown but i like this a bit better

@sonarqubecloud
Copy link
Copy Markdown

@bigfluffycookie bigfluffycookie merged commit df9d451 into main Nov 12, 2025
21 checks passed
@bigfluffycookie bigfluffycookie deleted the lb/ref branch November 12, 2025 19:11
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.

3 participants