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): Force native filters into vertical orientation when FF off #22265

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

codyml
Copy link
Member

@codyml codyml commented Nov 29, 2022

SUMMARY

The horizontal filter bar for native filters isn't currently fully hidden behind the HORIZONTAL_FILTER_BAR feature flag: the flag currently only controls whether the gear icon is shown in vertical mode. As such, if you enable the FF, change a dashboard's filter bar to horizontal, then disable the FF, the bar stays horizontal. This PR changes this behavior so if the FF is off, every filter bar will always display vertically.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before w/ FF off:
Screen Shot 2022-11-29 at 1 26 08 PM

After w/ FF off:
Screen Shot 2022-11-29 at 1 26 37 PM

TESTING INSTRUCTIONS

  • Check that the horizontal filter bar looks the same as before with the FF on
  • These steps need to be taken in an environment where you can control feature flags without resetting the DB, e.g. local dev instead of ephemeral env:
    • Turn on the FF and reload
    • Using the dev console, confirm that the FF is on by checking the value of window.featureFlags.HORIZONTAL_FILTER_BAR
    • Go to a dashboard and change the native filter bar orientation to horizontal
    • Turn off the FF and reload
    • Using the dev console, confirm that the FF is ff by checking the value of window.featureFlags.HORIZONTAL_FILTER_BAR
    • Confirm that the native filter bar orientation is vertical

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags: HORIZONTAL_FILTER_BAR
  • 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 Nov 29, 2022

Codecov Report

Merging #22265 (c595efc) into master (fb3e717) will increase coverage by 1.29%.
The diff coverage is 0.00%.

❗ Current head c595efc differs from pull request most recent head a58aaa5. Consider uploading reports for the commit a58aaa5 to get more accurate results

@@            Coverage Diff             @@
##           master   #22265      +/-   ##
==========================================
+ Coverage   65.54%   66.83%   +1.29%     
==========================================
  Files        1841     1841              
  Lines       70220    70220              
  Branches     7670     7672       +2     
==========================================
+ Hits        46027    46934     +907     
+ Misses      22211    21302     -909     
- Partials     1982     1984       +2     
Flag Coverage Δ
javascript 53.65% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...ages/superset-ui-core/src/query/types/Dashboard.ts 100.00% <ø> (ø)
...d/components/DashboardBuilder/DashboardBuilder.tsx 74.28% <0.00%> (-0.96%) ⬇️
...ilters/FilterBar/FilterControls/FilterControls.tsx 70.21% <0.00%> (-2.13%) ⬇️
superset/databases/api.py 93.53% <0.00%> (+0.30%) ⬆️
superset/sql_lab.py 82.12% <0.00%> (+0.38%) ⬆️
superset/views/base_api.py 98.44% <0.00%> (+0.38%) ⬆️
superset/db_engine_specs/presto.py 88.22% <0.00%> (+0.41%) ⬆️
superset/db_engine_specs/__init__.py 85.71% <0.00%> (+1.19%) ⬆️
superset/datasets/schemas.py 97.40% <0.00%> (+1.29%) ⬆️
superset/commands/exceptions.py 93.84% <0.00%> (+1.53%) ⬆️
... and 55 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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!

@geido geido merged commit 969c963 into apache:master Nov 29, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 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 size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants