Repository navigation
Fix image centering regression and guard cover-title edits per notebook - #48
Merged
Merged
Conversation
… notebook - Merge the duplicate .entry-image blocks; display:table with margin auto restores centering for aligned/default images while keeping resize handles positioned (#21). - Resize commit() reads attrs from the node currently at the position instead of the node captured at node-view creation (#21). - Cover title editing captures the notebook id at focus, commits against that id on blur, reverts on Escape, and refuses cross-notebook renames; cover subtitle gets the same focus-time capture (#18). Co-authored-by: setzor <setzor@users.noreply.github.com>
setzor
marked this pull request as ready for review
October 27, 2026 04:43
This was referenced Oct 27, 2026
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.
Summary
.entry-imageCSS blocks into one:display: table; margin: 1em auto;— images center again (the resize PR'sinline-blockdefeated themargin: autoalignment rules) while keepingposition: relativefor the resize handles.commit()now reads attrs from the node currently at the position (doc.nodeAt(pos)) instead of the node view's creation-timenode, so an update mid-drag (e.g. undo) no longer re-applies stale attrs.src/covertitle.ts(attachCoverTitleEditing), which captures the notebook id on focus, commits against that id on blur, reverts the text on Escape, and refuses to rename when the active notebook changed mid-edit. The cover subtitle got the same focus-time capture guard inmain.ts.Verification
pnpm test— 18 files, 85 tests passed, including new tests: image resize merges width with current attrs (editor.test.ts), and cover-title commit/revert/cross-notebook/Escape behavior (covertitle.test.ts).pnpm typecheckandpnpm buildpass.Closes #21
Closes #18