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

Use sx theme color functions #3161

Merged
merged 3 commits into from
Jun 28, 2024
Merged

Use sx theme color functions #3161

merged 3 commits into from
Jun 28, 2024

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Jun 10, 2024

This change is Reviewable

@imnasnainaec imnasnainaec added frontend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. Size: S Small sized issue labels Jun 10, 2024
@imnasnainaec imnasnainaec self-assigned this Jun 10, 2024
Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 75.13%. Comparing base (30509ca) to head (18da217).

Files Patch % Lines
src/components/ProjectExport/DownloadButton.tsx 0.00% 3 Missing ⚠️
...mponents/AnnouncementBanner/AnnouncementBanner.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3161      +/-   ##
==========================================
+ Coverage   75.08%   75.13%   +0.05%     
==========================================
  Files         275      275              
  Lines       10413    10422       +9     
  Branches     1231     1232       +1     
==========================================
+ Hits         7819     7831      +12     
+ Misses       2235     2233       -2     
+ Partials      359      358       -1     
Flag Coverage Δ
backend 84.24% <ø> (+0.10%) ⬆️
frontend 66.98% <73.33%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jasonleenaylor
Copy link
Contributor

src/components/AnnouncementBanner/AnnouncementBanner.tsx line 56 at r2 (raw file):

        <Cancel />
      </IconButton>
      <Box sx={{ width: theme.spacing(2) }} />

This might be able to use the same method.

Code quote:

theme.spacing(2)

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 7 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit 2e5d278 into master Jun 28, 2024
18 checks passed
@imnasnainaec imnasnainaec deleted the theme-colors branch June 28, 2024 18:28
@imnasnainaec
Copy link
Collaborator Author

src/components/AnnouncementBanner/AnnouncementBanner.tsx line 56 at r2 (raw file):

        <Cancel />
      </IconButton>
      <Box sx={{ width: theme.spacing(2) }} />

This might be able to use the same method.

Code quote:

theme.spacing(2)

True. In fact, the MUI documentation indicates I should be able to just use width: 2 in sx and the theme.spacing will be understood. However, when I try it, it's treating it like "2px" as if it were a style. So for now (and since there are so many more of these theme.spacing(#) uses), I'm leaving that for a later refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. Size: S Small sized issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants