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(native filters): Expandable filter config modal #24559

Conversation

justinpark
Copy link
Member

@justinpark justinpark commented Jun 29, 2023

SUMMARY

The native filters modal width is unnecessarily narrow which results in a suboptimal UX—excessive scrolling—especially when either the filter names and/or datasets/column names are long.
This commit adds an option to make the 'Add and edit filters' modal wider.

Sales_Dashboard

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:

after-expandable-filter-modal.mov

Before:

before--expandable-filter-modal.mov

TESTING INSTRUCTIONS

Go to dashboard and choose a dataset contains a long name column name

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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

@john-bodley
Copy link
Member

@justinpark in addition to the scroll bars, is there merit in making the default modal size wider?

@justinpark
Copy link
Member Author

justinpark commented Jun 29, 2023

in addition to the scroll bars, is there merit in making the default modal size wider?

Sure. I can adjust the default width from 50% to 70% instead of making the expanded mode as default because 70% width modal can be suitable in most case.

@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Merging #24559 (d94860d) into master (1473d97) will increase coverage by 0.00%.
The diff coverage is 78.57%.

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

@@           Coverage Diff           @@
##           master   #24559   +/-   ##
=======================================
  Coverage   69.03%   69.03%           
=======================================
  Files        1908     1908           
  Lines       74197    74221   +24     
  Branches     8186     8188    +2     
=======================================
+ Hits        51219    51238   +19     
- Misses      20857    20858    +1     
- Partials     2121     2125    +4     
Flag Coverage Δ
javascript 55.71% <57.14%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...ilters/FiltersConfigModal/FilterTitleContainer.tsx 79.41% <ø> (ø)
superset/views/database/forms.py 93.67% <ø> (ø)
...eFilters/FiltersConfigModal/FiltersConfigModal.tsx 63.33% <57.14%> (-0.49%) ⬇️
superset/config.py 92.17% <100.00%> (+0.02%) ⬆️
superset/forms.py 97.72% <100.00%> (+0.85%) ⬆️

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

Comment on lines 621 to 622
width="70%"
{...(expanded && { width: '100%', height: '100%' })}
Copy link
Member

Choose a reason for hiding this comment

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

Given that StyleModalWrapper is already receiving the expanded property, could you deal with width and height there and remove these two lines?

@justinpark
Copy link
Member Author

@michael-s-molina could you review the update?

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

@kasiazjc
Copy link
Contributor

Thanks for the change @justinpark! I am worried that because the icons are so similar and close to each other, people might confuse them. I think in other places we use this icon (below) and using this one would probably help. Would it be ok to swap?
image

I think in general we have to bump the width of the modal in the default mode to ~880px (and resize just after it not longer fits in the screen), so that everything is more visible. Do you think you could include it in the PR or should it be included in a new one?

@justinpark justinpark force-pushed the chore--expandable-filter-configuration-modal branch from 3773b89 to 6516328 Compare July 12, 2023 20:35
@justinpark
Copy link
Member Author

Thanks for the change justinpark! I am worried that because the icons are so similar and close to each other, people might confuse them. I think in other places we use this icon (below) and using this one would probably help. Would it be ok to swap? image

I think in general we have to bump the width of the modal in the default mode to ~880px (and resize just after it not longer fits in the screen), so that everything is more visible. Do you think you could include it in the PR or should it be included in a new one?

Sounds good. I updated the location of the button to the next of the footer buttons.
Screenshot 2023-07-12 at 1 33 09 PM

I also updated the default width to 880px as well.

@kasiazjc
Copy link
Contributor

Thanks for the change justinpark! I am worried that because the icons are so similar and close to each other, people might confuse them. I think in other places we use this icon (below) and using this one would probably help. Would it be ok to swap? image
I think in general we have to bump the width of the modal in the default mode to ~880px (and resize just after it not longer fits in the screen), so that everything is more visible. Do you think you could include it in the PR or should it be included in a new one?

Sounds good. I updated the location of the button to the next of the footer buttons. Screenshot 2023-07-12 at 1 33 09 PM

I also updated the default width to 880px as well.

Amazing, thank you!

@justinpark justinpark merged commit 05e724f into apache:master Jul 20, 2023
@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Jul 21, 2023
@michael-s-molina michael-s-molina mentioned this pull request Jul 25, 2023
9 tasks
michael-s-molina pushed a commit that referenced this pull request Jul 26, 2023
Co-authored-by: Justin Park <justinpark@apache.org>
(cherry picked from commit 05e724f)
@mistercrunch mistercrunch added 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Co-authored-by: Justin Park <justinpark@apache.org>
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 v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants