Skip to content

refactor(components): resolve buttons' nested structure #18840

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

Open
wants to merge 2 commits into
base: edge
Choose a base branch
from

Conversation

koji
Copy link
Contributor

@koji koji commented Jul 6, 2025

Overview

use Btn as the base component to resolve buttons' nested structure

close AUTH-2038

Test Plan and Hands on Testing

compare storybooks
edge
https://s3-us-west-2.amazonaws.com/opentrons-components/edge/index.html?path=/story/helix-atoms-buttons--alt-primary-button

this branch

Changelog

  • update primary button, alter primary butotn, and alt primary button
  • update their tests

Review requests

Risk assessment

low

use Btn as the base component to resolve buttons' nested structure

close AUTH-2038
@koji koji marked this pull request as ready for review July 6, 2025 00:22
@koji koji requested review from a team as code owners July 6, 2025 00:22
Copy link

codecov bot commented Jul 6, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 62.81%. Comparing base (541de46) to head (f8e47ae).
Report is 5 commits behind head on edge.

Files with missing lines Patch % Lines
components/src/atoms/buttons/AltPrimaryButton.tsx 0.00% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             edge   #18840       +/-   ##
===========================================
+ Coverage   27.12%   62.81%   +35.68%     
===========================================
  Files        3250     3250               
  Lines      257453   257660      +207     
  Branches    26841    32757     +5916     
===========================================
+ Hits        69835   161845    +92010     
+ Misses     187596    95617    -91979     
- Partials       22      198      +176     
Flag Coverage Δ
protocol-designer 19.16% <50.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...omponents/src/atoms/buttons/AlertPrimaryButton.tsx 100.00% <100.00%> (ø)
components/src/atoms/buttons/PrimaryButton.tsx 100.00% <100.00%> (ø)
components/src/atoms/buttons/AltPrimaryButton.tsx 60.00% <0.00%> (-40.00%) ⬇️

... and 1699 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

background-color: ${COLORS.red50};
border-radius: ${BORDERS.borderRadius8};
padding-left: ${SPACING.spacing16};
padding-right: ${SPACING.spacing16};
padding: ${SPACING.spacing8} ${SPACING.spacing16};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we intentionally add top/bottom padding of 8px here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the button doesn't enough height without the top and bottom padding.

@koji koji requested a review from ncdiehl11 July 8, 2025 22:39
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.

2 participants