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): Infinite load when filter with default first value is out of scope in horizontal bar #24542

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Jun 28, 2023

SUMMARY

When user added a native filter with "Select first filter value by default" checked and set a scope to a PR that's initially out of scope, the dashboard won't load if the native filters bar is in horizontal mode.
This PR fixes it by setting forceRender on the dropdown content in horizontal bar if there is a filter with the option selected.

A similar error has been fixed in PR #23299 - however, it turned out that the fix worked only for filter bar in vertical mode.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screen.Recording.2023-06-28.at.13.43.24.mov

After:

Screen.Recording.2023-06-28.at.13.42.36.mov

TESTING INSTRUCTIONS

  1. Create a dashboard and add two tabs to it
  2. Add one chart to each tab, and a third chart under the Tabs element.
  3. Create two dashboard filters with with "Select first filter value by default" option checked: one mapped to Tab 1 and the chart outside tabs and the other only mapped to Tab 2.
  4. Save filter changes.
  5. Change the filter bar orientation to Horizontal.
  6. Navigate back to Dashboards and access it from the list.

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

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Merging #24542 (0976066) into master (a846e8a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

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

@@           Coverage Diff           @@
##           master   #24542   +/-   ##
=======================================
  Coverage   58.22%   58.22%           
=======================================
  Files        1903     1904    +1     
  Lines       74026    74027    +1     
  Branches     8118     8118           
=======================================
+ Hits        43100    43101    +1     
  Misses      28815    28815           
  Partials     2111     2111           
Flag Coverage Δ
javascript 55.74% <100.00%> (+<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 65.00% <ø> (ø)
...ilters/FilterBar/FilterControls/FilterControls.tsx 69.73% <ø> (ø)
...perset-frontend/src/components/Popover/Popover.tsx 100.00% <100.00%> (ø)

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

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

@kgabryje kgabryje merged commit 262b769 into apache:master Jun 28, 2023
29 checks passed
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 8, 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/M 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants