codeant-ai-for-open-source[bot] commented on code in PR #40032:
URL: https://github.com/apache/superset/pull/40032#discussion_r3456284593


##########
superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx:
##########
@@ -595,12 +608,7 @@ export default function PluginFilterSelect(props: 
PluginFilterSelectProps) {
               allowSelectAll={!searchAllOptions}
               value={multiSelect ? filterState.value || [] : filterState.value}
               disabled={isDisabled}
-              getPopupContainer={
-                showOverflow
-                  ? () => (parentRef?.current as HTMLElement) || document.body
-                  : (trigger: HTMLElement) =>
-                      (trigger?.parentNode as HTMLElement) || document.body
-              }
+              getPopupContainer={getSelectPopupContainer}

Review Comment:
   **Suggestion:** The popup-container fix is only wired to the main value 
select, so when inverse selection is enabled the `exclude-select` still uses 
the default container (`triggerNode.parentNode`) and can reproduce the same 
overlap issue in dashboard mode. Apply the same popup-container logic to the 
exclusion select as well so all dashboard select dropdowns are mounted 
consistently. [incomplete implementation]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ Inverse "is/is not" dropdown can obscure value select.
   - ⚠️ Native dashboard Value filters break on small viewports.
   - ⚠️ Tests cover main select popup, not inverse select.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Configure a native Value filter with inverse selection enabled in the 
Filter Config
   modal. This sets `inverseSelection: true` in the filter's form data via the
   `inverseSelection` control key defined in `controlsOrder` in
   
`superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:10-17`.
   
   2. Load a dashboard using this filter. The filter bar renders 
`FilterControl`, which in
   turn renders `FilterValue`, passing `showOverflow` and `parentRef` through 
to `SuperChart`
   at
   
`superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx:46-64`.
   `SuperChart` instantiates the `filter_select` chart plugin 
(`SelectFilterPlugin`) with
   `appSection: AppSection.Dashboard` and `showOverflow` derived from the 
filter bar,
   matching the props construction in `buildSelectFilterProps` in
   
`superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx:93-110`.
   
   3. In `SelectFilterPlugin`, with `inverseSelection` true and `appSection !==
   AppSection.FilterConfigModal`, the component renders the inverse "is not/is" 
select via
   `<Select className="exclude-select" ...>` at
   
`superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx:578-138`
 (printed
   lines 129-138 in the 450-offset read). This `Select` does NOT receive a
   `getPopupContainer` prop, so it retains the library default popup container 
(the trigger
   node's parent element), unlike the main value `Select` below, which uses
   `getPopupContainer={getSelectPopupContainer}` at 
`SelectFilterPlugin.tsx:611`.
   
   4. On a short viewport or high browser zoom (the layout condition described 
in the PR),
   open the inverse "is not/is" dropdown on the dashboard. Because its popup is 
still
   anchored to the filter container instead of `document.body`, the dropdown 
can overlap and
   obscure the main value select input, reproducing the original overlap bug 
for the inverse
   path. The new unit test `renders dashboard select dropdown popup under 
document body` in
   `SelectFilterPlugin.test.tsx:108-145` only exercises the main value select 
(default
   `inverseSelection: false`), so this inverse-select overlap remains untested 
and unfixed.
   ```
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=75aac434889343b993240c81d90bf8aa&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=75aac434889343b993240c81d90bf8aa&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
   **Line:** 611:611
   **Comment:**
        *Incomplete Implementation: The popup-container fix is only wired to 
the main value select, so when inverse selection is enabled the 
`exclude-select` still uses the default container (`triggerNode.parentNode`) 
and can reproduce the same overlap issue in dashboard mode. Apply the same 
popup-container logic to the exclusion select as well so all dashboard select 
dropdowns are mounted consistently.
   
   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.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40032&comment_hash=717320d625341e44433ef3a85225c7925ae4f7ac42a40729e9d1398c16de9be7&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40032&comment_hash=717320d625341e44433ef3a85225c7925ae4f7ac42a40729e9d1398c16de9be7&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: [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]

Reply via email to