Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ function StickyWrap({
style={{
height: bodyHeight,
overflow: 'auto',
scrollbarGutter: 'stable',
scrollbarGutter: hasVerticalScroll ? 'stable' : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Inconsistency with sizer: the sizer container always used scrollbarGutter: 'stable' earlier, while the body used a conditional; this can create transient layout differences. Make the body use scrollbarGutter: 'stable' unconditionally to match the sizer and avoid inconsistent measurements. [possible bug]

Severity Level: Critical 🚨

Suggested change
scrollbarGutter: hasVerticalScroll ? 'stable' : undefined,
scrollbarGutter: 'stable',
Why it matters? ⭐

Making the body use scrollbarGutter: 'stable' unconditionally matches the sizer's behavior and avoids transient measurement differences.
This change is a targeted fix for inconsistent measurements introduced by the PR and is likely to reduce header/body width shifts in browsers that support the property.
It's a small, verifiable layout improvement and does not introduce the feature-detection complexity of a fallback.

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx
**Line:** 347:347
**Comment:**
	*Possible Bug: Inconsistency with sizer: the sizer container always used `scrollbarGutter: 'stable'` earlier, while the body used a conditional; this can create transient layout differences. Make the body use `scrollbarGutter: 'stable'` unconditionally to match the sizer and avoid inconsistent measurements.

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.

width: maxWidth,
boxSizing: 'border-box',
}}
Expand Down
Loading