Skip to content

Make FormattedTextAsTree generic, moving special case to FormattedTextAsTreeDefault#27609

Open
CraigMacomber wants to merge 2 commits into
microsoft:mainfrom
CraigMacomber:genericText
Open

Make FormattedTextAsTree generic, moving special case to FormattedTextAsTreeDefault#27609
CraigMacomber wants to merge 2 commits into
microsoft:mainfrom
CraigMacomber:genericText

Conversation

@CraigMacomber

Copy link
Copy Markdown
Contributor

Description

Make FormattedTextAsTree generic, moving special case to FormattedTextAsTreeDefault.

Reviewer Guidance

The review process is outlined on this wiki page.

Copilot AI review requested due to automatic review settings June 26, 2026 22:03
@CraigMacomber CraigMacomber requested a review from a team as a code owner June 26, 2026 22:03
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (1184 lines, 13 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

@github-actions

Copy link
Copy Markdown
Contributor

Bundle size comparison

Base commit: 555a12ce6558cd53a32cb8b4d6e363fd241b3517
Head commit: 6847f48e05e1a2468db77d94967faa15b43d7fa9

⚠️ Comparison unavailable.

The PR's CI build failed — fix the build and the comment will update once the next run succeeds.

* A collection of text related types, schema and utilities for working with text beyond the basic {@link SchemaStatics.string}.
* @remarks
* This is a default parameterization of the generic {@link FormattedTextAsTree} with hard-coded assumptions about what kind of embedded content and what kind of formatting is supported.
* It is unlikely this meeds the needs of most users, but it can serve as an unstable example of how to use the generic {@link FormattedTextAsTree}.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* It is unlikely this meeds the needs of most users, but it can serve as an unstable example of how to use the generic {@link FormattedTextAsTree}.
* It is unlikely this meets the needs of most users, but it can serve as an unstable example of how to use the generic {@link FormattedTextAsTree}.

export interface Statics<TTree> {
/**
* Construct a {@link FormattedTextAsTree.(Tree:class)} from a string, where each character (as defined by iterating over the string) becomes a single character in the text node.
* Construct a a node of `this` schema from a string, where each character (as defined by iterating over the string) becomes a single character in the text node.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Construct a a node of `this` schema from a string, where each character (as defined by iterating over the string) becomes a single character in the text node.
* Construct a node of `this` schema from a string, where each character (as defined by iterating over the string) becomes a single character in the text node.

*
* @see {@link FormattedTextAsTree.Statics.fromString} for construction.
* @see {@link FormattedTextAsTree.(Tree:class)} for schema.
* @see {@link FormattedTextAsTree.createSchema} for creating whose nodes implement this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @see {@link FormattedTextAsTree.createSchema} for creating whose nodes implement this.
* @see {@link FormattedTextAsTree.createSchema} for creating schemas whose nodes implement this.

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