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: DropdownContainer resize algorithm #22318

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Fixes a bug in the DropdownContainer resize algorithm. Previously, the algorithm did not consider moving more than one element simultaneously when there was enough width available.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2022-12-02.at.11.07.38.AM.mov
Screen.Recording.2022-12-02.at.10.57.36.AM.mov

TESTING INSTRUCTIONS

  • Open the Storybook or horizontal filter bar
  • Resize the screen and check the elements are correctly rendered

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

@geido
Copy link
Member

geido commented Dec 2, 2022

/testenv up FEATURE_HORIZONTAL_FILTER_BAR=true

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2022

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

@geido
Copy link
Member

geido commented Dec 2, 2022

Hey @michael-s-molina I think there is still might be an issue. I added a 4th filter and the "more filters" is showing up even though there would be space for it

Screenshot 2022-12-02 at 19 24 57

@michael-s-molina
Copy link
Member Author

Hey @michael-s-molina I think there is still might be an issue. I added a 4th filter and the "more filters" is showing up even though there would be space for it

Screenshot 2022-12-02 at 19 24 57

If you refresh the page, it shows? If not, then is because it doesn't fit.

Copy link
Member

@kgabryje kgabryje 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
Copy link
Member

geido commented Dec 2, 2022

If you refresh the page, it shows? If not, then is because it doesn't fit.

Yes it does

Screenshot 2022-12-02 at 20 03 03

@pull-request-size pull-request-size bot added size/L and removed size/M labels Dec 2, 2022
@michael-s-molina
Copy link
Member Author

Yes it does

@geido I pushed another change. Let me see if you find anything. I'll wait for your review before merging the PR.

@codecov
Copy link

codecov bot commented Dec 2, 2022

Codecov Report

Merging #22318 (0c9d162) into master (df91664) will decrease coverage by 0.01%.
The diff coverage is 53.57%.

@@            Coverage Diff             @@
##           master   #22318      +/-   ##
==========================================
- Coverage   66.87%   66.86%   -0.02%     
==========================================
  Files        1847     1847              
  Lines       70365    70395      +30     
  Branches     7718     7722       +4     
==========================================
+ Hits        47057    47070      +13     
- Misses      21309    21324      +15     
- Partials     1999     2001       +2     
Flag Coverage Δ
javascript 53.77% <53.57%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...rontend/src/components/DropdownContainer/index.tsx 72.83% <53.57%> (-2.17%) ⬇️
...eModal/DatabaseConnectionForm/CommonParameters.tsx 76.92% <0.00%> (-8.80%) ⬇️
...c/views/CRUD/data/database/DatabaseModal/index.tsx 41.27% <0.00%> (-0.72%) ⬇️
...nd/src/dashboard/components/nativeFilters/state.ts 64.28% <0.00%> (ø)
...ages/superset-ui-core/src/query/types/Dashboard.ts 100.00% <0.00%> (ø)
...ativeFilters/FilterBar/useFilterControlFactory.tsx 81.81% <0.00%> (ø)
...ase/DatabaseModal/DatabaseConnectionForm/index.tsx 92.30% <0.00%> (+1.39%) ⬆️

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

Copy link
Member

@codyml codyml left a comment

Choose a reason for hiding this comment

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

This fixes whatever weird thing was happening on my browser – resizing works great now! Thanks!

@geido
Copy link
Member

geido commented Dec 4, 2022

/testenv up FEATURE_HORIZONTAL_FILTER_BAR=true

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2022

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

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2022

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

@geido
Copy link
Member

geido commented Dec 4, 2022

Works great now!

@geido geido merged commit aba3b81 into apache:master Dec 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2022

Ephemeral environment shutdown and build artifacts deleted.

@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/L 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants