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

feat(linting): restrict direct use of supersetTheme in favor of ThemeProvider #17001

Merged
merged 2 commits into from
Oct 7, 2021

Conversation

rusackas
Copy link
Member

@rusackas rusackas commented Oct 7, 2021

SUMMARY

This PR adds linting to restrict use of the supersetTheme from direct import/use, instead preferring useTheme or withTheme or any other direct theme usage via the ThemeProvider.

In this PR, it's set to warn, so we can sweep up (or add lint override comments) for any offending instances, and then open up another PR to put it into an error state and lock things down.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

@codecov
Copy link

codecov bot commented Oct 7, 2021

Codecov Report

Merging #17001 (9a7ea40) into master (cde4cdc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17001   +/-   ##
=======================================
  Coverage   76.93%   76.93%           
=======================================
  Files        1030     1030           
  Lines       55031    55031           
  Branches     7465     7465           
=======================================
  Hits        42336    42336           
  Misses      12441    12441           
  Partials      254      254           
Flag Coverage Δ
hive 81.45% <ø> (ø)
javascript 70.90% <ø> (ø)
mysql 81.90% <ø> (ø)
postgres 81.91% <ø> (ø)
presto 81.77% <ø> (ø)
python 82.41% <ø> (ø)
sqlite 81.58% <ø> (ø)

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

Impacted Files Coverage Δ
superset-frontend/src/preamble.ts 0.00% <ø> (ø)

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 cde4cdc...9a7ea40. 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! Thanks for the improvement!

@rusackas rusackas merged commit 5f73ca8 into master Oct 7, 2021
@rusackas rusackas deleted the restrict-use-of-supersetTheme-(warn) branch October 7, 2021 14:27
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
…Provider (apache#17001)

* feat: restrict direct use of supersetTheme

* allowing a couple of safe instances of supersetTheme
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
…Provider (apache#17001)

* feat: restrict direct use of supersetTheme

* allowing a couple of safe instances of supersetTheme
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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 preset-io size/M 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants