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. Fixes #13863 #13884

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

rusackas
Copy link
Member

SUMMARY

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:
  • 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

@junlincc
Copy link
Member

/testenv up

Copy link

@junlin-qa junlin-qa left a comment

Choose a reason for hiding this comment

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

tested locally with FF on and off. everything works as expected. thanks for the fix!!

@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #13884 (86c68d9) into fix/13863 (9d6832d) will decrease coverage by 0.22%.
The diff coverage is 100.00%.

❗ Current head 86c68d9 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              @@
##           fix/13863   #13884      +/-   ##
=============================================
- Coverage      77.55%   77.33%   -0.23%     
=============================================
  Files            935      935              
  Lines          47301    47305       +4     
  Branches        5907     5913       +6     
=============================================
- Hits           36685    36581     -104     
- Misses         10472    10580     +108     
  Partials         144      144              
Flag Coverage Δ
cypress 56.03% <100.00%> (-0.01%) ⬇️
hive ?
javascript 63.72% <66.66%> (-0.01%) ⬇️
presto ?

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

Impacted Files Coverage Δ
...d/components/DashboardBuilder/DashboardBuilder.tsx 95.34% <100.00%> (+0.22%) ⬆️
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 74.23% <0.00%> (-16.54%) ⬇️
superset/db_engine_specs/presto.py 81.79% <0.00%> (-6.49%) ⬇️
superset-frontend/src/filters/utils.ts 95.23% <0.00%> (-4.77%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/connectors/sqla/models.py 89.87% <0.00%> (-0.61%) ⬇️
superset/db_engine_specs/base.py 86.65% <0.00%> (-0.46%) ⬇️
superset/models/core.py 89.10% <0.00%> (-0.28%) ⬇️

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.

@github-actions
Copy link
Contributor

@junlincc Ephemeral environment spinning up at http://54.202.59.139:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

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

LGTM

@junlincc junlincc added the need:merge The PR is ready to be merged label Mar 31, 2021
@rusackas rusackas merged commit 567df1f into apache:fix/13863 Mar 31, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need:merge The PR is ready to be merged preset-io size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants