Skip to content

ref(onboarding): Move less common SCM providers into a More dropdown#112730

Merged
jaydgoss merged 13 commits intomasterfrom
jaygoss/vdy-69-scm-more-dropdown
Apr 16, 2026
Merged

ref(onboarding): Move less common SCM providers into a More dropdown#112730
jaydgoss merged 13 commits intomasterfrom
jaygoss/vdy-69-scm-more-dropdown

Conversation

@jaydgoss
Copy link
Copy Markdown
Member

Summary

  • Split the SCM provider selector into primary pills (GitHub, GitLab, Bitbucket) and a "More" dropdown for less common providers (Bitbucket Server, GitHub Enterprise, Azure DevOps)
  • Reduces visual noise on the connect step

Stacks on #112696.

Refs VDY-69

Test plan

  • Verify primary providers render as top-level pill buttons
  • Verify secondary providers appear in the "More" dropdown
  • Verify clicking a dropdown item triggers the OAuth install flow
  • Verify "More" dropdown does not appear when only primary providers exist

@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 10, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 10, 2026
Base automatically changed from jaygoss/vdy-69-scm-onboarding-ui-cleanup-from-design-review to master April 10, 2026 20:30
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-69-scm-more-dropdown branch from 5a4a74b to eee92d8 Compare April 10, 2026 20:33
@jaydgoss jaydgoss changed the title ref(onboarding): Move secondary SCM providers into a More dropdown ref(onboarding): Move less popular SCM providers into a More dropdown Apr 10, 2026
@jaydgoss jaydgoss changed the title ref(onboarding): Move less popular SCM providers into a More dropdown ref(onboarding): Move less common SCM providers into a More dropdown Apr 10, 2026
@jaydgoss jaydgoss marked this pull request as ready for review April 10, 2026 21:21
@jaydgoss jaydgoss requested a review from a team as a code owner April 10, 2026 21:21
@jaydgoss jaydgoss marked this pull request as draft April 10, 2026 21:25
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Grid template always includes extra column for dropdown
    • The md breakpoint grid template now appends the min-content column only when moreProviders.length > 0, matching the conditional More dropdown and removing the stray trailing gap.

Create PR

Or push these changes by commenting:

@cursor push 103fdb31ff
Preview (103fdb31ff)
diff --git a/static/app/views/onboarding/components/scmProviderPills.tsx b/static/app/views/onboarding/components/scmProviderPills.tsx
--- a/static/app/views/onboarding/components/scmProviderPills.tsx
+++ b/static/app/views/onboarding/components/scmProviderPills.tsx
@@ -28,7 +28,9 @@
         columns={{
           xs: '1fr 1fr',
           md: primaryProviders.length
-            ? `repeat(${primaryProviders.length}, 1fr) min-content`
+            ? moreProviders.length > 0
+              ? `repeat(${primaryProviders.length}, 1fr) min-content`
+              : `repeat(${primaryProviders.length}, 1fr)`
             : 'min-content',
         }}
         rows={{xs: 2}}

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Comment thread static/app/views/onboarding/components/scmProviderPills.tsx Outdated
Comment thread static/app/views/onboarding/components/scmProviderPills.tsx Outdated
@jaydgoss jaydgoss marked this pull request as ready for review April 10, 2026 22:13
@jaydgoss jaydgoss requested a review from a team April 13, 2026 17:28
@jaydgoss jaydgoss force-pushed the jaygoss/vdy-69-scm-more-dropdown branch from 9ea1f40 to 422a4e6 Compare April 15, 2026 16:43
Comment thread static/app/views/onboarding/components/scmProviderPills.tsx Outdated
Comment on lines +10 to +40
function makeBitbucketProvider(): IntegrationProvider {
return GitHubIntegrationProviderFixture({
key: 'bitbucket',
slug: 'bitbucket',
name: 'Bitbucket',
});
}

function makeBitbucketServerProvider(): IntegrationProvider {
return GitHubIntegrationProviderFixture({
key: 'bitbucket_server',
slug: 'bitbucket_server',
name: 'Bitbucket Server',
});
}

function makeGitHubEnterpriseProvider(): IntegrationProvider {
return GitHubIntegrationProviderFixture({
key: 'github_enterprise',
slug: 'github_enterprise',
name: 'GitHub Enterprise',
});
}

function makeAzureDevOpsProvider(): IntegrationProvider {
return GitHubIntegrationProviderFixture({
key: 'vsts',
slug: 'vsts',
name: 'Azure DevOps',
});
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we need the factor functions, are we mutating them? can we just instantiate and reuse the objects?

Comment on lines +80 to +88
expect(
screen.getByRole('menuitemradio', {name: /bitbucket server/i})
).toBeInTheDocument();
expect(
screen.getByRole('menuitemradio', {name: /github enterprise/i})
).toBeInTheDocument();
expect(
screen.getByRole('menuitemradio', {name: /azure devops/i})
).toBeInTheDocument();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I hate this thing AI does where it just wants to use regex for everything. We know what these should be, no need to use regex.

Split the provider selector into primary pills (GitHub, GitLab,
Bitbucket) and a "More" dropdown for less common providers (Bitbucket
Server, GitHub Enterprise, Azure DevOps) to reduce visual noise.

Refs VDY-69
Wrap provider buttons in a Grid with 1fr columns so primary providers
are equal width. The "More" dropdown uses min-content to stay at its
natural size. Grid is inside a centered Flex so it shrinks to fit
rather than stretching to the full container.
Move the "More" providers dropdown and its ProviderFlowSetup helper
into scmProvidersDropdown.tsx, keeping scmProviderPills.tsx focused
on layout. Prefix all types and components with Scm for consistency.
…viders

Use jest.spyOn for window.open mock so it auto-restores via
afterEach, and move flowMapRef write into useEffect so it runs
at commit time instead of during render.
Merge ScmProvidersDropdown back into ScmProviderPills to keep the
dropdown logic colocated with the provider layout. Also clean up
the grid column template into readable variables.
…opdown

Now that useAddIntegration accepts params at startFlow() call time,
remove the ScmProviderFlowSetup invisible-component pattern and its
ref map. The dropdown onAction calls startFlow directly with the
selected provider.
Comment thread static/app/views/onboarding/components/scmProviderPills.tsx
Replace factory functions with module-level constants and use exact
strings instead of regex in test selectors.
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e8fbe44. Configure here.

Comment thread static/app/views/onboarding/components/scmProviderPills.tsx Outdated
The xs column count used the total number of providers, but secondary
providers collapse into a single More dropdown. This could produce more
columns than grid children, e.g. half-width dropdown with 0 primary and
2+ secondary providers. Use actual grid item count instead, consistent
with how columnsMd already works.
@jaydgoss jaydgoss merged commit 71f5b48 into master Apr 16, 2026
65 checks passed
@jaydgoss jaydgoss deleted the jaygoss/vdy-69-scm-more-dropdown branch April 16, 2026 15:48
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.

3 participants