You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/02/23 17:42:48 UTC
[PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
rusackas opened a new pull request, #38193:
URL: https://github.com/apache/superset/pull/38193
### SUMMARY
When the dashboard filter bar recalculates its layout (e.g., on resize or filter changes), the dropdown "More" button can momentarily disappear and reappear. This happens because the `DropdownContainer` hides the button when `popoverContent` is empty — which occurs briefly during re-renders before overflow detection runs.
This PR adds an `alwaysShowDropdownButton` prop to `DropdownContainer` that keeps the button visible even when no items are currently overflowing. The `FilterControls` component passes this prop when there are filter items, preventing the flickering behavior.
**Changes:**
- Added `alwaysShowDropdownButton` prop to `DropdownContainerProps` type
- Updated `DropdownContainer` render logic to show the button when the new prop is set
- Passed `alwaysShowDropdownButton={items.length > 0}` in `FilterControls`
- Added unit tests for the new prop
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
**Before:** The dropdown button briefly disappears during layout recalculations, causing a jarring flicker.
**After:** The dropdown button remains stable and visible at all times when filters are present.
### TESTING INSTRUCTIONS
1. Open a dashboard with enough native filters that some overflow into the "More" dropdown
2. Resize the browser window or toggle filter visibility
3. Observe that the dropdown button no longer flickers/disappears during layout recalculations
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] 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
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38193:
URL: https://github.com/apache/superset/pull/38193#issuecomment-4629091901
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #38193:
URL: https://github.com/apache/superset/pull/38193#discussion_r3126409772
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx:
##########
@@ -625,6 +625,7 @@ const FilterControls: FC<FilterControlsProps> = ({
: undefined
}
forceRender={hasRequiredFirst}
+ alwaysShowDropdownButton={items.length > 0}
ref={popoverRef}
Review Comment:
Addressed in d59840d — I kept the button visible to avoid the flicker this PR is trying to fix, but gated the popover on `popoverContent` existence (`open={popoverVisible && !!popoverContent}` + ignoring `onOpenChange` when there's nothing to show) so clicking the trigger can no longer open an empty popover during intermediate layout recalculations. Added a test covering that behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38193:
URL: https://github.com/apache/superset/pull/38193#issuecomment-4035339118
## **Sequence Diagram**
This PR ensures the dashboard filter More button stays visible during layout recalculations and prevents an empty popover from opening when overflow content is not yet available.
```mermaid
sequenceDiagram
participant User
participant FilterBar
participant DropdownContainer
participant Popover
User->>FilterBar: Resize dashboard or change filters
FilterBar->>DropdownContainer: Render with items and alwaysShowDropdownButton true
DropdownContainer->>DropdownContainer: Recalculate overflow and popover content
DropdownContainer-->>User: Show More button even without overflow
User->>DropdownContainer: Click More button
alt Popover content available
DropdownContainer->>Popover: Open with overflowed filter items
Popover-->>User: Display overflowed filters
else No popover content yet
DropdownContainer->>Popover: Ignore open attempt and keep closed
end
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #38193:
URL: https://github.com/apache/superset/pull/38193#issuecomment-4625633263
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/38193?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `50.00000%` with `2 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 63.48%. Comparing base ([`7406098`](https://app.codecov.io/gh/apache/superset/commit/74060987082e115664e4b0c7b6ae35764f59cfec?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`e5fd28e`](https://app.codecov.io/gh/apache/superset/commit/e5fd28e6742e5c4bab77bbbe9c8632e415ea4d41?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/38193?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...components/DropdownContainer/DropdownContainer.tsx](https://app.codecov.io/gh/apache/superset/pull/38193?src=pr&el=tree&filepath=superset-frontend%2Fpackages%2Fsuperset-ui-core%2Fsrc%2Fcomponents%2FDropdownContainer%2FDropdownContainer.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvY29tcG9uZW50cy9Ecm9wZG93bkNvbnRhaW5lci9Ecm9wZG93bkNvbnRhaW5lci50c3g=) | 50.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/38193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #38193 +/- ##
==========================================
- Coverage 63.48% 63.48% -0.01%
==========================================
Files 2664 2664
Lines 143831 143833 +2
Branches 33085 33087 +2
==========================================
+ Hits 91307 91308 +1
- Misses 50914 50915 +1
Partials 1610 1610
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/38193/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/38193/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `67.63% <50.00%> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/38193?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38193:
URL: https://github.com/apache/superset/pull/38193#issuecomment-3999433061
<!-- Bito Reply -->
The suggestion is valid—it prevents displaying the 'More filters' button when there are no overflowed items, avoiding wasted space and a button with no popover. To implement, add a state for overflow detection pending (initially true, set to false on onOverflowingStateChange), then set alwaysShowDropdownButton={isOverflowDetectionPending || overflowedIds.length > 0}.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #38193:
URL: https://github.com/apache/superset/pull/38193#discussion_r3360302046
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx:
##########
@@ -641,6 +641,7 @@ const FilterControls: FC<FilterControlsProps> = ({
: undefined
}
forceRender={hasRequiredFirst}
+ alwaysShowDropdownButton={items.length > 0}
Review Comment:
Good catch — you're right that `items.length > 0` was way broader than the flicker window and left a permanent 0-badge button that swallowed clicks on wide viewports. Fixed in 5d6d681391 by taking your suggested approach: removed the `alwaysShowDropdownButton` prop entirely and moved the logic inside `DropdownContainer`. It now tracks a `recalculating` flag (set when an item-set change resets the overflow index, cleared once the real index is recomputed) and keeps the trigger mounted across that transient only when it was showing content just before (`usePrevious(!!popoverContent)`). In steady state the trigger appears exactly when there's overflow content, matching pre-fix behavior — no more lingering empty button.
##########
superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.test.tsx:
##########
@@ -158,6 +158,36 @@ test('accepts custom style props', () => {
expect(container).toHaveStyle('padding: 10px');
});
+test('shows dropdown button when alwaysShowDropdownButton is true even without overflow', () => {
+ render(
+ <DropdownContainer items={generateItems(3)} alwaysShowDropdownButton />,
+ );
+ expect(screen.getByTestId('dropdown-container-btn')).toBeInTheDocument();
+});
+
+test('does not open popover when alwaysShowDropdownButton is true but there is no popover content', () => {
+ render(
+ <DropdownContainer items={generateItems(3)} alwaysShowDropdownButton />,
+ );
+ const btn = screen.getByTestId('dropdown-container-btn');
+ expect(btn).toBeInTheDocument();
+ fireEvent.click(btn);
+ // No popover content exists, so the popover should not open
+ expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
Review Comment:
Agreed — that test didn't isolate the `onOpenChange` guard since `open={popoverVisible && !!popoverContent}` was a sufficient independent guard. Since the new approach (5d6d681391) drops the `alwaysShowDropdownButton` prop, I removed that test along with the other two prop-specific ones rather than leave misleading coverage. The steady-state guarantee you cared about (no button when nothing overflows) is already covered by the existing `does not render a dropdown button when not overflowing` test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38193:
URL: https://github.com/apache/superset/pull/38193#issuecomment-4626681719
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38193:
URL: https://github.com/apache/superset/pull/38193#issuecomment-4035541935
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #38193:
URL: https://github.com/apache/superset/pull/38193#issuecomment-4035356347
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 79e18153b86874beacdfe90bdaf0d7b4d28cd019 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/69b0b5aecc378d0008d8cc24 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-38193--superset-docs-preview.netlify.app](https://deploy-preview-38193--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-38193--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #38193:
URL: https://github.com/apache/superset/pull/38193#discussion_r3359593438
##########
superset-frontend/packages/superset-ui-core/src/components/DropdownContainer/DropdownContainer.test.tsx:
##########
@@ -158,6 +158,36 @@ test('accepts custom style props', () => {
expect(container).toHaveStyle('padding: 10px');
});
+test('shows dropdown button when alwaysShowDropdownButton is true even without overflow', () => {
+ render(
+ <DropdownContainer items={generateItems(3)} alwaysShowDropdownButton />,
+ );
+ expect(screen.getByTestId('dropdown-container-btn')).toBeInTheDocument();
+});
+
+test('does not open popover when alwaysShowDropdownButton is true but there is no popover content', () => {
+ render(
+ <DropdownContainer items={generateItems(3)} alwaysShowDropdownButton />,
+ );
+ const btn = screen.getByTestId('dropdown-container-btn');
+ expect(btn).toBeInTheDocument();
+ fireEvent.click(btn);
+ // No popover content exists, so the popover should not open
+ expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
Review Comment:
**NIT** — this assertion would still pass if the `if (popoverContent)` guard inside `onOpenChange` were removed entirely, because `open={popoverVisible && !!popoverContent}` is a sufficient independent guard that prevents the Popover from rendering regardless. The test validates the desired end-state correctly but does not isolate the `onOpenChange` mechanism it claims to cover.
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx:
##########
@@ -641,6 +641,7 @@ const FilterControls: FC<FilterControlsProps> = ({
: undefined
}
forceRender={hasRequiredFirst}
+ alwaysShowDropdownButton={items.length > 0}
Review Comment:
**MEDIUM (non-blocking)** — `alwaysShowDropdownButton={items.length > 0}` is broader than the recalculation window it targets. On wide viewports with few filters / no overflow / no out-of-scope content, `popoverContent` stays `null` indefinitely, so the "More filters" button renders permanently with a 0-badge and silently swallows clicks (the `onOpenChange` guard blocks all interaction). This is a behavior change from pre-fix: the button previously only appeared with overflow content to show.
The JSDoc documents the trade-off, so flagging rather than blocking. A narrower approach — e.g. a one-cycle ref flag set when a resize fires and cleared after the first `useLayoutEffect` recalculation pass — would achieve the same flicker prevention with no steady-state UX regression.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38193:
URL: https://github.com/apache/superset/pull/38193#issuecomment-3946314118
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #38193:
URL: https://github.com/apache/superset/pull/38193#discussion_r2885435804
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx:
##########
@@ -625,6 +625,7 @@ const FilterControls: FC<FilterControlsProps> = ({
: undefined
}
forceRender={hasRequiredFirst}
+ alwaysShowDropdownButton={items.length > 0}
ref={popoverRef}
Review Comment:
Passing `alwaysShowDropdownButton={items.length > 0}` will show the “More filters” trigger even when there are no overflowed/out-of-scope items (i.e. `dropdownContent` is `undefined`). That can result in a “More filters” button with no popover content (and also reduces available horizontal space, potentially forcing extra overflow). If the goal is only to avoid flicker during intermediate layout recalculation, consider enabling this only while overflow detection is pending, or ensure the dropdown always has meaningful content / the trigger is disabled when there’s nothing to show.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #38193:
URL: https://github.com/apache/superset/pull/38193
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(dashboard): prevent filter dropdown button from disappearing during layout recalculations [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #38193:
URL: https://github.com/apache/superset/pull/38193#issuecomment-4323292823
@msyavuz — gentle ping on this one whenever you have a moment. CI is green and there are no open review threads, so it's just waiting on a look. No rush, but flagging in case it slipped past.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org