Skip to content

Add validator registration for continuous scroll toggle#78

Merged
alex-rawlings-yyc merged 3 commits into
mainfrom
register-validator
May 21, 2026
Merged

Add validator registration for continuous scroll toggle#78
alex-rawlings-yyc merged 3 commits into
mainfrom
register-validator

Conversation

@alex-rawlings-yyc
Copy link
Copy Markdown
Contributor

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

Eliminates RPC handler warnings emitted when toggling continuous view


This change is Reviewable

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation for the Continuous Scroll project setting to ensure only valid configurations are accepted.

Review Change Stack

@alex-rawlings-yyc alex-rawlings-yyc added 🟪Idea Idea-priority PR: can be closed... up next Auto adds an issue to the PT Lexical Extensions project labels May 20, 2026
@alex-rawlings-yyc alex-rawlings-yyc self-assigned this May 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The extension's activate function now registers a boolean validator for the interlinearizer.continuousScroll project setting and properly integrates it into the extension's disposal lifecycle to ensure cleanup on deactivation.

Changes

Continuous Scroll Setting Validator

Layer / File(s) Summary
Register boolean validator for continuousScroll setting
src/main.ts
The activate function registers a boolean validator for interlinearizer.continuousScroll (lines 144–148) and adds the validator registration handle to context.registrations for proper disposal cleanup (line 163).

🎯 2 (Simple) | ⏱️ ~5 minutes

A hop and a skip through settings true,
A boolean validator, crisp and new,
With cleanup assured when the extension takes flight—
Small changes, but done ever so right! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding a validator registration for the continuous scroll toggle setting.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch register-validator

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.

@alex-rawlings-yyc
Copy link
Copy Markdown
Contributor Author

@coderabbitai pause

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

✅ Actions performed

Reviews paused.

Copy link
Copy Markdown
Contributor

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

@imnasnainaec reviewed 4 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).

@alex-rawlings-yyc alex-rawlings-yyc merged commit 3ec4352 into main May 21, 2026
8 checks passed
@alex-rawlings-yyc alex-rawlings-yyc deleted the register-validator branch May 21, 2026 15:17
@imnasnainaec
Copy link
Copy Markdown
Contributor

Note: The reason optimistic setting handling was added to #38 for this toggle's setting was because I forgot the validator that this pr adds, so the core settings engine spent ~10 seconds looking for the validator to no avail before eventually saving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🟪Idea Idea-priority PR: can be closed... up next Auto adds an issue to the PT Lexical Extensions project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants