ref(onboarding): Move less common SCM providers into a More dropdown#112730
ref(onboarding): Move less common SCM providers into a More dropdown#112730
Conversation
5a4a74b to
eee92d8
Compare
There was a problem hiding this comment.
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.
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.
2de2a05 to
8dc5224
Compare
9ea1f40 to
422a4e6
Compare
| 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', | ||
| }); | ||
| } |
There was a problem hiding this comment.
do we need the factor functions, are we mutating them? can we just instantiate and reuse the objects?
| 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(); |
There was a problem hiding this comment.
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.
96fb9ab to
d649307
Compare
Replace factory functions with module-level constants and use exact strings instead of regex in test selectors.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
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.


Summary
Stacks on #112696.
Refs VDY-69
Test plan