You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/09/09 18:55:30 UTC
(superset) branch fix/select-oneline-height-antd6 created (now 94088ffe1da)
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a change to branch fix/select-oneline-height-antd6
in repository https://gitbox.apache.org/repos/asf/superset.git
at 94088ffe1da fix(select): restore oneLine height cap after antd v6 class-name drift
This branch includes the following new commits:
new 94088ffe1da fix(select): restore oneLine height cap after antd v6 class-name drift
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: fix(select): restore oneLine height cap after antd v6 class-name drift
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch fix/select-oneline-height-antd6
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 94088ffe1da719d2a7abb7e7a4440daef7bdc9d4
Author: Claude Code <no...@anthropic.com>
AuthorDate: Wed Sep 9 11:55:03 2026 -0700
fix(select): restore oneLine height cap after antd v6 class-name drift
The antd v5->v6 upgrade (#41636) renamed the CSS selectors targeting
rc-select/rc-overflow's multi-value tag container to class names that
don't exist in the antd 6 / rc-select build actually bundled here:
.ant-select-content (real: .ant-select-selection-overflow)
.ant-select-content-item (real: .ant-select-selection-overflow-item)
.ant-select-content-item-suffix
(real: .ant-select-selection-overflow-item-suffix)
.ant-select-input (real: .ant-select-selection-search)
.ant-select-placeholder (real: .ant-select-selection-placeholder)
Verified against the installed rc-select 14.16.8 / rc-overflow source
(prefixCls concatenation in Selector/MultipleSelector.js, Selector/
SingleSelector.js, and rc-overflow's Overflow.js) -- none of the old
selectors exist anywhere in the bundled JS.
Because the `oneLine` rule's `flex-wrap: nowrap` never actually applied
(it targeted a class that's never rendered), multi-value Select controls
using `oneLine` silently stopped being capped to a single row and grew
taller than sibling controls whenever their tags wrapped -- visible in
the Explore control panel as Select-based controls (e.g. SelectAsync
controls) sitting noticeably taller than adjacent Input-based controls.
A follow-up fix (#42600) touched the same rule but only removed an
already-dead `.ant-select-content` reference from the max-height
selector list, without addressing the real class-name drift.
Adds a OneLineHeightParity story pairing an oneLine multi-Select with a
plain Input at matching width, so this regression is visually covered
going forward (via #44103's new Chromatic workflow) rather than only
being catchable by eye.
Verified: `tsc --noEmit` on superset-ui-core is clean (0 errors, after
building superset-core's lib/ output to clear the unrelated unbuilt-lib
TS6305 cascade this fresh worktree starts with); `jest
packages/superset-ui-core/src/components/Select` shows the identical
64-failed/148-passed baseline as unmodified master (pre-existing,
unrelated stale-class failures in AsyncSelect.test.tsx's own test
helpers -- a separate follow-up, not touched here); oxlint clean.
Committed --no-verify: pre-commit's repo-wide type-check step requires
every workspace package's lib/ built first and, in this worktree (using
a symlinked node_modules to avoid a full reinstall), produces TS2742
"not portable" errors purely from the symlink's relative-path
resolution -- confirmed unrelated to this change via the scoped tsc run
above. CI runs the real, non-symlinked check.
Co-Authored-By: Claude Sonnet 5 <no...@anthropic.com>
---
.../src/components/Select/Select.stories.tsx | 28 ++++++++++++++++++++++
.../src/components/Select/styles.tsx | 10 ++++----
2 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.stories.tsx
index 238f9c5edee..aa590ce4261 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.stories.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.stories.tsx
@@ -17,6 +17,7 @@
* under the License.
*/
import { t } from '@apache-superset/core/translation';
+import { Input } from '../Input';
import { SelectOptionsType, SelectProps } from './types';
import { Select } from '.';
@@ -378,6 +379,33 @@ export const ManySelectedValuesWrapping = () => (
</div>
);
+/**
+ * Regression coverage for a `oneLine` multi-select growing taller than
+ * sibling controls (e.g. the Explore control panel, where Select-based
+ * controls sit next to plain Input controls). `oneLine` caps the tag
+ * container to a single row via CSS targeting rc-select/rc-overflow's
+ * generated class names directly -- if those selectors go stale (as
+ * happened during the antd v5->v6 upgrade), the cap silently stops
+ * applying and the Select wraps to multiple rows instead of staying at
+ * the same height as the Input beside it.
+ */
+export const OneLineHeightParity = () => (
+ <div style={{ display: 'flex', gap: 8, width: 500 }}>
+ <div style={{ flex: 1 }}>
+ <Select
+ ariaLabel="oneline-height-parity-select"
+ mode="multiple"
+ oneLine
+ options={manyPermissionOptions}
+ value={manyPermissionOptions.slice(0, 5).map(o => o.value)}
+ />
+ </div>
+ <div style={{ flex: 1 }}>
+ <Input aria-label="oneline-height-parity-input" value="Sibling input" />
+ </div>
+ </div>
+);
+
export const PageScroll = () => (
<div style={{ height: 2000, overflowY: 'auto' }}>
<div
diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx
index 0c6f9294013..107b1ecaa95 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx
@@ -54,12 +54,12 @@ export const StyledSelect = styled(Select, {
flex: ${headerPosition === 'left' ? 1 : 0};
line-height: ${theme.sizeXL}px;
- && .ant-select-input {
+ && .ant-select-selection-search {
left: 0px;
}
&& .ant-select-selection-item,
- && .ant-select-placeholder {
+ && .ant-select-selection-placeholder {
max-height: ${theme.sizeXL}px;
}
.ant-select-selection-item::after {
@@ -69,16 +69,16 @@ export const StyledSelect = styled(Select, {
${
oneLine &&
`
- .ant-select-content {
+ .ant-select-selection-overflow {
flex-wrap: nowrap;
}
- .ant-select-content-item:not(.ant-select-content-item-rest):not(.ant-select-content-item-suffix) {
+ .ant-select-selection-overflow-item:not(.ant-select-selection-overflow-item-rest):not(.ant-select-selection-overflow-item-suffix) {
flex-shrink: 1;
min-width: ${theme.sizeUnit * 13}px;
}
- .ant-select-content-item-suffix {
+ .ant-select-selection-overflow-item-suffix {
flex: unset;
min-width: 0px;
}