codeant-ai-for-open-source[bot] commented on code in PR #36891:
URL: https://github.com/apache/superset/pull/36891#discussion_r2658897275
##########
superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx:
##########
@@ -344,7 +344,7 @@ function StickyWrap({
style={{
height: bodyHeight,
overflow: 'auto',
- scrollbarGutter: 'stable',
+ scrollbarGutter: hasVerticalScroll ? 'stable' : undefined,
Review Comment:
**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 🚨
```suggestion
scrollbarGutter: 'stable',
```
<details>
<summary><b>Why it matters? ⭐ </b></summary>
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.
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
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.
```
</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: [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]