You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "alexandrusoare (via GitHub)" <gi...@apache.org> on 2026/04/06 11:13:37 UTC
[PR] fix(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
alexandrusoare opened a new pull request, #39136:
URL: https://github.com/apache/superset/pull/39136
### SUMMARY
In horizontal filter bar (oneLine mode), when a multi-select filter has selected items, the dropdown popup width doesn't match the input width after it opens.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
#### BEFORE
https://github.com/user-attachments/assets/640c6875-3aa8-4d07-8f59-a17063b69ff6
#### AFTER
https://github.com/user-attachments/assets/f793526b-bcd5-4469-bf6f-34d3ee113b1d
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] 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
--
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "alexandrusoare (via GitHub)" <gi...@apache.org>.
alexandrusoare commented on code in PR #39136:
URL: https://github.com/apache/superset/pull/39136#discussion_r3039234578
##########
superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx:
##########
@@ -159,12 +161,23 @@ const Select = forwardRef(
requestAnimationFrame(() => {
setStableMaxTagCount(0);
isOpeningRef.current = false;
+
+ // Measure collapsed width and update dropdown width
+ const selectElement =
+ selectContainerRef.current?.querySelector('.ant-select');
+ if (selectElement) {
+ const { width } = selectElement.getBoundingClientRect();
+ if (width > 0) {
+ setDropdownWidth(width);
+ }
+ }
Review Comment:
This is not the case as I tested this manually and it works fine
--
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "alexandrusoare (via GitHub)" <gi...@apache.org>.
alexandrusoare commented on PR #39136:
URL: https://github.com/apache/superset/pull/39136#issuecomment-4243647741
> @alexandrusoare I'm not sure if you noticed but the `select all` and `clear` buttons are being cut off (after video).
@michael-s-molina noticed and taken care of in this PR -> https://github.com/apache/superset/pull/39005
--
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39136:
URL: https://github.com/apache/superset/pull/39136#issuecomment-4215899217
🎪 [Showtime](https://github.com/mistercrunch/superset-showtime) deployed environment on [GHA](https://github.com/apache/superset/actions/runs/24201069641) for [e06b619](https://github.com/apache/superset/commit/e06b619)
• **Environment:** http://34.221.17.37:8080 (admin/admin)
• **Lifetime:** 48h auto-cleanup
• **Updates:** New commits create fresh environments automatically
--
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #39136:
URL: https://github.com/apache/superset/pull/39136#discussion_r3039168903
##########
superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx:
##########
@@ -811,6 +811,48 @@ test('Maintains stable maxTagCount to prevent click target disappearing in oneLi
expect(withinSelector.getByText('+ 2 ...')).toBeVisible();
});
+test('dropdown width matches input width after tags collapse in oneLine mode', async () => {
+ render(
+ <div style={{ width: '300px' }}>
+ <Select
+ {...defaultProps}
+ value={[OPTIONS[0], OPTIONS[1], OPTIONS[2]]}
+ mode="multiple"
+ oneLine
+ />
+ </div>,
+ );
+
+ await open();
+
+ // Wait for RAF to complete and tags to collapse
+ await waitFor(() => {
+ const withinSelector = within(
+ getElementByClassName('.ant-select-selector'),
+ );
+ expect(
+ withinSelector.queryByText(OPTIONS[0].label),
+ ).not.toBeInTheDocument();
+ expect(withinSelector.getByText('+ 3 ...')).toBeVisible();
+ });
+
+ const selectElement = document.querySelector('.ant-select') as HTMLElement;
+ const dropdown = document.querySelector(
+ '.ant-select-dropdown',
+ ) as HTMLElement;
+
+ expect(selectElement).toBeInTheDocument();
+ expect(dropdown).toBeInTheDocument();
+
+ // The dropdown width should match the collapsed input width
+ const selectWidth = selectElement.getBoundingClientRect().width;
+ const dropdownWidth = dropdown.getBoundingClientRect().width;
+
+ // In oneLine mode with tags, dropdown width should match input width
+ // Allow small tolerance for sub-pixel differences
+ expect(Math.abs(dropdownWidth - selectWidth)).toBeLessThanOrEqual(1);
Review Comment:
**Suggestion:** This assertion is ineffective in Jest/JSDOM because `getBoundingClientRect()` does not perform real layout, so both widths can be `0` and the test passes even when popup sizing is broken. Mock the select trigger width and assert the dropdown's applied inline width after reopening so the test verifies actual `popupMatchSelectWidth` behavior. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ OneLine multi-select width regression may bypass this unit test.
- ⚠️ Test suite overstates coverage of dropdown width behavior.
- ⚠️ popupMatchSelectWidth measurement logic effectively untested in JSDOM.
```
</details>
```suggestion
expect(selectElement).toBeInTheDocument();
jest.spyOn(selectElement, 'getBoundingClientRect').mockReturnValue({
width: 300,
height: 32,
top: 0,
left: 0,
right: 300,
bottom: 32,
x: 0,
y: 0,
toJSON: () => ({}),
} as DOMRect);
await type('{esc}');
await open();
const dropdown = document.querySelector(
'.ant-select-dropdown',
) as HTMLElement;
expect(dropdown).toBeInTheDocument();
await waitFor(() => {
expect(parseInt(dropdown.style.width, 10)).toBe(300);
});
```
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Run the frontend unit tests so that the new case `test('dropdown width matches input
width after tags collapse in oneLine mode', ...)` at
`superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx` (PR
hunk lines 814–853) executes.
2. In this test, after opening the Select and waiting for tags to collapse, it executes
the snippet at lines 839–853 from the PR diff: it queries `.ant-select` and
`.ant-select-dropdown` and then reads `selectElement.getBoundingClientRect().width` and
`dropdown.getBoundingClientRect().width`.
3. In the JSDOM environment used by our tests, `getBoundingClientRect()` does not perform
real layout and returns zero dimensions by default. This is why other tests (for example
`FiltersConfigModal.test.tsx` at
`src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx:590–603`)
explicitly `jest.spyOn(..., 'getBoundingClientRect').mockImplementation(...)` to inject
non-zero sizes.
4. Because neither this Select test nor any global setup mocks `getBoundingClientRect` for
`.ant-select` or `.ant-select-dropdown`, both `selectWidth` and `dropdownWidth` are
effectively `0` on every run in JSDOM, so `Math.abs(dropdownWidth - selectWidth)` is
always `0` and the assertion at PR line 853 always passes. This means the test does not
actually validate the dropdown width or the `popupMatchSelectWidth={oneLine ?
dropdownWidth : true}` logic in `Select.tsx` (see
`superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx:140–47` and
`118–119`).
```
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx
**Line:** 840:853
**Comment:**
*Logic Error: This assertion is ineffective in Jest/JSDOM because `getBoundingClientRect()` does not perform real layout, so both widths can be `0` and the test passes even when popup sizing is broken. Mock the select trigger width and assert the dropdown's applied inline width after reopening so the test verifies actual `popupMatchSelectWidth` behavior.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39136&comment_hash=7f821875126a905feee9c9fed441479d0f60dc5477e0b119cfe2338768ac6dde&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39136&comment_hash=7f821875126a905feee9c9fed441479d0f60dc5477e0b119cfe2338768ac6dde&reaction=dislike'>👎</a>
--
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #39136:
URL: https://github.com/apache/superset/pull/39136#issuecomment-4192003557
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/39136?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 `88.88889%` with `1 line` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 64.54%. Comparing base ([`c5bce75`](https://app.codecov.io/gh/apache/superset/commit/c5bce756f0c3918620babd88d87b4cdadf3f711a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`97d2730`](https://app.codecov.io/gh/apache/superset/commit/97d27303f52852aaacdc21b9d6eafe6e0874096b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 10 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/39136?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../superset-ui-core/src/components/Select/Select.tsx](https://app.codecov.io/gh/apache/superset/pull/39136?src=pr&el=tree&filepath=superset-frontend%2Fpackages%2Fsuperset-ui-core%2Fsrc%2Fcomponents%2FSelect%2FSelect.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0LnRzeA==) | 88.88% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/39136?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 #39136 +/- ##
=======================================
Coverage 64.54% 64.54%
=======================================
Files 2536 2536
Lines 131164 131173 +9
Branches 30451 30454 +3
=======================================
+ Hits 84659 84667 +8
- Misses 45042 45043 +1
Partials 1463 1463
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/39136/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/39136/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.07% <88.88%> (+<0.01%)` | :arrow_up: |
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 Sentry](https://app.codecov.io/gh/apache/superset/pull/39136?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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39136:
URL: https://github.com/apache/superset/pull/39136#issuecomment-4191888277
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39136:
URL: https://github.com/apache/superset/pull/39136#issuecomment-4192356472
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "michaelmorera-preset (via GitHub)" <gi...@apache.org>.
michaelmorera-preset commented on PR #39136:
URL: https://github.com/apache/superset/pull/39136#issuecomment-4218004411
The application is working as expected. Dropdown popup width matches the input width.
Evidence video to support QAgor comment (in the shortcut task):

--
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #39136:
URL: https://github.com/apache/superset/pull/39136#issuecomment-4243633080
@alexandrusoare I'm not sure if you noticed but the `select all` and `clear` buttons are being cut off (after video).
--
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "alexandrusoare (via GitHub)" <gi...@apache.org>.
alexandrusoare merged PR #39136:
URL: https://github.com/apache/superset/pull/39136
--
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #39136:
URL: https://github.com/apache/superset/pull/39136#discussion_r3039171295
##########
superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx:
##########
@@ -159,12 +161,23 @@ const Select = forwardRef(
requestAnimationFrame(() => {
setStableMaxTagCount(0);
isOpeningRef.current = false;
+
+ // Measure collapsed width and update dropdown width
+ const selectElement =
+ selectContainerRef.current?.querySelector('.ant-select');
+ if (selectElement) {
+ const { width } = selectElement.getBoundingClientRect();
+ if (width > 0) {
+ setDropdownWidth(width);
+ }
+ }
Review Comment:
**Suggestion:** The width measurement runs in the same animation frame right after `setStableMaxTagCount(0)`, so it reads the pre-collapse DOM width (React state update has not rendered yet). This can keep the popup width out of sync with the collapsed input width. Measure in the next frame after the collapse render is applied. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Horizontal native Select filters show misaligned dropdown width.
- ⚠️ Group-by horizontal filters display inconsistent popup/input sizing.
- ⚠️ Visual inconsistency slightly degrades horizontal filter bar usability.
```
</details>
```suggestion
// Measure width after collapse has been rendered
requestAnimationFrame(() => {
const selectElement =
selectContainerRef.current?.querySelector('.ant-select');
if (selectElement) {
const { width } = selectElement.getBoundingClientRect();
if (width > 0) {
setDropdownWidth(width);
}
}
});
```
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Open any dashboard that uses the native filter bar in horizontal layout
(FilterBarOrientation.Horizontal defined in
`superset-frontend/src/dashboard/types.ts:10-13`).
2. Ensure there is a native Select filter configured with multi-select and some selected
values so tags are rendered, using `PluginFilterSelect` which renders `<Select
oneLine={filterBarOrientation === FilterBarOrientation.Horizontal} ... />` in
`superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx:611-43`.
3. Click the horizontal Select filter to open its dropdown; this calls `onOpenChange` in
`SelectFilterPlugin` which ultimately triggers `handleOnDropdownVisibleChange` in `Select`
at `superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx:443-460`,
setting `isDropdownVisible` to `true`.
4. The `useEffect` in `Select` at `Select.tsx:155-186` runs with `oneLine=true` and
`isDropdownVisible=true`, scheduling `requestAnimationFrame` where
`setStableMaxTagCount(0)` and width measurement are executed (`Select.tsx:161-174`).
Because `setStableMaxTagCount(0)` triggers a React state update that has not yet
re-rendered the DOM inside the same animation frame,
`selectContainerRef.current?.querySelector('.ant-select')` is measured before the
collapsed tags layout is applied. The measured `width` (pre-collapse) is stored in
`dropdownWidth` and then used by `popupMatchSelectWidth={oneLine ? dropdownWidth : true}`
at `Select.tsx:796-797`, causing the popup width to mismatch the actual collapsed input
width once React finishes rendering with `stableMaxTagCount=0`.
```
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx
**Line:** 165:173
**Comment:**
*Logic Error: The width measurement runs in the same animation frame right after `setStableMaxTagCount(0)`, so it reads the pre-collapse DOM width (React state update has not rendered yet). This can keep the popup width out of sync with the collapsed input width. Measure in the next frame after the collapse render is applied.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39136&comment_hash=3bed4887833a9e5aa962913fcace64a1c4b9bfe8c073d87c67d01041800d0123&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39136&comment_hash=3bed4887833a9e5aa962913fcace64a1c4b9bfe8c073d87c67d01041800d0123&reaction=dislike'>👎</a>
--
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(popup): Dropdown popup width doesn't match input width when tags collapse in oneLine mode [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39136:
URL: https://github.com/apache/superset/pull/39136#issuecomment-4215770473
🎪 [Showtime](https://github.com/mistercrunch/superset-showtime) is building environment on [GHA](https://github.com/apache/superset/actions/runs/24201069641) for [e06b619](https://github.com/apache/superset/commit/e06b619)
--
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