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

fix: Catch literal colors when theme top level #19571

Merged
merged 2 commits into from
Apr 8, 2022
Merged

fix: Catch literal colors when theme top level #19571

merged 2 commits into from
Apr 8, 2022

Conversation

geido
Copy link
Member

@geido geido commented Apr 6, 2022

SUMMARY

The eslint-plugin-theme-colors failed to catch literal colors when the theme was used top level in a styled component, such as:

const StyledFilterableTable = styled.div`
  ${({ theme }) => `
     color: 'red',
  `}
`;

This PR fixes that

TESTING INSTRUCTIONS

Run npm run _lint and make sure all literal colors are caught

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@geido geido added the global:theming Related to theming Superset label Apr 7, 2022
@codecov
Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #19571 (9e5781c) into master (761d5c4) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #19571   +/-   ##
=======================================
  Coverage   66.68%   66.68%           
=======================================
  Files        1681     1681           
  Lines       64316    64320    +4     
  Branches     6565     6565           
=======================================
+ Hits        42888    42894    +6     
  Misses      19733    19733           
+ Partials     1695     1693    -2     
Flag Coverage Δ
javascript 51.52% <ø> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...c/views/CRUD/data/database/DatabaseModal/index.tsx 32.79% <0.00%> (ø)
...ntend/packages/superset-ui-core/src/color/utils.ts 100.00% <0.00%> (+2.85%) ⬆️
...shboard/util/charts/getFormDataWithExtraFilters.ts 77.77% <0.00%> (+5.55%) ⬆️
...frontend/src/profile/components/CreatedContent.tsx 77.77% <0.00%> (+6.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 761d5c4...9e5781c. Read the comment docs.

@geido geido merged commit 16f193c into apache:master Apr 8, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels global:theming Related to theming Superset size/XS 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants