Skip to content

Add linetags and indent support for formatted text#26814

Open
brrichards wants to merge 7 commits intomicrosoft:mainfrom
brrichards:add-linetags
Open

Add linetags and indent support for formatted text#26814
brrichards wants to merge 7 commits intomicrosoft:mainfrom
brrichards:add-linetags

Conversation

@brrichards
Copy link
Contributor

@brrichards brrichards commented Mar 23, 2026

Summary

  • Add support for ordered list, check list, code-block, block-quote on LineTag
  • Add optional indent field for StringLineAtom - 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 requires StringLineAtom to hold indent value
  • Updated the currentViewSchema to reflect new fields. Updated the minversion for collab test to reflect new schema.

Files Changed

  • textDomainFormatted.spec.ts - updated compatibility test
  • textDomainFormatted - add new fields onto StringLineAtom
  • textEditor.test.tsx - add tests for indent
  • quillFormattedView.tsx - update parseLineTag and delta logic to deal with new optional StringLineAtom.indent field

@brrichards brrichards marked this pull request as ready for review March 24, 2026 15:09
@brrichards brrichards requested a review from a team as a code owner March 24, 2026 15:09
Copilot AI review requested due to automatic review settings March 24, 2026 15:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.LineTag to include ordered lists, checklists, block quotes, and code blocks, plus added optional indent to StringLineAtom.
  • Updated Quill ↔ tree conversion logic to emit/consume the new line tag variants and to round-trip indent when present.
  • Updated schema compatibility snapshot/version and added tests for parseLineTag null-handling and indent emission.

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.

@brrichards brrichards changed the title Add linetags and index support for formatted text Add linetags and indent support for formatted text Mar 24, 2026
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.

3 participants