Skip to content

Added toggle gradient and cleaned up the size #14518

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

Closed
wants to merge 5 commits into from

Conversation

annadoesdesign
Copy link
Contributor

Before:
Screenshot 2025-08-20 at 9 54 07 AM

After:
Screenshot 2025-08-20 at 9 53 57 AM

switch.mov

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Aug 20, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Aug 20, 2025
Copy link

alwaysmeticulous bot commented Aug 20, 2025

🔴 Meticulous spotted visual differences in 52 of 1395 screens tested: view and approve differences detected.

Meticulous evaluated ~8 hours of user flows against your PR.

Last updated for commit 8968b2f. This comment will update as new commits are pushed.

Copy link

codecov bot commented Aug 20, 2025

Bundle Report

Changes will decrease total bundle size by 817 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 28.5MB -817 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js -817 bytes 18.84MB -0.0%

Files in assets/index-*.js:

  • ./src/alchemy-components/components/Switch/Switch.tsx → Total Size: 2.01kB

  • ./src/alchemy-components/components/Switch/components.ts → Total Size: 2.61kB

Copy link

codecov bot commented Aug 20, 2025

Codecov Report

❌ Patch coverage is 34.61538% with 17 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...alchemy-components/components/Switch/components.ts 34.61% 17 Missing ⚠️

❌ Your patch status has failed because the patch coverage (34.61%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

📢 Thoughts on this report? Let us know!

left: getIconTransformPositionLeft(size, checked || false),
top: getIconTransformPositionTop(size),
({ checked }) => ({
left: checked ? '15px' : '1px',
Copy link
Collaborator

Choose a reason for hiding this comment

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

would the left offset be dependent on the size? were you able to test this for different sizes?

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Aug 20, 2025
@datahub-cyborg datahub-cyborg bot added needs-review Label for PRs that need review from a maintainer. and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Aug 21, 2025
@annadoesdesign
Copy link
Contributor Author

switch.mov

@jayacryl please take another look

@@ -32,40 +25,41 @@ export const SwitchContainer = styled.label<{ labelPosition: SwitchLabelPosition
);

export const Slider = styled.div<{ size?: SizeOptions; isSquare?: boolean; isDisabled?: boolean }>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

size isn't used anymore right? should we remove that prop?

@jayacryl
Copy link
Collaborator

I would just:

  1. Remove the size prop
  2. Make sure yarn lint is passing

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Aug 21, 2025
@annadoesdesign
Copy link
Contributor Author

closed and made a way more targeted approach: #14545

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-submitter-merge product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants