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: consistent left margin for dashboard layout. #13905

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

rusackas
Copy link
Member

@rusackas rusackas commented Apr 1, 2021

SUMMARY

Oops! Erroneously merged this to a feature branch instead of master. Ugh.
See #13884 for a history/comments, and prior approvals.

A recent PR, #13723, made some changes around how the sidebar works for the native filter features. This looks great when the feature flag is on, but when the feature flag is off, we lose the left margin, as reported in #13863.

This PR makes sure the styling is consistent, by considering feature flag setting, and only toggling off dashboardFiltersOpen (which sets the margin) when the feature is indeed enabled.

@simcha90 if you have a more elegant way to tackle this, or ideas for sufficient testing to cover this possible regression, please let me know your thoughts.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE (DASHBOARD_NATIVE_FILTERS set to False):
image

AFTER (DASHBOARD_NATIVE_FILTERS set to False):
image
image

AFTER (DASHBOARD_NATIVE_FILTERS set to True):
Toggling

TEST PLAN

Verified that the margin is restored, in view and edit mode, with the DASHBOARD_NATIVE_FILTERS flag on and off.

ADDITIONAL INFORMATION

  • Has associated issue: Fixes [dashboard] No left padding in dashboard #13863
  • 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

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

thanks!

@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #13905 (89e2ac2) into master (9d6832d) will increase coverage by 0.21%.
The diff coverage is 86.84%.

❗ Current head 89e2ac2 differs from pull request most recent head 4da64ce. Consider uploading reports for the commit 4da64ce to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13905      +/-   ##
==========================================
+ Coverage   77.55%   77.77%   +0.21%     
==========================================
  Files         935      935              
  Lines       47301    47303       +2     
  Branches     5907     5916       +9     
==========================================
+ Hits        36685    36788     +103     
+ Misses      10472    10372     -100     
+ Partials      144      143       -1     
Flag Coverage Δ
cypress 56.03% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...frontend/src/components/DatabaseSelector/index.tsx 92.70% <ø> (+1.04%) ⬆️
...et-frontend/src/components/TableSelector/index.tsx 84.92% <ø> (ø)
...src/dashboard/components/dnd/handleScroll/index.ts 73.33% <ø> (ø)
...re/components/controls/DatasourceControl/index.jsx 86.84% <ø> (ø)
...controls/DndColumnSelectControl/DndSelectLabel.tsx 35.00% <ø> (ø)
...trols/DndColumnSelectControl/components/Option.tsx 50.00% <ø> (ø)
...ents/controls/FilterControl/AdhocFilterControl.jsx 60.00% <ø> (ø)
...Control/AdhocFilterEditPopoverSimpleTabContent.jsx 74.83% <ø> (ø)
...terControl/AdhocFilterEditPopoverSqlTabContent.jsx 63.33% <ø> (ø)
...nents/controls/FilterControl/AdhocFilterOption.jsx 100.00% <ø> (ø)
... and 28 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 9d6832d...4da64ce. Read the comment docs.

@etr2460 etr2460 merged commit a7f48c6 into apache:master Apr 1, 2021
@rusackas rusackas deleted the fix/13863 branch April 1, 2021 04:36
etr2460 pushed a commit to airbnb/superset-fork that referenced this pull request Apr 1, 2021
amitmiran137 pushed a commit that referenced this pull request Apr 2, 2021
* master: (26 commits)
  chore: bump to new superset-ui version (#13932)
  fix: do not run containers as root by default in Helm chart (#13917)
  feat(explore): adhoc column formatting for Table chart (#13758)
  fix(sqla-query): order by aggregations in Presto and Hive (#13739)
  feat(alert/report): add ALERTS_ATTACH_REPORTS feature flags + feature (#13894)
  test: Fixes PropertiesModal_spec (#13548)
  fix: Pin Prophet dependency after breaking changes (#13852)
  test: Adds tests to dnd controls (#13650)
  test: Adds tests to the AnnotationLayer component (#13748)
  test: Refactor and enhance tests for the Explore DatasourcePanel Component (#13799)
  Add tests (#13778)
  test: DisplayQueryButton (#13750)
  Fixing condition around left margin for dashboard layout. Fixes #13863 (#13905)
  Revert "fix: select table overlay (#13694)" (#13901)
  test: Adds tests to the OptionControls component (#13729)
  test: DatasourceControl (#13605)
  tests for function handleScroll (#13896)
  test: Adds tests to the CustomFrame component (#13675)
  test: Adds tests to the AdvancedFrame component (#13664)
  test: DataTableControl (#13668)
  ...
@junlincc junlincc added #bug:blocking! Blocking issues with high priority and removed #bug:blocking! Blocking issues with high priority labels Apr 8, 2021
@yousoph
Copy link
Member

yousoph commented Apr 8, 2021

🏷️ 2021.13

henryyeh pushed a commit to preset-io/superset that referenced this pull request Apr 9, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.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/S 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dashboard] No left padding in dashboard
5 participants