Skip to content

ref(project-creation): Sort SCM providers and integrations by display order#118589

Open
jaydgoss wants to merge 2 commits into
jaygoss/scm-back-to-recommended-analyticsfrom
jaygoss/scm-provider-sort
Open

ref(project-creation): Sort SCM providers and integrations by display order#118589
jaydgoss wants to merge 2 commits into
jaygoss/scm-back-to-recommended-analyticsfrom
jaygoss/scm-provider-sort

Conversation

@jaydgoss

@jaydgoss jaydgoss commented Jun 26, 2026

Copy link
Copy Markdown
Member

TLDR

Order both the providers and the active integrations returned by useScmProviders the same way ScmProviderPills displays them (primary providers first, then the rest), so consumers list them consistently and activeIntegrationExisting prioritizes a primary provider.

Details

  • Add a shared scmProviderOrder.ts: a sortByScmProviderOrder helper that stable-sorts by provider key (the primary keys github, gitlab, bitbucket first in that order, then the rest in their original order), plus partitionScmProviders for ScmProviderPills' pills vs. "More" dropdown split.
  • ScmProviderPills uses partitionScmProviders instead of its own inline split.
  • useScmProviders returns both scmProviders and activeIntegrations in that order. Since activeIntegrationExisting is the first active integration, it now prioritizes a primary provider too.

@jaydgoss jaydgoss requested a review from a team as a code owner June 26, 2026 19:58
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 26, 2026
@jaydgoss jaydgoss marked this pull request as draft June 26, 2026 20:01
… order

Add a shared sortByScmProviderOrder helper (primary keys github, gitlab, bitbucket first, then the rest in original order) plus partitionScmProviders for ScmProviderPills. useScmProviders returns both scmProviders and activeIntegrations in that order, so activeIntegrationExisting (the first active integration) prioritizes a primary provider. ScmProviderPills uses the shared partition.
@jaydgoss jaydgoss force-pushed the jaygoss/scm-provider-sort branch from 07f00c7 to a10c61b Compare June 26, 2026 20:06
@jaydgoss jaydgoss changed the title ref(project-creation): Sort SCM providers to match the pill order ref(project-creation): Sort SCM providers and integrations by display order Jun 26, 2026
…vider

Verify the provider sort is stable: two GitHub integrations with different ids and names keep their input order, so activeIntegrationExisting stays the first one.
@jaydgoss jaydgoss marked this pull request as ready for review June 26, 2026 20:41
@jaydgoss jaydgoss requested a review from a team June 26, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants