Add linetags and indent support for formatted text#26814
Open
brrichards wants to merge 7 commits intomicrosoft:mainfrom
Open
Add linetags and indent support for formatted text#26814brrichards wants to merge 7 commits intomicrosoft:mainfrom
brrichards wants to merge 7 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the formatted-text (tree-based) schema and the Quill integration to support additional line-level formatting (more LineTag variants) and to persist Quill’s line indent information on StringLineAtom.
Changes:
- Extended
FormattedTextAsTree.LineTagto include ordered lists, checklists, block quotes, and code blocks, plus added optionalindenttoStringLineAtom. - Updated Quill ↔ tree conversion logic to emit/consume the new line tag variants and to round-trip
indentwhen present. - Updated schema compatibility snapshot/version and added tests for
parseLineTagnull-handling andindentemission.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/framework/react/src/text/formatted/quillFormattedView.tsx | Adds new LineTag ↔ Quill attribute mappings, parses additional line tag attributes, and includes indent in delta conversions. |
| packages/framework/react/src/test/text/textEditor.test.tsx | Adds tests for parseLineTag handling of null attributes and for indent emission in generated deltas. |
| packages/dds/tree/src/text/textDomainFormatted.ts | Extends LineTag schema values and adds optional indent to StringLineAtom. |
| packages/dds/tree/src/test/text/textDomainFormatted.spec.ts | Bumps schema compatibility snapshot version for formatted text. |
| packages/dds/tree/src/test/domain-schema-compatibility-snapshots/formattedText/2.92.0.json | Adds new schema snapshot reflecting the updated formatted text schema. |
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
LineTagStringLineAtom- Quill intercepts tab input and converts it to a"\t"delta insert which works already. When intercepting a tab on a line with a line tag Quill sends the indent with the line tag change. This requiresStringLineAtomto hold indent valueFiles Changed
textDomainFormatted.spec.ts- updated compatibility testtextDomainFormatted- add new fields ontoStringLineAtomtextEditor.test.tsx- add tests for indentquillFormattedView.tsx- updateparseLineTagand delta logic to deal with new optionalStringLineAtom.indentfield