Repository navigation
Lists: numId 0 is no list, Decrease Indent pins the margin, indent repairs old levels (#1728) - #1791
Merged
Merged
Conversation
…Format, compare and the suite (#1728) w:numId="0" means "no numbering" in OOXML (it cancels a style's numbering), so every list-membership test goes through ParProps::in_list(). The serializer still writes the 0, and compare's merge no longer drops it as an undefined list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EieX45QTPDJv2KbHRv753D
…and keeps it there (#1728) At 0 a list item on the direct-indent path wrote no w:left, so its numbering level's indent came back and the item jumped right. It now pins an explicit w:left="0" in the loaded w:ind (idempotently, keeping attribute order), so it stays on the direct path in session as after a reload. change_indent's early-out compares the stepped props, so a Decrease that changes nothing records no undo step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EieX45QTPDJv2KbHRv753D
…levels first (#1728) An item of docxy's lists with no direct indent steps its level, which moves it only if that level has a w:ind; a 9990/9991 list saved before the level indents did not move until Bullets was pressed again. Package::repair_list_indents runs ensure_list's repair for both ids and every host's indent path calls it: terminal docxy (ribbon, Ctrl+M) and docxwasm before the edit, the suite after an indent that made a step (Shift+Tab, Ctrl+M, the ribbon act, Repeat by key and QAT). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EieX45QTPDJv2KbHRv753D
The suite's eff_indent gives an explicit numId 0 no level step (no numId may still be a style's list, so it keeps one). The repair comments say why it matters: Word and Pages indent by the level, while the suite draws from ilvl; terminal docxy and docxwasm repair before the edit, the suite after one. The shadow helpers share table_props::element_name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EieX45QTPDJv2KbHRv753D
2 tasks
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EieX45QTPDJv2KbHRv753D
Owner
Author
|
Merged automatically (auto-merge is on for this checkout): review stopped: round 1 had no Major; all findings fixed; merge rounds: 1 CI fix round (suite Leftovers: #1792 (checklist):
No disputed findings. Not filed, as they are design choices rather than work: repairing old-build levels at load (rejected in the plan) and the suite's own numIds 1/2. |
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.
Closes #1728 (leftovers from #1653 / PR #1727).
What changed
<w:numId w:val="0"/>means "no numbering".ParProps::in_list()is now the list test in the terminal render, PDF export, Markdown, RTF, AutoFormat as you type, the Compare merger (which kept dropping an explicit 0, so the style's numbering came back) and the suite (list_markers,blank_base;eff_indentgives an explicit numId 0 no level step). The serializer still writes numId 0: it cancels a style's numbering.w:left="0"(serialize::pin_shadow_left_zero, idempotent, attribute order kept), so the level's indent no longer comes back and the item stays on its own-indent path in the session as after a reload.change_indentnow records no undo step when a press would change nothing (step_indentcompared on a clone); that also drops the empty step a Decrease at 0 recorded on a plain paragraph.Package::repair_list_indents()repairs docxy's reserved lists (9990/9991), sharingensure_list's repair. Terminal docxy and docxwasm run it before Increase/Decrease Indent; the suite runs it after an indent that made an undo step (Shift+Tab, Ctrl+M, ribbon/KeyTips/harness act, Repeat). The suite draws levels fromilvl, so there the repair is for the saved file (Word, Pages).Testing
New unit tests: render, PDF export, Markdown, RTF, AutoFormat, serializer and Compare for numId 0; editor tests for the margin pin, its idempotence (byte-identical
w:ind, no undo step) and Increase after it; package tests for the repair (other list byte-identical, no part created, second call a no-op); a terminal docxy test through the ribbon act and Ctrl+M; suite tests forlist_markers/blank_baseandeff_indent.cargo fmt --all --check, clippy-D warnings(docxcore, docxy, docxwasm, suite),cargo test -p docxcore -p docxy -p docxwasm(2794 passed),cargo test --manifest-path suite/Cargo.toml(2687 passed).The suite's indent call sites have no unit seam (
Docxycannot be built in a test); they are covered by the package test and by reading them. No .uit case: no harness verb reads numbering.xml.Review
revmux round 1 (4 Claude reviewers): 0 Major; 2 minor doc-comment errors, 1 immaterial duplication and 1 pre-existing suite
eff_indentgap fixed in eb99c49; 1 pre-existing finding (style-numbered item at 0) deferred as a follow-up, as is the Paragraph dialog'sset_indent(0)on a list item (planned out of scope): both in #1792.review stopped: round 1 had no Major; all findings fixed
🤖 Generated with Claude Code
https://claude.ai/code/session_011yWYrLAGAD6qrej5aEktVD