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

chore: Removes direct theme imports #19368

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Removes remaining direct theme imports to make the components themeable. Test files are not affected.

This PR also disables the no-restricted-imports lint rule in test files since legacy tests are importing the theme directly.

TESTING INSTRUCTIONS

1 - Execute all tests
2 - All tests should pass

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

<ToastContainer />
</div>
</ThemeProvider>
<div className="App SqlLab">
Copy link
Member Author

Choose a reason for hiding this comment

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

ThemeProvider is already being set in src/SqlLab/App.jsx

@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #19368 (e3959b4) into master (a39dd44) will increase coverage by 0.19%.
The diff coverage is 100.00%.

❗ Current head e3959b4 differs from pull request most recent head ff9ec19. Consider uploading reports for the commit ff9ec19 to get more accurate results

@@            Coverage Diff             @@
##           master   #19368      +/-   ##
==========================================
+ Coverage   66.48%   66.67%   +0.19%     
==========================================
  Files        1670     1676       +6     
  Lines       63958    64717     +759     
  Branches     6506     6506              
==========================================
+ Hits        42525    43153     +628     
- Misses      19747    19878     +131     
  Partials     1686     1686              
Flag Coverage Δ
javascript 51.32% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...erset-frontend/src/SqlLab/components/App/index.jsx 55.55% <ø> (ø)
superset-frontend/src/components/Icons/Icon.tsx 95.23% <ø> (ø)
...rc/views/CRUD/alert/components/AlertStatusIcon.tsx 30.55% <ø> (ø)
...c/SqlLab/components/RunQueryActionButton/index.tsx 51.72% <100.00%> (+1.72%) ⬆️
...t-frontend/src/components/CertifiedBadge/index.tsx 100.00% <100.00%> (ø)
...tiveFilters/FilterBar/FilterSets/FilterSetUnit.tsx 92.85% <100.00%> (+0.54%) ⬆️
...re/components/controls/DatasourceControl/index.jsx 72.36% <100.00%> (ø)
superset/cli/test.py 83.72% <0.00%> (-10.22%) ⬇️
superset/initialization/__init__.py 90.90% <0.00%> (-0.32%) ⬇️
superset/utils/pandas_postprocessing/utils.py 96.49% <0.00%> (-0.07%) ⬇️
... and 17 more

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 a39dd44...ff9ec19. Read the comment docs.

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM!

@michael-s-molina michael-s-molina force-pushed the remove-theme-direct-references branch from e3959b4 to ff9ec19 Compare March 28, 2022 16:40
@michael-s-molina michael-s-molina merged commit 816a2c3 into apache:master Mar 29, 2022
villebro pushed a commit that referenced this pull request Apr 3, 2022
@michael-s-molina michael-s-molina added the global:theming Related to theming Superset label Apr 7, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ 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 lts-v1 size/M 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants