Repository navigation
fix(notes): keep typing when a thing's page is first saved, and open only web links - #124
Merged
Merged
Conversation
…only web links The editor and form were keyed on the page id, so the first save of a recording's or entity's page remounted them and lost what was typed meanwhile. Key on what the page is about instead. BlockSuite renders any href from the Markdown, so links other than http(s), mailto and Lens links no longer open. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XZQXJtCvJgbG1Z2H312KcS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Before: on the page of a recording or entity, the first save turned the draft into a page and remounted the editor. Text typed while that request was in flight was lost, and the title, summary, date and place snapped back. A Markdown link with any scheme, such as
javascript:, also opened when clicked.After: the editor and form stay put across the first save. Clicking a link in a note opens only http(s) and mailto addresses, plus Lens links, which open in the app.
Motivation and Context
Review finding on #122. The editor and form were keyed on
page.id, which changes on the first save. They are now keyed on what the page is about, or on its id for a free note. BlockSuite 0.19.5 renders the href from the delta unchecked, and the assistant can write note Markdown, so the editor's capture-phase click handler now blocks other schemes on click and middle-click.Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.Checked locally: tsc and eslint pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XZQXJtCvJgbG1Z2H312KcS
Generated by Claude Code