Skip to content

fix(writer): keep list numbering continuous, plus assorted drive/writer fixes - #378

Open
safwansamsudeen wants to merge 2 commits into
developfrom
fix/frappe-ui-typography
Open

fix(writer): keep list numbering continuous, plus assorted drive/writer fixes#378
safwansamsudeen wants to merge 2 commits into
developfrom
fix/frappe-ui-typography

Conversation

@safwansamsudeen

Copy link
Copy Markdown
Collaborator

Summary

Primary fix: list numbering in the Writer editor no longer resets when you edit around a list. Deleting a block between two lists — or pressing Enter to lift an item out — used to leave two sibling orderedList nodes, so the second one restarted at 1. A new JoinAdjacentLists ProseMirror extension merges adjacent same-type list nodes back into one after each transaction.

Bundled alongside are several small drive/writer fixes that were in the working tree.

Changes

  • fix(writer): JoinAdjacentLists extension — maps boundaries through tr.mapping (avoids the stale-position Cannot join paragraph onto orderedList throw), requires both siblings to be the same list type, and collects top-level boundaries since descendants() skips the doc node. Wired into CoreEditor's editorExtensions.
  • fix(drive): let an open dialog's own Escape handler run instead of clearing the selection in GridView/ListView (preventDefault was blocking Reka's dismiss).
  • fix(writer): focus the comment editor without scrolling, on mount and when it enters edit mode.
  • refactor(drive): use the Button component for UploadTracker controls and MoveDialog breadcrumbs; tidy ConfirmDialog markup, solid trash button.
  • refactor(writer): drop watermark logic from PDF and print export.
  • style(writer): sentence-case settings labels.
  • style(drive): gap in the UserListSettings avatar row.

Testing

The list-join logic was verified against a ProseMirror repro covering top-level splits, paragraph-separated lists, mixed list types, the Enter-out case, nested + top-level adjacency (the stale-position crash), and triple-adjacent lists — all merge correctly with no throws.

🤖 Generated with Claude Code

@safwansamsudeen

safwansamsudeen commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator Author

Also redoes list view, adds infinite scrolling, removes rename dialog, and a couple more long pending issues.

safwansamsudeen and others added 2 commits July 29, 2026 14:38
…er fixes

fix(writer): join adjacent same-type list nodes after each transaction so
  deleting a block between two lists (or Enter-lifting an item out) no longer
  restarts numbering; map boundaries through tr.mapping, require matching list
  types, and collect top-level boundaries since descendants() skips the doc node
fix(drive): let an open dialog's own Escape handler run instead of clearing the
  selection in GridView/ListView (preventDefault was blocking Reka's dismiss)
fix(writer): focus the comment editor without scrolling, on mount and when it
  flips into edit mode
refactor(drive): use the Button component for UploadTracker controls and
  MoveDialog breadcrumbs; tidy ConfirmDialog markup and use a solid trash button
refactor(writer): drop the watermark logic from PDF and print export
style(writer): sentence-case the settings labels
style(drive): add gap in the UserListSettings avatar row

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… typography

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@safwansamsudeen
safwansamsudeen force-pushed the fix/frappe-ui-typography branch from fd60996 to c4d46ae Compare July 29, 2026 09:09
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.

1 participant