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): Close FiltersBadge popover on window resize #15305

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

kgabryje
Copy link
Member

SUMMARY

Due to what seems to be a bug in Antd, when we resize the browser window while popover is open, it disconnect's from its trigger node. This PR fixes it by manually closing the popover when resize event fires.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: see #14974
After:
https://user-images.githubusercontent.com/15073128/122987735-36f2a880-d3a1-11eb-85e8-b3603abec33a.mov

TESTING INSTRUCTIONS

  1. Add a filter to a dashboard
  2. Open filter indicator popover
  3. Resize the browser window and verify that popover closed itself

ADDITIONAL INFORMATION

  • Has associated issue: closes [native-filters]close indicator popover on resize #14974
  • 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 22, 2021

Codecov Report

Merging #15305 (592ca7f) into master (cef3dc0) will decrease coverage by 0.08%.
The diff coverage is 38.23%.

❗ Current head 592ca7f differs from pull request most recent head e9e95ce. Consider uploading reports for the commit e9e95ce to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15305      +/-   ##
==========================================
- Coverage   77.23%   77.15%   -0.09%     
==========================================
  Files         973      973              
  Lines       50438    50475      +37     
  Branches     6175     6181       +6     
==========================================
- Hits        38957    38943      -14     
- Misses      11276    11326      +50     
- Partials      205      206       +1     
Flag Coverage Δ
javascript 71.76% <16.21%> (-0.04%) ⬇️
presto ?

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

Impacted Files Coverage Δ
superset-frontend/src/SqlLab/reducers/sqlLab.js 34.95% <0.00%> (+0.83%) ⬆️
superset-frontend/src/components/Select/Select.tsx 0.00% <0.00%> (ø)
superset-frontend/src/components/Select/utils.ts 66.66% <ø> (ø)
superset-frontend/src/components/index.ts 0.00% <0.00%> (ø)
...veFilters/FilterBar/FilterControls/FilterValue.tsx 66.99% <0.00%> (-4.15%) ⬇️
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 69.13% <0.00%> (-0.87%) ⬇️
...src/explore/components/controls/ViewQueryModal.tsx 76.92% <0.00%> (ø)
superset/config.py 91.15% <ø> (ø)
superset-frontend/src/chart/chartAction.js 50.96% <30.76%> (-1.75%) ⬇️
superset/views/core.py 75.58% <91.66%> (+0.12%) ⬆️
... and 7 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 cef3dc0...e9e95ce. Read the comment docs.

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 - thanks for the added comment, commenting on cleanup would have been my initial reaction

@kgabryje kgabryje merged commit 6324490 into apache:master Jun 23, 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/S 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[native-filters]close indicator popover on resize
3 participants