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: AntD select dropdown scroll issue #13585

Merged
merged 1 commit into from
Mar 16, 2021

Conversation

lilykuang
Copy link
Member

@lilykuang lilykuang commented Mar 12, 2021

SUMMARY

There is an issue with AntD select ant-design/ant-design#3438. The select popover doesn't move with scrolling.

AntD has provided a fix with getPopupContainer

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:
https://www.loom.com/share/fe9f3933852840859620d92a84a44926
AFTER:
https://www.loom.com/share/47aeef38b3bc44d7a1343e368558a411

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Mar 12, 2021

Codecov Report

Merging #13585 (c6a67e4) into master (7656b2e) will decrease coverage by 3.89%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13585      +/-   ##
==========================================
- Coverage   77.35%   73.46%   -3.90%     
==========================================
  Files         909      605     -304     
  Lines       46118    21430   -24688     
  Branches     5649     5562      -87     
==========================================
- Hits        35674    15743   -19931     
+ Misses      10309     5552    -4757     
  Partials      135      135              
Flag Coverage Δ
cypress 57.09% <66.66%> (-0.01%) ⬇️
hive ?
javascript 63.36% <80.00%> (+<0.01%) ⬆️
mysql ?
postgres ?
python ?
sqlite ?

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

Impacted Files Coverage Δ
...nd/src/common/components/CronPicker/CronPicker.tsx 91.66% <66.66%> (-8.34%) ⬇️
superset-frontend/src/common/components/Select.tsx 91.66% <80.00%> (-8.34%) ⬇️
superset-frontend/src/common/components/index.tsx 100.00% <100.00%> (ø)
superset/css_templates/schemas.py
superset/css_templates/commands/exceptions.py
superset/security/manager.py
superset/connectors/sqla/views.py
superset/annotation_layers/dao.py
superset/commands/base.py
superset/legacy.py
... and 292 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 7656b2e...0c9ee00. Read the comment docs.

@junlincc
Copy link
Member

/testenv up

@apache apache deleted a comment from github-actions bot Mar 14, 2021
@github-actions
Copy link
Contributor

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

@junlincc
Copy link
Member

Thanks for the pr @lilykuang! I wonder if there's a fix for popover on scroll? if so, we can take it on.

Screen.Recording.2021-03-13.at.11.30.32.PM.mov

@lilykuang lilykuang merged commit f2c50f6 into apache:master Mar 16, 2021
@lilykuang
Copy link
Member Author

Thanks for the pr @lilykuang! I wonder if there's a fix for popover on scroll? if so, we can take it on.

Screen.Recording.2021-03-13.at.11.30.32.PM.mov
@junlincc I believed getPopupContainer will also fix popover on scroll base on ant-design/ant-design#3438

@nytai
Copy link
Member

nytai commented Mar 16, 2021

@junlincc yup, this same logic should apply to other popups
https://github.com/apache/superset/pull/13585/files#diff-46790d612a7ba54f39c522c7359eba11e45e724e5efe695527c1f96ed45cb8adR107-R111

It's a known issue with antd, and this is their suggested fix. We can probably apply the logic to all "apps" and that should cover all other cases going forward.

@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@junlincc
Copy link
Member

Thank you both for clarifying, so we still need separate PRs that apply this logic to other components, right? i looked master, popover is still disconnected on scroll. @nytai 🙏

@willbarrett
Copy link
Member

Yes, that's correct @junlincc

allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
@lilykuang lilykuang deleted the lily/antd-select-dropdown branch August 30, 2022 16:32
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.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 preset-io size/S 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants