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(dashboard): custom css should be removed on unmount #15025

Merged
merged 4 commits into from
Jun 7, 2021

Conversation

suddjian
Copy link
Member

@suddjian suddjian commented Jun 7, 2021

SUMMARY

Unmounts custom dashboard css when the dashboard page unmounts

Cleaned up the DashboardPage logic a bit to be clearer

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before (after viewing a dashboard that sets span { background: pink }):

Screen Shot 2021-06-07 at 12 40 12 PM

after:

Screen Shot 2021-06-07 at 12 41 20 PM

TESTING INSTRUCTIONS

  1. Turn React Crud View on
  2. Navigate to a dashboard with custom css that could effect several pages
  3. Navigate to any other SPA page (currently list views or homepage)

ADDITIONAL INFORMATION

@codecov
Copy link

codecov bot commented Jun 7, 2021

Codecov Report

Merging #15025 (75e486d) into master (7f4e036) will decrease coverage by 0.01%.
The diff coverage is 42.85%.

❗ Current head 75e486d differs from pull request most recent head 9bc0723. Consider uploading reports for the commit 9bc0723 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15025      +/-   ##
==========================================
- Coverage   77.53%   77.51%   -0.02%     
==========================================
  Files         966      966              
  Lines       49590    49606      +16     
  Branches     6293     6307      +14     
==========================================
+ Hits        38451    38454       +3     
- Misses      10937    10950      +13     
  Partials      202      202              
Flag Coverage Δ
javascript 72.58% <42.85%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
...rontend/src/dashboard/containers/DashboardPage.tsx 0.00% <0.00%> (ø)
...set-frontend/src/dashboard/util/injectCustomCss.ts 87.50% <81.81%> (ø)
...tend/src/visualizations/FilterBox/controlPanel.jsx 0.00% <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 7f4e036...9bc0723. Read the comment docs.

@suddjian suddjian merged commit cf15fe0 into apache:master Jun 7, 2021
@suddjian suddjian deleted the fix-dashboard-theming-spa branch June 7, 2021 21:05
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request Jun 8, 2021
* upstream/master:
  fix(explore): Datepicker glitch on hover outside the modal (apache#15033)
  Add ming-height to empty tab (apache#14878)
  Remove nowrap (apache#14954)
  display all metric results in editor (apache#15031)
  feat: Add "is_select_query" method to base engine spec to make it possible to override it (apache#15013)
  fix(dashboard): custom css should be removed on unmount (apache#15025)
  feat(filter-box): hide druid options if druid not enabled (apache#14921)
  fix: adding additional configs and colors for queryHistory (apache#14995)
  chore: rename 'Source' to 'Database' for consistency (apache#15021)
  chore(ci): fix ci conflict (apache#15016)
  fix(native-filters): avoid double load on initialization (apache#15012)
  feat(native-filters): Support default to first value in select filter (apache#14869)
  docs: required information for OAuth2 configuration (apache#15010)
  Update index.mdx (apache#14990)
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* fix(dashboard): custom css should be removed on unmount

* better comment

* remove unnecessary typecast

* move type to top level scope
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* fix(dashboard): custom css should be removed on unmount

* better comment

* remove unnecessary typecast

* move type to top level scope
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* fix(dashboard): custom css should be removed on unmount

* better comment

* remove unnecessary typecast

* move type to top level scope
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CSS template]don't apply CSS template on menu, submenu and page background
3 participants