Skip to content

fix: set maxHeight of List components to height when in AutoSizer - #43056

Open
greggailly wants to merge 1 commit into
apache:masterfrom
greggailly:gailly/list_max_height_fix
Open

fix: set maxHeight of List components to height when in AutoSizer#43056
greggailly wants to merge 1 commit into
apache:masterfrom
greggailly:gailly/list_max_height_fix

Conversation

@greggailly

@greggailly greggailly commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Set maxHeight of List components to height when in AutoSizer context to avoiding collapsing to 0.

SUMMARY

v2 of react-window introduced in 3872790 adds a default value of 100% to maxHeight property of List component but when this List is a child of AutoSizer then 100% resolves to 0px as AutoSizer creates a wrapping div of height 0.

Proposal: force maxHeight to height so that it does not collapse to 0.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Initial problem:
Screen Recording 2026-08-11 at 09 43 50

ADDITIONAL INFORMATION

@dosubot dosubot Bot added the change:frontend Requires changing the frontend label Aug 11, 2026
@bito-code-review

bito-code-review Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #d3f209

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 6637561..6637561
    • superset-frontend/src/dashboard/components/SliceAdder.tsx
    • superset-frontend/src/explore/components/DatasourcePanel/DatasourceItems.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

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 documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@greggailly
greggailly force-pushed the gailly/list_max_height_fix branch from 6637561 to 82768bc Compare August 11, 2026 09:19
@bito-code-review

Copy link
Copy Markdown
Contributor

The flagged issue is correct. The current implementation subtracts BORDER_WIDTH from the width prop, which is already adjusted by the caller, resulting in an unnecessary reduction of the viewport width. To resolve this, you should use the width prop directly in the List style.

Proposed Fix

<List
  style={{ width, height }}
  rowHeight={rowHeight}
  rowCount={flattenedItems.length}
  rowProps={rowProps}
  ...
/>

There are no other comments on this PR to address. Would you like me to assist with anything else?

superset-frontend/src/explore/components/DatasourcePanel/DatasourceItems.tsx

<List
  style={{ width, height }}
  rowHeight={rowHeight}
  rowCount={flattenedItems.length}
  rowProps={rowProps}
  .../>

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.54%. Comparing base (5ee2793) to head (82768bc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #43056      +/-   ##
==========================================
- Coverage   66.55%   66.54%   -0.01%     
==========================================
  Files        2864     2864              
  Lines      161894   161894              
  Branches    37305    37305              
==========================================
- Hits       107742   107736       -6     
- Misses      52106    52112       +6     
  Partials     2046     2046              
Flag Coverage Δ
javascript 73.63% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bito-code-review

bito-code-review Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #2d264d

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 82768bc..82768bc
    • superset-frontend/src/dashboard/components/SliceAdder.tsx
    • superset-frontend/src/explore/components/DatasourcePanel/DatasourceItems.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

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 documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas rusackas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @greggailly, this lines up nicely for the react-window v2 regression. LGTM, though if you can fix the video in the PR description (maybe it didn't finish uploading?) that would be appreciated.

@greggailly

Copy link
Copy Markdown
Contributor Author

Thanks @greggailly, this lines up nicely for the react-window v2 regression. LGTM, though if you can fix the video in the PR description (maybe it didn't finish uploading?) that would be appreciated.

My bad ! Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Regression columns and metrics do not show up anymore in explore view since react-window bump

2 participants