dwjohnston / dwjohnston/react-text-highlight
Layout shift/Flash
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
There's two things here:
1. The gutter moves as the content comes in.
This one I am less worried about/not sure how to solve.
The problem is, we're not going to know if any comments exist until second render. You could force the gutter to always be wide, but then you get this weird off center page when there are no comments.
2.We (sometimes) see a flash of the comments, before they move to their correct position.
For this one, I'm thinking initially, give them `visibility: hidden`, and then have them appear after the first repositioning?
(Or maybe it'll have to be a smarter, 'after we stop getting repositionings for 500ms', but we'd have to drill into exactly what the repositioning behaviour is. )
https://github.com/user-attachments/assets/94aef342-46f9-4181-b9ea-350d264e5b49
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.