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

[PR] fix(dashboard): restore page scrolling [superset]

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

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Restores page scrolling on dashboards: a dashboard taller than the browser window was clipped with no scrollbar, leaving every chart below the fold completely unreachable. The same change also restores the top navbar's hide-on-scroll behavior, which had been silently disabled across the entire app.
   
   Two independent regressions combined to cause this:
   **1. `@visx/responsive` 3.12.0 --> 4.0.0 (#41239)**
   In 4.0.0, the `<ParentSize>` component renders its children inside an absolutely-positioned, `overflow: hidden` wrapper (`position: absolute; inset: 0`). `DashboardContainer` renders the dashboard grid inside `<ParentSize>`, so any dashboard taller than the measured area was clipped and could no longer grow the document, removing the page scrollbar entirely.
   
   *Fix:* use the `useParentSize` hook instead of the `<ParentSize>` component, so the resize observer attaches to the grid container itself and the grid renders in normal document flow. We only ever consumed `width`, so behavior is otherwise
   identical.
   
   **2. Unconditional app-shell inner-scroll (#41205, SIP-214 chat panel)**
   The chat panel switched the app shell to a viewport-locked, inner-scroll layout (`height: 100vh; overflow: hidden` on the shell, `overflow-y: auto` on the content) **unconditionally**. That layout is only required for the chat panel's split view,
   but because it always applied, the navbar stopped hiding on scroll, even when no chat extension was present.
   
   *Fix:* scope the `viewport-locked/inner-scroll` shell to chat **panel** mode only. In every other state (no chat extension, chat closed, or chat in floating mode) the shell page-scrolls exactly as before, so the navbar hides on scroll again. The chat
   panel's split-view behavior is unchanged.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   **Before:**
   [screen-capture (6).webm](https://github.com/user-attachments/assets/853f07f1-37de-4486-9367-72e17f417df7)
   
   **After:**
   [screen-capture (5).webm](https://github.com/user-attachments/assets/81bddd42-60ba-466e-a500-211465e3f258)
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   Dashboard page-scroll (core fix):
   1. Open a dashboard taller than the browser window (for example "FCC New Coder Survey 2018" from the bundled examples).
   2. Scroll down. Expected: the whole page scrolls, every below-fold chart is reachable, the top navbar hides as you scroll, and the dashboard header stays pinned to the top.
   3. Regression check: confirm Explore and SQL Lab still scroll/behave as before.
   
   Chat panel (only if `ENABLE_EXTENSIONS` is on and a chat extension is registered):
   4. Open the chat in panel mode: the shell switches to split view, the navbar stays fixed, and the dashboard scrolls inside its panel next to the chat. Close it: page-scroll and navbar hide-on-scroll return.
   5. Switch the chat to floating mode: the page scrolls normally (navbar hides) with the chat floating on top.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] 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): restore page scrolling [superset]

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

   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 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): restore page scrolling [superset]

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

   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): restore page scrolling [superset]

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


##########
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardContainer.tsx:
##########
@@ -374,9 +374,13 @@ const DashboardContainer: FC<DashboardContainerProps> = ({ topLevelTabs }) => {
     [activeKey, childIds, dashboardLayout, handleFocus, renderTabBar, tabIndex],
   );
 
+  // Hook form, not <ParentSize>: @visx 4.0.0's component clips content taller
+  // than the viewport, which breaks dashboard page scrolling.
+  const { parentRef, width } = useParentSize();
+
   return (
-    <div className="grid-container" data-test="grid-container">
-      <ParentSize>{renderParentSizeChildren}</ParentSize>
+    <div className="grid-container" data-test="grid-container" ref={parentRef}>
+      {width > 0 ? renderParentSizeChildren({ width }) : null}

Review Comment:
   Can we update the dashboard Jest mocks/tests with this hook swap? Existing tests still mock only `ParentSize`, and the jsdom `ResizeObserver` shim never reports a nonzero width, so CI fails with `useParentSize is not a function` / an empty `grid-container` until `useParentSize` is mocked to return a width.



-- 
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): restore page scrolling [superset]

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


-- 
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): restore page scrolling [superset]

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


##########
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardContainer.tsx:
##########
@@ -374,9 +374,13 @@ const DashboardContainer: FC<DashboardContainerProps> = ({ topLevelTabs }) => {
     [activeKey, childIds, dashboardLayout, handleFocus, renderTabBar, tabIndex],
   );
 
+  // Hook form, not <ParentSize>: @visx 4.0.0's component clips content taller
+  // than the viewport, which breaks dashboard page scrolling.
+  const { parentRef, width } = useParentSize();
+
   return (
-    <div className="grid-container" data-test="grid-container">
-      <ParentSize>{renderParentSizeChildren}</ParentSize>
+    <div className="grid-container" data-test="grid-container" ref={parentRef}>
+      {width > 0 ? renderParentSizeChildren({ width }) : null}

Review Comment:
   Yep! Just push those test changes @sadpandajoe 



-- 
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): restore page scrolling [superset]

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

   <!-- Bito Reply -->
   The dashboard tests have already been updated in this PR to accommodate the `useParentSize` hook swap. The `DashboardContainer.test.tsx` file now correctly mocks `useParentSize` to return a width of 800, which resolves the issue where the component would otherwise receive an undefined width or fail due to the missing `ParentSize` component.
   
   **superset-frontend/src/dashboard/components/DashboardBuilder/DashboardContainer.test.tsx**
   ```
   jest.mock('@visx/responsive', () => ({
     useParentSize: () => ({ parentRef: { current: null }, width: 800 }),
   }));
   ```


-- 
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): restore page scrolling [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41439?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `9.09091%` with `10 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 64.47%. Comparing base ([`8fed514`](https://app.codecov.io/gh/apache/superset/commit/8fed514e794be98835642b834b8049192ad4e210?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8b80d45`](https://app.codecov.io/gh/apache/superset/commit/8b80d456a30e0dd6392b90b5db37c6198ada0f2b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/41439?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [superset-frontend/src/views/App.tsx](https://app.codecov.io/gh/apache/superset/pull/41439?src=pr&el=tree&filepath=superset-frontend%2Fsrc%2Fviews%2FApp.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0FwcC50c3g=) | 0.00% | [10 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/41439?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #41439      +/-   ##
   ==========================================
   - Coverage   64.47%   64.47%   -0.01%     
   ==========================================
     Files        2662     2662              
     Lines      145897   145904       +7     
     Branches    33671    33675       +4     
   ==========================================
   - Hits        94070    94065       -5     
   - Misses      50123    50135      +12     
     Partials     1704     1704              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/41439/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/41439/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.88% <9.09%> (-0.02%)` | :arrow_down: |
   
   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/41439?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