Improve rendering performance and replace verse-change fade with smooth scroll#42
Improve rendering performance and replace verse-change fade with smooth scroll#42alex-rawlings-yyc wants to merge 0 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
imnasnainaec
left a comment
There was a problem hiding this comment.
@imnasnainaec partially reviewed 8 files and made 1 comment.
Reviewable status: 4 of 9 files reviewed, 1 unresolved discussion (waiting on alex-rawlings-yyc).
src/components/ContinuousView.tsx line 0 at r1 (raw file):
@alex-rawlings-yyc The fade-out and fade-in was a request from Jason that I agree with. When the ContinuousView receives an external reference change, it's quite jarring to have it scroll so far.
|
Previously, imnasnainaec (D. Ror.) wrote…
Done. |
|
I'm going to strip away the scrolling and see if this PR actually does anything meaningful |
af013dc to
fbe9fb6
Compare
SegmentView,TokenChip, and a newFocusablePhrasewrapper inContinuousViewso that verse clicks and phrase-focus changes only re-render the two affected components rather than the entire chapter or token striponClickcallbacks onSegmentViewwith a stablehandleSegmentSelectuseCallback and a typedonSelectprop, which allows memo to skip unchanged segmentsContinuousView; usescrollIntoView({ behavior: 'smooth' })instead so the strip scrolls directly to the new verse without a perceptible pauseThis change is