You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "fitzee (via GitHub)" <gi...@apache.org> on 2026/08/28 03:23:06 UTC

[PR] fix(dashboard): keep filter config modal within iframe [superset]

fitzee opened a new pull request, #43632:
URL: https://github.com/apache/superset/pull/43632

   ### SUMMARY
   
   Fixes [SC-111114](https://app.shortcut.com/preset/story/111114), where the native-filter configuration surface and its time-range editor can be clipped when all of Superset is hosted in a constrained iframe.
   
   The reported screenshot and source inspection exposed two related layout assumptions:
   
   - the filter modal enforced an 880px minimum width and only relaxed it through a viewport media query;
   - its descendants independently sized themselves with `70vh` / `calc(100vh - ...)`, so the sidebar and tab content did not derive their height from the modal;
   - the 600px time-range popover explicitly disabled `ControlPopover` overflow adjustment, allowing a corner placement to extend outside the iframe.
   
   This change repairs those constraints at their enforcement points without trying to detect an embedded context:
   
   - cap normal and expanded modal widths to their actual containing block, with a 16px gutter, instead of enforcing a hard minimum;
   - complete the modal/form flex height chain and let the sidebar and tabs consume that height rather than independently measuring the viewport;
   - cap the time-range editor to its popup container and restore `ControlPopover`'s built-in flip/shift behavior.
   
   Focused regression tests protect both the modal width/height constraints and the time-range popover width.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   The customer-provided before screenshot is attached to [SC-111114](https://app.shortcut.com/preset/story/111114). A local Superset server was not available in this isolated worktree for an after screenshot; the responsive constraints are covered by the focused component tests below.
   
   ### TESTING INSTRUCTIONS
   
   Automated:
   
   ```bash
   cd superset-frontend
   npx jest --runInBand --silent \
     src/dashboard/components/nativeFilters/ConfigModal/SharedStyles.test.tsx \
     src/explore/components/controls/DateFilterControl/tests/DateFilterLabel.test.tsx
   # 2 suites passed, 8 tests passed
   
   cd ..
   pre-commit run
   # all applicable hooks passed, including oxfmt, oxlint, custom rules,
   # stylelint, and targeted frontend type checking
   ```
   
   Manual verification:
   
   1. Host the full Superset application in an iframe narrower than the browser window.
   2. Open a dashboard, enter edit mode, and open **Add or edit display controls**.
   3. Create/edit a time-range filter, enable **Pre-filter available values**, then open the **Time range** editor.
   4. Verify the filter modal retains a gutter inside the iframe, its sidebar and configuration panes scroll within the modal, and the time-range editor flips/shifts without crossing the iframe edge.
   5. Repeat at a normal desktop width and verify the modal remains 880px wide and the time-range editor remains 600px wide.
   6. Expand the modal and verify it fills the available iframe width while retaining the gutter.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: [SC-111114](https://app.shortcut.com/preset/story/111114)
   - [ ] 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
   
   


-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "fitzee (via GitHub)" <gi...@apache.org>.
fitzee commented on code in PR #43632:
URL: https://github.com/apache/superset/pull/43632#discussion_r3901953047


##########
superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx:
##########
@@ -359,7 +358,7 @@ export default function DateFilterLabel(props: DateFilterControlProps) {
       defaultOpen={show}
       open={show}
       onOpenChange={toggleOverlay}
-      overlayStyle={{ width: '600px' }}
+      overlayStyle={{ width: 'min(600px, calc(100% - 32px))' }}

Review Comment:
   Agreed. Changed the cap to `min(600px, calc(100vw - 32px))`, so it remains relative to the iframe viewport when the popup is mounted inside **More filters** rather than inheriting that dropdown's width. The regression test now asserts the viewport-relative cap in both `getPopupContainer` modes. Implemented in `6f3a0c8947` and `d151f63eee`.
   



##########
superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/SharedStyles.tsx:
##########
@@ -75,9 +73,10 @@ export const BaseModalWrapper = styled(StyledModal)<BaseModalWrapperProps>`
 export const BaseModalBody = styled.div<BaseModalBodyProps>`
   display: flex;
   height: 100%;
-  min-height: 500px;
+  min-height: 0;

Review Comment:
   Confirmed by the independent Chromium reproduction. I removed the percentage-height refactor rather than trying to patch an indefinite chain: `BaseModalBody` is back to its 500px floor, `BaseForm` no longer adds percentage heights, and the existing independently scrollable sidebar/tab constraints are restored. The PR description has been narrowed accordingly; it no longer claims a modal-height repair. Implemented in `6f3a0c8947`.
   



##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalSidebar/ConfigModalSidebar.tsx:
##########
@@ -36,14 +36,12 @@ import { FilterRemoval } from '../types';
 import { FILTER_TYPE, CUSTOMIZATION_TYPE } from '../DraggableFilter';
 import { isFilterId, isChartCustomizationId, isDivider } from '../utils';
 
-// max-height constrains the sidebar so its inner Collapse can scroll when
-// there are many filters (sc-101839). The parent height chain through the
-// antd Form is unreliable, so a viewport-relative max-height is used instead
-// of height: 100%.
 const StyledSidebarFlex = styled(Flex)`
   min-width: 290px;
   max-width: 290px;
-  max-height: 70vh;
+  height: 100%;

Review Comment:
   Agreed. Restored `max-height: 70vh` and the sc-101839 comment verbatim. The parent height chain is not treated as complete, and the PR description explicitly records why the height leg was removed. Implemented in `6f3a0c8947`.
   



##########
superset-frontend/src/explore/components/controls/DateFilterControl/tests/DateFilterLabel.test.tsx:
##########
@@ -99,8 +99,11 @@ test('DateFilter popover should attach to document.body when not overflowing', (
 
   userEvent.click(screen.getByText(NO_TIME_RANGE));
 
-  const popover = document.querySelector('.time-range-popover');
+  const popover = document.querySelector<HTMLElement>('.time-range-popover');
   expect(popover?.parentElement).toBe(document.body);
+  expect(popover).toHaveStyle({

Review Comment:
   Agreed. Added a probe around the underlying Superset `Popover` and a focused assertion that opening `DateFilterLabel` passes `SHIFT_INTO_VIEWPORT` as the resolved `autoAdjustOverflow` value. Re-adding `autoAdjustOverflow={false}` would fail that test. The existing declaration assertion is retained and now covers the `100vw` cap in both popup-container modes. Implemented in `6f3a0c8947` and `d151f63eee`.
   



##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:
##########
@@ -967,7 +967,7 @@ const FiltersConfigForm = (
   return (
     <Tabs
       allowOverflow={false}
-      contentHeight={`calc(100vh - ${theme.sizeUnit * 55}px)`}
+      fullHeight

Review Comment:
   Confirmed. Removed `fullHeight` and restored the explicit `contentHeight={calc(100vh - ...)}` anchor, preserving the existing `.ant-tabs-body-holder` scrolling behavior in the non-expanded modal. The entire height leg is out of the PR. Implemented in `6f3a0c8947`.
   



-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "fitzee (via GitHub)" <gi...@apache.org>.
fitzee commented on code in PR #43632:
URL: https://github.com/apache/superset/pull/43632#discussion_r3901953047


##########
superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx:
##########
@@ -359,7 +358,7 @@ export default function DateFilterLabel(props: DateFilterControlProps) {
       defaultOpen={show}
       open={show}
       onOpenChange={toggleOverlay}
-      overlayStyle={{ width: '600px' }}
+      overlayStyle={{ width: 'min(600px, calc(100% - 32px))' }}

Review Comment:
   Agreed. Changed the cap to `min(600px, calc(100vw - 32px))`, so it remains relative to the iframe viewport when the popup is mounted inside **More filters** rather than inheriting that dropdown's width. The regression test now asserts the viewport-relative cap in both `getPopupContainer` modes. Implemented in `0a412bdd0f` and `972844d8c9`.
   



##########
superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/SharedStyles.tsx:
##########
@@ -75,9 +73,10 @@ export const BaseModalWrapper = styled(StyledModal)<BaseModalWrapperProps>`
 export const BaseModalBody = styled.div<BaseModalBodyProps>`
   display: flex;
   height: 100%;
-  min-height: 500px;
+  min-height: 0;

Review Comment:
   Confirmed by the independent Chromium reproduction. I removed the percentage-height refactor rather than trying to patch an indefinite chain: `BaseModalBody` is back to its 500px floor, `BaseForm` no longer adds percentage heights, and the existing independently scrollable sidebar/tab constraints are restored. The PR description has been narrowed accordingly; it no longer claims a modal-height repair. Implemented in `0a412bdd0f`.
   



##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalSidebar/ConfigModalSidebar.tsx:
##########
@@ -36,14 +36,12 @@ import { FilterRemoval } from '../types';
 import { FILTER_TYPE, CUSTOMIZATION_TYPE } from '../DraggableFilter';
 import { isFilterId, isChartCustomizationId, isDivider } from '../utils';
 
-// max-height constrains the sidebar so its inner Collapse can scroll when
-// there are many filters (sc-101839). The parent height chain through the
-// antd Form is unreliable, so a viewport-relative max-height is used instead
-// of height: 100%.
 const StyledSidebarFlex = styled(Flex)`
   min-width: 290px;
   max-width: 290px;
-  max-height: 70vh;
+  height: 100%;

Review Comment:
   Agreed. Restored `max-height: 70vh` and the sc-101839 comment verbatim. The parent height chain is not treated as complete, and the PR description explicitly records why the height leg was removed. Implemented in `0a412bdd0f`.
   



##########
superset-frontend/src/explore/components/controls/DateFilterControl/tests/DateFilterLabel.test.tsx:
##########
@@ -99,8 +99,11 @@ test('DateFilter popover should attach to document.body when not overflowing', (
 
   userEvent.click(screen.getByText(NO_TIME_RANGE));
 
-  const popover = document.querySelector('.time-range-popover');
+  const popover = document.querySelector<HTMLElement>('.time-range-popover');
   expect(popover?.parentElement).toBe(document.body);
+  expect(popover).toHaveStyle({

Review Comment:
   Agreed. Added a probe around the underlying Superset `Popover` and a focused assertion that opening `DateFilterLabel` passes `SHIFT_INTO_VIEWPORT` as the resolved `autoAdjustOverflow` value. Re-adding `autoAdjustOverflow={false}` would fail that test. The existing declaration assertion is retained and now covers the `100vw` cap in both popup-container modes. Implemented in `0a412bdd0f` and `972844d8c9`.
   



##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:
##########
@@ -967,7 +967,7 @@ const FiltersConfigForm = (
   return (
     <Tabs
       allowOverflow={false}
-      contentHeight={`calc(100vh - ${theme.sizeUnit * 55}px)`}
+      fullHeight

Review Comment:
   Confirmed. Removed `fullHeight` and restored the explicit `contentHeight={calc(100vh - ...)}` anchor, preserving the existing `.ant-tabs-body-holder` scrolling behavior in the non-expanded modal. The entire height leg is out of the PR. Implemented in `0a412bdd0f`.
   



-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi merged PR #43632:
URL: https://github.com/apache/superset/pull/43632


-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #43632:
URL: https://github.com/apache/superset/pull/43632#discussion_r3877776973


##########
superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/SharedStyles.tsx:
##########
@@ -75,9 +73,10 @@ export const BaseModalWrapper = styled(StyledModal)<BaseModalWrapperProps>`
 export const BaseModalBody = styled.div<BaseModalBodyProps>`
   display: flex;
   height: 100%;
-  min-height: 500px;
+  min-height: 0;

Review Comment:
   This drops the only definite height anchor in the non-expanded modal. Every replacement in this PR (`height: 100%` here and on `BaseForm`, `height/max-height: 100%` on `StyledSidebarFlex`, `fullHeight` on the config `Tabs`) is a percentage, and the chain terminates at `.ant-modal-container`, which has `max-height: calc(100vh - 32px)` but **no** `height` (`packages/superset-ui-core/src/components/Modal/Modal.tsx:91`). `BaseModalWrapper` only sets `height: 100%` in the `expanded` branch.
   
   So for the default (non-expanded) modal the ancestor height is `auto`, percentage heights can resolve to `auto`, and the new `overflow: hidden` on this element then has no scrolling descendant to hand overflow to. Two cases worth checking in a browser:
   
   - short content (single filter): the `min-height: 500px` floor is gone, so the modal can render much shorter than before;
   - long filter list: whether the sidebar `Collapse` (`overflow: auto`) still gets a bounded height, or whether content is clipped by this `overflow: hidden` with no scrollbar.
   
   The added tests assert CSS declarations via `toHaveStyleRule`, which cannot observe either outcome, and the PR description notes no local server was available for an after-screenshot. Given that, a manual pass over non-expanded/expanded × short/long content before merge would be worth it.



##########
superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx:
##########
@@ -359,7 +358,7 @@ export default function DateFilterLabel(props: DateFilterControlProps) {
       defaultOpen={show}
       open={show}
       onOpenChange={toggleOverlay}
-      overlayStyle={{ width: '600px' }}
+      overlayStyle={{ width: 'min(600px, calc(100% - 32px))' }}

Review Comment:
   `100%` here is not the viewport. In the `isOverflowingFilterBar` branch just below, `getPopupContainer` returns `nodeTrigger.parentNode`, which lives inside the "More filters" `DropdownContainer` popover. `.ant-popover` is `position: absolute`, so it becomes the containing block for the nested time-range popover and `calc(100% - 32px)` resolves against that dropdown's content-sized width (typically well under 600px) rather than against the window.
   
   Net effect: the fix works on the `document.body` leg but shrinks the time-range editor in the horizontal filter bar overflow menu, which is a non-iframe path. `calc(100vw - 32px)` gives the same iframe behaviour (an iframe's `vw` is the iframe viewport) without depending on the popup container:
   
   ```suggestion
         overlayStyle={{ width: 'min(600px, calc(100vw - 32px))' }}
   ```



##########
superset-frontend/src/explore/components/controls/DateFilterControl/tests/DateFilterLabel.test.tsx:
##########
@@ -99,8 +99,11 @@ test('DateFilter popover should attach to document.body when not overflowing', (
 
   userEvent.click(screen.getByText(NO_TIME_RANGE));
 
-  const popover = document.querySelector('.time-range-popover');
+  const popover = document.querySelector<HTMLElement>('.time-range-popover');
   expect(popover?.parentElement).toBe(document.body);
+  expect(popover).toHaveStyle({

Review Comment:
   This covers the `overlayStyle` half only. Re-adding `autoAdjustOverflow={false}` to `ControlPopover` and leaving everything else at PR head keeps all 6 tests in this file green — so the "restore `ControlPopover`'s built-in flip/shift behavior" part of the fix, which is the behavioural change, is unverified.
   
   `ControlPopover` resolves `autoAdjustOverflow ?? getAutoAdjustOverflow(placement)`, and with `placement="right"` that yields `SHIFT_INTO_VIEWPORT` (`adjustX/adjustY: 1`, `shiftX/shiftY: true`). An assertion on the resolved `autoAdjustOverflow` reaching the popover would close the gap.



##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalSidebar/ConfigModalSidebar.tsx:
##########
@@ -36,14 +36,12 @@ import { FilterRemoval } from '../types';
 import { FILTER_TYPE, CUSTOMIZATION_TYPE } from '../DraggableFilter';
 import { isFilterId, isChartCustomizationId, isDivider } from '../utils';
 
-// max-height constrains the sidebar so its inner Collapse can scroll when
-// there are many filters (sc-101839). The parent height chain through the
-// antd Form is unreliable, so a viewport-relative max-height is used instead
-// of height: 100%.
 const StyledSidebarFlex = styled(Flex)`
   min-width: 290px;
   max-width: 290px;
-  max-height: 70vh;
+  height: 100%;

Review Comment:
   The comment removed here documented sc-101839 and said explicitly that "the parent height chain through the antd Form is unreliable, so a viewport-relative max-height is used instead of `height: 100%`" — which is the exact substitution being made. If the chain is genuinely complete now, please say so in the PR description (and ideally replace the comment with one explaining what closed it), so the next person doesn't re-derive the same conclusion. If it isn't, this reopens sc-101839. Same question as the `SharedStyles.tsx` thread.



-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43632:
URL: https://github.com/apache/superset/pull/43632#issuecomment-5448001035

   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(dashboard): keep filter config modal within iframe [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43632:
URL: https://github.com/apache/superset/pull/43632#issuecomment-5448117815

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43632?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 79.17%. Comparing base ([`13e97ba`](https://app.codecov.io/gh/apache/superset/commit/13e97ba9139d15340e5e44621d54075a0b76adec?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8d53709`](https://app.codecov.io/gh/apache/superset/commit/8d53709d99bf223b56ee43ac8e5cac15891bec20?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 4 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #43632   +/-   ##
   =======================================
     Coverage   79.17%   79.17%           
   =======================================
     Files        2879     2879           
     Lines      165819   165819           
     Branches    38330    38330           
   =======================================
   + Hits       131290   131291    +1     
   + Misses      32056    32055    -1     
     Partials     2473     2473           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/43632/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/43632/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `74.60% <100.00%> (+<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 Harness](https://app.codecov.io/gh/apache/superset/pull/43632?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(dashboard): keep filter config modal within iframe [superset]

Posted by "mikebridge (via GitHub)" <gi...@apache.org>.
mikebridge commented on PR #43632:
URL: https://github.com/apache/superset/pull/43632#issuecomment-5455330080

   Ran a five-lens review of this at `8d53709d`. It confirms every point in @aminghadersohi's threads and adds a few things — the short version is that the height leg should come out of this PR rather than be patched, and the PR needs a real host+iframe reproduction because most of it doesn't touch the reported symptom.
   
   **Blocker — the default (non-expanded) modal stops scrolling on desktop.** Amin asked whether the `height: 100%` chain actually resolves; four independent headless-Chromium replicas of the antd 6 modal chain say it doesn't. `.ant-modal-container` has `max-height: calc(100vh - 32px)` but no `height` outside the `expanded` branch, so every percentage below it computes to `auto` (Flexbox §9.8), the sidebar Collapse and `.ant-tabs-body-holder` grow to content height, and the `overflow: hidden` on `.ant-modal-body` (and the new one on `BaseModalBody`) clips with no scrollbar. Numbers at 1280×800 with 40 filters + a 2000px form — before: sidebar client/scroll 518/1640, tab holder 596/2016 (both scroll); after: 1640/1640 and 2016/2016 (neither scrolls, ~1000–1400px unreachable). Same at 700×500, so inside an iframe it only works after clicking **Expand**. This is the failure the deleted sc-101839 comment in `ConfigModalSidebar.tsx` was warning about.
   
   Two fixes, both verified in the replica: (a) keep the `vh` anchors (`max-height: 70vh`, `contentHeight`) — `vh` already resolves against the iframe's own viewport, so they were never the iframe problem — and drop only the width change and the 500px floor; or (b) keep the chain and give `.ant-modal-container` a definite height in the non-expanded branch too. (a) is smaller and keeps the height refactor bisectable as its own PR.
   
   **High**
   - `DateFilterLabel.tsx:361` — as Amin says, `calc(100% - 32px)` resolves against the "More filters" dropdown on the overflowing-filter-bar leg; measured at ~216px vs 600px before, on a plain desktop horizontal filter bar. `min(600px, calc(100vw - 32px))` gives the intended behaviour on both legs, since an iframe's `vw` is the iframe viewport.
   - **The width and height legs are behaviour-neutral inside an iframe.** `@media (max-width: 912px)`, `vh`, `vw`, antd's own `.ant-modal { max-width: calc(100vw - 32px) }` and the PR's `100%` of the fixed `.ant-modal-wrap` all measure the iframe's viewport, so old and new CSS produce identical modal geometry (880px at 1280, 668px at 700, before and after). SC-111114 describes the host page's sidebar covering the left of the iframe — occlusion from *outside* the iframe, which nothing inside it can observe. Could you reproduce in the customer's actual host+iframe geometry and attach before/after? If the iframe is wider than its visible region, the remedy is host-side.
   - The `autoAdjustOverflow={false}` removal is the one leg that could plausibly change what the customer sees, and it's global (Explore, vertical filter bar, config modal — not iframe-scoped) and untested: a control run with the prop re-added keeps all 6 `DateFilterLabel` tests green. `ControlPopover.test.tsx:252-288` has the pattern for asserting the resolved prop; and a line in the description on why the #31973 opt-out is safe to drop would help.
   
   **Smaller**
   - `width: min(…, calc(100% - 32px)) !important` plus `max-width: calc(100% - 32px)` say the same thing (`max-width` always wins), and for `expanded` the `min()` collapses to `calc(100% - 32px)`; antd already applies the same `vw` cap. One `width` line + one `max-width` (with a comment that it overrides antd's `vw`-based cap) reads clearer, and `MIN_WIDTH` no longer means minimum.
   - The new `SharedStyles` tests are non-vacuous but assert declaration strings — they pass while the layout above is broken. The property worth guarding ("with N filters at 700×500 the sidebar scrolls and the last filter is reachable, expanded and not") is a Playwright spec.
   - `max-height: 100%` beside `height: 100%` is inert; the `toHaveStyle` on `min(…)` passes via a jsdom/cssstyle serialisation quirk (both sides mangle identically) — a prop assertion on `ControlPopover` is sturdier.
   - Nice: `min-height: 0` on each flex link is the right discipline and should survive whichever fix lands; using Tabs `fullHeight` over the `calc(100vh - sizeUnit*55)` magic number is the right direction. The old non-expanded rule was the unitless `width: 880 !important` (invalid, silently dropped) — worth a line in the description that this fixes it incidentally.
   
   CI: the CANCELLED/FAILURE entries in the rollup are from the run superseded at 03:29Z; the re-run is fully green, so no re-run needed.
   
   _Review produced by five AI lenses (react, css, preset, committer, clean-code) with independent headless-Chromium layout replicas; posted by @mikebridge after reading. Full report in the spec repo._
   


-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "mikebridge (via GitHub)" <gi...@apache.org>.
mikebridge commented on PR #43632:
URL: https://github.com/apache/superset/pull/43632#issuecomment-5457215337

   Fair correction on the `toHaveStyle` assertion, @aminghadersohi — it does discriminate (revert-only-`DateFilterLabel.tsx` fails it), so it isn't vacuous; my comment overweighted the jsdom `min()` serialisation quirk. The limitation is the one you name: declaration-level, so it can't see the layout regression. Keep the assertions; the layout claim wants a Playwright spec. Thanks for running the replica independently — same numbers, same branch-specific conclusion.


-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "fitzee (via GitHub)" <gi...@apache.org>.
fitzee commented on PR #43632:
URL: https://github.com/apache/superset/pull/43632#issuecomment-5490758670

   @aminghadersohi @mikebridge Thank you for the independent replicas and the correction on the style assertion. I addressed the actionable review at `d151f63eee` (implementation changes are in `6f3a0c8947`):
   
   - **Blocker — height regression:** removed the height leg in full. The 500px body floor, `70vh` sidebar cap plus sc-101839 rationale, and explicit tab `contentHeight` are restored. There is no indefinite percentage-height chain left in the PR.
   - **Nested popup containing block:** changed the cap from `%` to `100vw`, and asserted the result in both body-mounted and **More filters**-mounted modes.
   - **Overflow behavior:** added a probe test at the underlying Superset `Popover`; opening `DateFilterLabel` must pass `SHIFT_INTO_VIEWPORT`. This tests the resolved behavioral prop rather than only the CSS declaration. Dropping the old local `false` override reuses `ControlPopover`'s tested standard flip/shift path; it does not restore the removed modal-overlay styling from the earlier z-index fix.
   - **Width cleanup:** replaced the minimum/media-query split with an 880px target plus a containing-block `max-width`, renamed the constant, and fixed the old invalid unitless normal-width declaration.
   - **Scope/evidence:** the PR description is rewritten to stop claiming a host-occlusion or modal-height repair. The customer host page and a runnable local Superset server are unavailable here, and CSS inside the iframe cannot observe occlusion introduced outside it. Because the layout-changing height leg was removed, I did not add a Playwright test for that reverted behavior; focused component coverage protects the remaining declaration and Popover-prop enforcement points. Customer-host validation remains called out as a residual requirement.
   
   Validation:
   
   ```text
   3 Jest suites passed, 17 tests passed
   staged pre-commit: all applicable hooks passed
   ```
   
   I replied on and resolved all five inline threads. The deployment, Codecov, and Bito bot comments were informational/green and requested no code changes.
   


-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #43632:
URL: https://github.com/apache/superset/pull/43632#discussion_r3904249578


##########
superset-frontend/src/explore/components/controls/DateFilterControl/tests/DateFilterLabel.test.tsx:
##########
@@ -123,19 +140,41 @@ test('DateFilter popover should attach to document.body when not overflowing', (
 
   userEvent.click(screen.getByText(NO_TIME_RANGE));
 
-  const popover = document.querySelector('.time-range-popover');
+  const popover = document.querySelector<HTMLElement>('.time-range-popover');
   expect(popover?.parentElement).toBe(document.body);
+  expect(popover).toHaveStyle({
+    width: 'min(600px, calc(100vw - 32px))',
+  });
+});
+
+test('DateFilter popover shifts into the viewport', async () => {
+  render(setup());
+
+  userEvent.click(screen.getByText(NO_TIME_RANGE));
+
+  await waitFor(() => {
+    expect(mockPopoverProps).toEqual(
+      expect.arrayContaining([
+        expect.objectContaining({
+          autoAdjustOverflow: SHIFT_INTO_VIEWPORT,

Review Comment:
   NIT, optional. This asserts the value that only applies to *non*-cardinal placements. `getAutoAdjustOverflow` returns `true` for `top`/`bottom`/`left`/`right` and `SHIFT_INTO_VIEWPORT` for everything else (`ControlPopover.tsx:80-81`), and `placement="right"` is passed in — so the reason this reads `SHIFT_INTO_VIEWPORT` is that jsdom's zeroed `getBoundingClientRect` sends `calculatePlacement` down the `xRatio < 0.35` / `yRatio < 0.35` path to `rightTop`. The test passing is itself the evidence, since a `right` placement would have resolved to `true`.
   
   It does discriminate the thing I asked for — re-adding `autoAdjustOverflow={false}` reds it, I checked. The brittleness is that a trigger mid-viewport resolves to `left` and therefore `true`, which is equally correct flip/shift behaviour that this assertion would reject, and adding `rightTop` to `SHIFTING_PLACEMENTS` would break it for an unrelated reason. `expect(...).toEqual(expect.objectContaining({ autoAdjustOverflow: expect.not.falsy }))` isn't a thing, but asserting the recorded `placement` alongside the value, or just that it is not `false`, would pin the intent without pinning jsdom's layout.



##########
superset-frontend/src/dashboard/components/nativeFilters/ConfigModal/SharedStyles.tsx:
##########
@@ -31,13 +31,9 @@ export interface BaseModalBodyProps {
 }
 
 export const BaseModalWrapper = styled(StyledModal)<BaseModalWrapperProps>`
-  min-width: ${MIN_WIDTH}px;
-  width: ${({ expanded }) => (expanded ? '100%' : MIN_WIDTH)} !important;
-
-  @media (max-width: ${MIN_WIDTH + MODAL_MARGIN * 2}px) {
-    width: 100% !important;
-    min-width: auto;
-  }
+  width: ${({ expanded }) =>
+    expanded ? '100%' : `${MODAL_WIDTH}px`} !important;

Review Comment:
   NIT, optional. This pins the width where master let it grow. Master had `min-width: 880px` with antd's `width: auto` on an `inline-block` (`.ant-modal-centered .ant-modal`), i.e. shrink-to-fit with an 880 floor; this is a hard 880. With normal content the two are identical at every width I measured, so this is not a live regression. But with a child wider than 880 the replica diverges:
   
   | intrinsic-1400px child | master | this head |
   |---|---|---|
   | @1600x900 | 1568 | 880 |
   | @1280x800 | 1248 | 880 |
   
   Since `.ant-modal-body` is `overflow: hidden` (line 42), anything that did exceed 880 would now be clipped rather than widen the modal. I could not find content in this modal with an intrinsic width over 880 — the form items are 260px/49% — so I think this is fine and probably the behaviour you actually intended, given the old unitless `880` was invalid and never applied. Flagging it only so the trade is a choice rather than a side effect; `min-width` alongside the `max-width` would preserve the old growth if you'd rather keep it.



-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43632:
URL: https://github.com/apache/superset/pull/43632#issuecomment-5493091417

   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 an incremental AI Review.
   - `/review full` - 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(dashboard): keep filter config modal within iframe [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #43632:
URL: https://github.com/apache/superset/pull/43632#discussion_r3883138388


##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:
##########
@@ -967,7 +967,7 @@ const FiltersConfigForm = (
   return (
     <Tabs
       allowOverflow={false}
-      contentHeight={`calc(100vh - ${theme.sizeUnit * 55}px)`}
+      fullHeight

Review Comment:
   Third leg of the height chain covered by the blocker in the review body. `fullHeight` sets `height: 100%` on `.ant-tabs`, `.ant-tabs-body`, `.ant-tabs-content` and `.ant-tabs-body-holder` (`Tabs.tsx:49-64`), replacing the `calc(100vh - 220px)` that was the only thing giving `.ant-tabs-body-holder` a resolvable height here. Measured with `allowOverflow={false}` in the non-expanded modal, the holder goes from `clientHeight` 493 / `scrollHeight` 2000 (scrolls) to 2001 / 2001 (does not), so its `overflow: auto` never engages.
   
   Worth noting `contentHeight` already defaults to `'100%'` and is emitted after the `fullHeight` line, so `fullHeight` is not what changes the holder's height here — dropping the explicit `contentHeight` is. Direction is right (the `sizeUnit * 55` magic number should go); it just needs an ancestor with a definite height first.



-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #43632:
URL: https://github.com/apache/superset/pull/43632#issuecomment-5448010539

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | 8d53709d99bf223b56ee43ac8e5cac15891bec20 |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a90ff1a603cdc000860013b |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-43632--superset-docs-preview.netlify.app](https://deploy-preview-43632--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQzNjMyLS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.29t1z5hoya1RDGuJEp3qS_Cxb8hgyOY0_6u982Wkjc8)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#FYvJCYAwEAB72bcLGyJB7cAyNhcGchGDIGLvxnnNY-aB2kqqHTaACXTjbI7hp0HxM2PmHi6HPsTuGqZiOWLwjZMbvXU1lnu341C8kveCFUljDREtikhIDe8H) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-43632--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
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(dashboard): keep filter config modal within iframe [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43632:
URL: https://github.com/apache/superset/pull/43632#issuecomment-5449248219

   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 an incremental AI Review.
   - `/review full` - 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