Fix scroll appearing on split view with annotations#516
Fix scroll appearing on split view with annotations#516amadeus merged 1 commit intopierrecomputer:mainfrom
Conversation
|
@jonatanklosko is attempting to deploy a commit to the Pierre Computer Company Team on Vercel. A member of the Team first needs to authorize it. |
| const update: CodeColumnUpdate = [target, specs.inlineSize]; | ||
| const update: CodeColumnUpdate = [target, contentBoxSize[0].inlineSize]; |
There was a problem hiding this comment.
This is only relevant in split view, where each data-code has 1px border:
pierre/packages/diffs/src/style.css
Lines 472 to 483 in a5df5aa
That border would be included in the measured size here. Later we compute the annotation content width as inlineSize - item.numberWidth:
pierre/packages/diffs/src/managers/ResizeManager.ts
Lines 238 to 247 in a5df5aa
We want to exclude the border from inlineSize, which we effectively do by using contentBoxSize here (instead of subtracting something hardcoded).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
good catch, nice clean fix, thanks! |
When using split-view and annotations, the annotation content width is overestimated by 1px leading to unnecessary scroll.
Before
(Note the horizontal scroll at the bottom)
After