Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use SplitButton for repo page Add Workspace buttons #4062

Merged
merged 9 commits into from
Aug 30, 2024

Conversation

zeucapua
Copy link
Contributor

@zeucapua zeucapua commented Aug 28, 2024

Description

Implements the SplitButton component to combine the 'Add to Workspace' and 'Create Workspace from SBOM' buttons on desktop. Adds a new optional 'icon' prop to SplitButton.

Note: this is only for the desktop view. On mobile we are using the Drawer component which requires its own trigger button, so it can't be separated to an external trigger.

Related Tickets & Documents

Closes #3942

Mobile & Desktop Screenshots/Recordings

Arc.mp4

Steps to QA

Tier (staff will fill in)

  • Tier 1
  • Tier 2
  • Tier 3
  • Tier 4

[optional] What gif best describes this PR or how it makes you feel?

Copy link

netlify bot commented Aug 28, 2024

Deploy Preview for oss-insights ready!

Name Link
🔨 Latest commit dd181f9
🔍 Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/66d22767ff1e5e0008b3865b
😎 Deploy Preview https://deploy-preview-4062--oss-insights.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 28, 2024

Deploy Preview for design-insights ready!

Name Link
🔨 Latest commit dd181f9
🔍 Latest deploy log https://app.netlify.com/sites/design-insights/deploys/66d227671ae3db0008206ac1
😎 Deploy Preview https://deploy-preview-4062--design-insights.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@zeucapua zeucapua requested a review from a team August 28, 2024 21:33
Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Not specific to this PR but since it's the first usage of the split button component, the shifting should get sorted out either in a separate PR or this one.

pages/s/[org]/[repo]/index.tsx Show resolved Hide resolved
@zeucapua
Copy link
Contributor Author

It shouldn't shift now; aligned the dropdown menu to "end", bringing it more towards the center of the page

image

Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

It's line up now component wise, but there is still some side shifting. Happy to pair if you want. We have our sync now anyway.

CleanShot 2024-08-29 at 14 51 55

@zeucapua
Copy link
Contributor Author

zeucapua commented Aug 30, 2024

Looks like under the hood, radix uses the react-remove-scroll package to remove scrolling when the Dropdown/SingleSelect is opened. The fix to keep the scroll is to set the prop modal={false} on the root components.

Context: radix-ui/primitives#1100

Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Works great! Thanks @zeucapua! 🚢

CleanShot 2024-08-30 at 16 29 13

@zeucapua zeucapua added this pull request to the merge queue Aug 30, 2024
Merged via the queue into beta with commit 6cf13e6 Aug 30, 2024
13 checks passed
@zeucapua zeucapua deleted the feat/repo-page-workspace-split branch August 30, 2024 21:10
open-sauced bot pushed a commit that referenced this pull request Aug 30, 2024
## [2.62.0-beta.1](v2.61.0...v2.62.0-beta.1) (2024-08-30)

### 🍕 Features

* use `SplitButton` for repo page Add Workspace buttons ([#4062](#4062)) ([6cf13e6](6cf13e6))
open-sauced bot pushed a commit that referenced this pull request Sep 10, 2024
## [2.62.0](v2.61.0...v2.62.0) (2024-09-10)

### 🍕 Features

* use `SplitButton` for repo page Add Workspace buttons ([#4062](#4062)) ([6cf13e6](6cf13e6))

### 🐛 Bug Fixes

* correct no insights message on contributor insights ([#4090](#4090)) ([49dfa03](49dfa03))
* fixed dropdown styling ([#4077](#4077)) ([4fa8b7f](4fa8b7f))
* use custom error component with Sentry error reporting for 500s ([#4078](#4078)) ([c3fd10e](c3fd10e))
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.

Feature: Use Split Button Component for SBOM and Repository Workspace Creation on Repository Page
3 participants