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

refactor(dashboard): [chart-maximize-mode]put chart full-size state in redux #15384

Merged
merged 2 commits into from Jul 2, 2021

Conversation

stephenLYZ
Copy link
Member

SUMMARY

Currently, the zIndex of dashboard's content is 1, which is lower than dashboard's title panel(2). We should set that to higher in chart maximize mode. In order to achieve this requirement, I put the full-size state in redux so that the parent element can get this.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

2021-06-25.4.08.04.mov

after

2021-06-25.4.09.07.mov

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

@amitmiran137
Copy link
Member

could you fix test?

@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #15384 (f32ea03) into master (000a038) will increase coverage by 18.16%.
The diff coverage is n/a.

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

@@             Coverage Diff             @@
##           master   #15384       +/-   ##
===========================================
+ Coverage   58.93%   77.09%   +18.16%     
===========================================
  Files         373      975      +602     
  Lines       12014    50663    +38649     
  Branches     2945     6224     +3279     
===========================================
+ Hits         7080    39059    +31979     
- Misses       4755    11393     +6638     
- Partials      179      211       +32     
Flag Coverage Δ
javascript 71.61% <ø> (?)

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

Impacted Files Coverage Δ
...nd/src/explore/components/ExploreViewContainer.jsx 2.15% <0.00%> (-44.33%) ⬇️
superset-frontend/src/explore/store.js 57.14% <0.00%> (-35.17%) ⬇️
superset-frontend/src/featureFlags.ts 66.66% <0.00%> (-25.00%) ⬇️
...set-frontend/src/dashboard/reducers/datasources.js 36.36% <0.00%> (-20.78%) ⬇️
superset-frontend/src/SqlLab/components/App.jsx 57.14% <0.00%> (-20.64%) ⬇️
...t-frontend/src/dashboard/reducers/sliceEntities.js 87.50% <0.00%> (-12.50%) ⬇️
superset-frontend/src/explore/controls.jsx 28.57% <0.00%> (-11.58%) ⬇️
...ashboard/components/gridComponents/ChartHolder.jsx 68.13% <0.00%> (-11.53%) ⬇️
superset-frontend/src/components/ListView/utils.ts 85.12% <0.00%> (-9.33%) ⬇️
...c/dashboard/components/gridComponents/Markdown.jsx 82.82% <0.00%> (-8.96%) ⬇️
... and 1117 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 5f96e63...9d8e873. Read the comment docs.

grid-column: 2;
grid-row: 2;
z-index: 1;
z-index: ${({ fullSizeChartId }) => (fullSizeChartId ? 1000 : 1)};
Copy link
Contributor

@simcha90 simcha90 Jun 29, 2021

Choose a reason for hiding this comment

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

I think z-index: 2 also enough, I think better not to use big zIndexes because if need later override them it will be more difficult

Copy link
Member

Choose a reason for hiding this comment

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

I'd like to make a place to store z-index values as constants so that they are all collected in one place and can be adjusted and compared easily. Maybe this PR isn't the place to do that though.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agreed. There seems to be no place to manage all z-index values.

@simcha90
Copy link
Contributor

Other things look ok, checked on local env, after this fix can be merged

@amitmiran137 amitmiran137 added v1.3 and removed v1.3 labels Jun 29, 2021
Copy link
Member

@suddjian suddjian 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!

@amitmiran137 amitmiran137 merged commit 81633e9 into apache:master Jul 2, 2021
amitmiran137 pushed a commit that referenced this pull request Jul 4, 2021
…n redux (#15384)

* refactor(dashboard): [chart-maximize-mode]put full-size status to redux

* fix: ci

(cherry picked from commit 81633e9)
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
…n redux (apache#15384)

* refactor(dashboard): [chart-maximize-mode]put full-size status to redux

* fix: ci
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
…n redux (apache#15384)

* refactor(dashboard): [chart-maximize-mode]put full-size status to redux

* fix: ci
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
…n redux (apache#15384)

* refactor(dashboard): [chart-maximize-mode]put full-size status to redux

* fix: ci
@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 size/M v1.3 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants