-
Notifications
You must be signed in to change notification settings - Fork 14k
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: Hide FilterBar for Reports #23543
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23543 +/- ##
==========================================
- Coverage 67.68% 67.68% -0.01%
==========================================
Files 1914 1914
Lines 73958 73947 -11
Branches 8029 8030 +1
==========================================
- Hits 50060 50048 -12
Misses 21852 21852
- Partials 2046 2047 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
Outdated
Show resolved
Hide resolved
@@ -655,18 +658,17 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => { | |||
> | |||
<StickyPanel ref={containerRef} width={filterBarWidth}> | |||
<ErrorBoundary> | |||
{!isReport && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a few places where we set margins for dashboard so that filter bar fits nicely (such as lines 541 or 628). Should we set them to 0 for reports? Or are they not visible when filter bar is hidden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
Show resolved
Hide resolved
(cherry picked from commit a18e33b)
SUMMARY
This PR #22614 introduced an issue for which the reports would not be able to execute when a filter of the FilterBar required immediate execution (see for example filters with first filter value selected by default). The reason is that the logics that run the filters are often encapsulated within the rendering of the component. By removing the rendering of the FilterBar those filters failed to execute causing the reports to fail.
This PR introduces an additional way to hide the FilterBar through the
hidden
property, which effectively only hides the FilterBar with CSS while still rendering it. While not an optimal solution, this will unblock the reports. A more in-depth refactor is required to decouple the logics of the filters from the rendering of the component.TESTING INSTRUCTIONS
standalone=3
in the urlADDITIONAL INFORMATION