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

chore: Improves the native filters bar layout #15115

Merged

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented Jun 11, 2021

SUMMARY

Improves the native filters bar layout.

  • Makes the filter bar header stick to the top while scrolling
  • Fixes the filter bar rendering when closing the filters after scrolling
  • Moves the filter bar scroll from the panel to each tab
  • Adjusts the padding of the header and filters
  • Increases the padding and spacing of Filter Sets elements
  • Replace react-sticky with CSS to increase performance
  • Adjusts the tests
  • Renames the modal

Fixes #14973
Fixes #15002

@villebro @rusackas @kgabryje @junlincc

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

screen-recording-2021-06-11-at-72640-am_ifDlD0KH.mov
screen-recording-2021-06-11-at-73023-am_KxzcQ29x.mov

TESTING INSTRUCTIONS

See before/after videos for instructions.

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

@codecov
Copy link

codecov bot commented Jun 11, 2021

Codecov Report

Merging #15115 (574a801) into master (9ba2983) will decrease coverage by 0.07%.
The diff coverage is 88.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15115      +/-   ##
==========================================
- Coverage   77.25%   77.18%   -0.08%     
==========================================
  Files         969      969              
  Lines       49999    50042      +43     
  Branches     6424     6438      +14     
==========================================
- Hits        38629    38625       -4     
- Misses      11167    11214      +47     
  Partials      203      203              
Flag Coverage Δ
javascript 72.08% <88.63%> (-0.15%) ⬇️

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

Impacted Files Coverage Δ
...veFilters/FilterBar/FilterControls/FilterValue.tsx 68.81% <ø> (-1.08%) ⬇️
...eFilters/FiltersConfigModal/FiltersConfigModal.tsx 95.29% <ø> (ø)
...ntend/src/common/hooks/useElementOnScreen/index.ts 76.47% <76.47%> (ø)
...d/components/DashboardBuilder/DashboardBuilder.tsx 89.47% <82.85%> (-1.56%) ⬇️
...tiveFilters/FilterBar/FilterSets/FiltersHeader.tsx 93.02% <100.00%> (+1.35%) ⬆️
...nents/nativeFilters/FilterBar/FilterSets/index.tsx 46.46% <100.00%> (-0.54%) ⬇️
...omponents/nativeFilters/FilterBar/Header/index.tsx 91.89% <100.00%> (+0.98%) ⬆️
...board/components/nativeFilters/FilterBar/index.tsx 82.65% <100.00%> (-8.07%) ⬇️
...d/src/filters/components/Time/TimeFilterPlugin.tsx 0.00% <0.00%> (-94.45%) ⬇️
...tend/src/filters/components/Time/transformProps.ts 22.22% <0.00%> (-44.45%) ⬇️
... and 13 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 9ba2983...574a801. Read the comment docs.

@villebro
Copy link
Member

The expand arrow here looks slightly lonely after the "Superset" header has scrolled out of view:

  1. unscrolled (looks ok):
    image

"Superset" header out of sight (looks lonely):
image

It might look better if it scrolled together with the nearby chart, and only got stuck after the whole "Superset" header has scrolled out of view.

@kgabryje
Copy link
Member

kgabryje commented Jun 14, 2021

Wow, that looks SO much better than before! Thanks for that change. Could we move the "expand" icon up when filters are collapsed? I don't think it should change it's position that much compared to when the filter bar is expanded
EDIT: Ah, I see that Ville commented the same thing 😄

@villebro
Copy link
Member

When the "Superset" header has scrolled out of view, a grey area is exposed on the bottom. This grey space could potentially show additional native filters that are now hidden (we should be able to show "p" (partly exposed) and even "q" (fully hidden) here:
image

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM - what an incredible improvement to the native filter experience! 🎉

@villebro villebro merged commit 0c22266 into apache:master Jun 16, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@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/XL 🚢 1.3.0
Projects
None yet
4 participants