Skip to content

Improve rendering performance and replace verse-change fade with smooth scroll#42

Closed
alex-rawlings-yyc wants to merge 0 commit into
continuous-scrollfrom
continuous-scroll-memoizations
Closed

Improve rendering performance and replace verse-change fade with smooth scroll#42
alex-rawlings-yyc wants to merge 0 commit into
continuous-scrollfrom
continuous-scroll-memoizations

Conversation

@alex-rawlings-yyc

@alex-rawlings-yyc alex-rawlings-yyc commented May 5, 2026

Copy link
Copy Markdown
Contributor
  • Memoize SegmentView, TokenChip, and a new FocusablePhrase wrapper in ContinuousView so that verse clicks and phrase-focus changes only re-render the two affected components rather than the entire chapter or token strip
  • Replace inline onClick callbacks on SegmentView with a stable handleSegmentSelect useCallback and a typed onSelect prop, which allows memo to skip unchanged segments
  • Remove the 500 ms opacity fade that delayed verse jumps in ContinuousView; use scrollIntoView({ behavior: 'smooth' }) instead so the strip scrolls directly to the new verse without a perceptible pause

This change is Reviewable

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f5a96676-285d-4eac-9aa4-21715a7f1782

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch continuous-scroll-memoizations

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@imnasnainaec imnasnainaec left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@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.

@alex-rawlings-yyc

Copy link
Copy Markdown
Contributor Author

src/components/ContinuousView.tsx line at r1 (raw file):

Previously, imnasnainaec (D. Ror.) wrote…

@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.

Done.

@alex-rawlings-yyc alex-rawlings-yyc marked this pull request as draft May 6, 2026 17:22
@alex-rawlings-yyc

Copy link
Copy Markdown
Contributor Author

I'm going to strip away the scrolling and see if this PR actually does anything meaningful

@alex-rawlings-yyc alex-rawlings-yyc force-pushed the continuous-scroll-memoizations branch from af013dc to fbe9fb6 Compare May 6, 2026 17:39
@alex-rawlings-yyc alex-rawlings-yyc deleted the continuous-scroll-memoizations branch May 6, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants