mikebridge commented on code in PR #44274:
URL: https://github.com/apache/superset/pull/44274#discussion_r4039004826
##########
superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx:
##########
@@ -201,9 +201,13 @@ const ColumnSelectPopoverTriggerInner = ({
title={popoverTitle}
destroyOnHidden
>
- {/* Wrap in span so the Popover can attach a ref without relying
- on findDOMNode (deprecated in React 18+). */}
- <span>{children}</span>
+ {/* Wrap in a span so the Popover can attach a ref without relying
+ on findDOMNode (deprecated in React 18+). It must be block-level:
+ antd anchors the popup to this element's box, and a bare inline
+ span around block content (or the empty placeholder the "add new"
+ popovers use) measures 0×0 at the control's left edge, which
+ renders the popover detached (sc-120502). */}
+ <span style={{ display: 'block' }}>{children}</span>
Review Comment:
Good catch — addressed in 80456cdc2c6b281b5fb5ce47240904ecf959c3c5. Both
Contour and ColorBreakpoint triggers retain a ref-compatible block-width anchor
without artificial height. The two new regressions failed before the fix and
pass after it; final candidate-coherent checks passed 74 affected tests and all
scoped hooks, including frontend type-checking. The merge also preserves the
upstream semantic-picker tests. Fresh CI is still pending.
##########
superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx:
##########
@@ -201,9 +201,13 @@ const ColumnSelectPopoverTriggerInner = ({
title={popoverTitle}
destroyOnHidden
>
- {/* Wrap in span so the Popover can attach a ref without relying
- on findDOMNode (deprecated in React 18+). */}
- <span>{children}</span>
+ {/* Wrap in a span so the Popover can attach a ref without relying
+ on findDOMNode (deprecated in React 18+). It must be block-level:
+ antd anchors the popup to this element's box, and a bare inline
+ span around block content (or the empty placeholder the "add new"
+ popovers use) measures 0×0 at the control's left edge, which
+ renders the popover detached (sc-120502). */}
+ <span style={{ display: 'block' }}>{children}</span>
Review Comment:
Thanks for the measured distinction —
80456cdc2c6b281b5fb5ce47240904ecf959c3c5 qualifies all five wrapper comments
around the zero-height placeholder case and explains that right placement
depends on width, not added height. Nonempty block children are no longer
described as necessarily collapsing.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]