mikebridge opened a new pull request, #44274: URL: https://github.com/apache/superset/pull/44274
### SUMMARY The popovers that open from the "Drop columns here or click" / "Drop a column/metric here or click" ghost buttons render detached from their control — floating over the control panel, or pinned to the top-left corner of the viewport. The chips' *edit* popovers, opened from an existing option row, are positioned correctly. **Root cause.** Those "add new" popovers are controlled and pass an empty `<div />` as the trigger child, and each trigger component wraps the child in a bare inline `<span>`: * `superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopoverTrigger.tsx:207` * `superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricPopoverTrigger.tsx:371` * `superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterPopoverTrigger/index.tsx:113` antd/rc-trigger anchors the popup to that wrapper's box. An inline `<span>` around block content — and around the empty placeholder these three use — measures 0×0 at the control's left edge, so the popup is positioned relative to a *point* rather than to the control. The chip popovers are unaffected because their child is the visible option row, which has a real box. The fix makes the wrapper block-level so the popup anchors to the child's box. The `<span>` itself stays: it exists so the Popover can attach a ref without `findDOMNode` (deprecated in React 18+), and that comment is preserved and extended with the reason it must not be inline. **When it regressed.** The bare `<span>` wrappers were introduced by **#40012** (`664e777a84`, 2026-06-17, `chore(deps): bump react to ^18.3.0`) — the change that removed the `findDOMNode` dependency; `git log -S` on the wrapper comment points at that commit for all three files. Separately, **#42614** (`473f447c1b`, 2026-07-30) introduced `SHIFT_INTO_VIEWPORT` in `ControlPopover.tsx`; that is a plausible explanation for the symptom *changing* — a 0×0 anchor near the panel's left edge fails the ratio-based placement check and gets flipped into the corner — rather than the origin of the bad anchor. I have verified the two commits and what each introduced; the symptom-change half is reasoning from the code, not bisected. Reproduces on a plain table dataset as well as on a semantic view, so it is not datasource-specific. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Before: clicking "Drop columns here or click" opens the Simple/Custom SQL popover detached from the control (over the panel, or in the viewport's top-left corner). After: the popover opens attached to the control it was triggered from. No change to the chips' edit popovers, which were already correct. ### TESTING INSTRUCTIONS 1. Open Explore on any chart with a table dataset. 2. Click "Drop columns here or click" on Dimensions (and the equivalent on Metrics and Filters). 3. The popover opens anchored to that control. Editing an existing chip still opens its popover in place. ``` cd superset-frontend npm run test -- src/explore/components/controls/DndColumnSelectControl src/explore/components/controls/ControlPopover ``` A Jest pin in `DndColumnSelect.test.tsx` asserts the open trigger has a block-level box; it was verified red-first (reverting the wrapper to a bare `<span>` fails it). The directly affected suites pass (28 tests across `DndColumnSelect`, `ColumnSelectPopoverTrigger`, `ControlPopover`). Two failures elsewhere in `src/explore/components/controls` — `AdhocFilterEditPopoverSqlTabContent` and `DndMetricSelect` — reproduce identically on an unmodified `master` checkout and are unrelated to this change. ### ADDITIONAL INFORMATION - [x] Has associated issue: sc-120502 - [ ] 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) https://claude.ai/code/session_01267VBWbvWTNZUg9GvXKgkC -- 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]
