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(native-filters): Add empty text node before OutPortal #22289

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

codyml
Copy link
Member

@codyml codyml commented Dec 1, 2022

SUMMARY

Horizontal filter bar resizing appears to be affected by this issue related to reverse portals: when an <OutPortal /> is preceded by an element that is conditionally present or otherwise dynamic, React can crash. In this situation, opening the dropdown then attempting to resize down causes this crash. This PR follows the advice here and adds an empty text node before each <OutPortal /> and wraps the two elements in a fragment.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Untitled.2.mov

After:

Untitled.mov

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

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

@codyml codyml changed the title fix(native-filters): Add empty text node before fix(native-filters): Add empty text node before OutPortal Dec 1, 2022
@codecov
Copy link

codecov bot commented Dec 1, 2022

Codecov Report

Merging #22289 (a185cf3) into master (3ffe782) will not change coverage.
The diff coverage is 100.00%.

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

@@           Coverage Diff           @@
##           master   #22289   +/-   ##
=======================================
  Coverage   66.79%   66.79%           
=======================================
  Files        1846     1846           
  Lines       70286    70286           
  Branches     7683     7683           
=======================================
  Hits        46948    46948           
  Misses      21346    21346           
  Partials     1992     1992           
Flag Coverage Δ
javascript 53.79% <100.00%> (ø)

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

Impacted Files Coverage Δ
...ilters/FilterBar/FilterControls/FilterControls.tsx 70.21% <100.00%> (ø)

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

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.

Great detective work! Lgtm

@villebro
Copy link
Member

villebro commented Dec 1, 2022

Agree with Kamil, awesome work!

@kgabryje kgabryje merged commit ffff3e4 into apache:master Dec 1, 2022
@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/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants