Skip to content

Version bump main: 9.55.0 -> 9.56.0, react: 9.0.4 -> 9.0.5#3393

Merged
vinguyen12 merged 27 commits into
releasefrom
u/nguyenvi/bump-9.55.1
Jul 1, 2026
Merged

Version bump main: 9.55.0 -> 9.56.0, react: 9.0.4 -> 9.0.5#3393
vinguyen12 merged 27 commits into
releasefrom
u/nguyenvi/bump-9.55.1

Conversation

@vinguyen12

@vinguyen12 vinguyen12 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Version bump

Group Old Version New Version
main 9.55.0 9.56.0
react 9.0.4 9.0.5

legacyAdapter unchanged (8.66.1). Patch bump per request.

Changes included

JiuqingSong and others added 26 commits June 2, 2026 15:24
…path valid (#3358)

When formatInsertPointWithContentModel persists the Content Model group path during DOM to Model conversion, a FormatContainer that falls back to a plain paragraph would be removed from the model, leaving the persisted path invalid. Add a skipFormatContainerFallbackCheck option that keeps the FormatContainer in that scenario so the formatting callback can still rely on the path.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When handleBlockGroupChildren finishes processing a block group whose list node stack is rooted at the parent being left, clear the entire node stack instead of only its inner levels so a sibling block group does not incorrectly reuse the invalidated list element.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#3362)

When setSelection applies a range selection, a leading or trailing
SelectionMarker that has a real (non-marker) selected segment next to it in
the same paragraph carries no selection information and can be removed. Track,
per paragraph, whether any non-marker segment was selected and which boundary
markers were kept; after the segment loop, drop those boundary markers if the
paragraph contained real selected content.

This is scoped to the same paragraph on purpose: a marker at a paragraph edge
must be kept to distinguish "selection starts at the beginning of this line"
from "selection starts at the end of the previous line".

Update the #3341 reconcileSelection snapshots accordingly: the preserveMarker
guard still hands setSelection two live markers (so the selected segment keeps
isSelected), and setSelection now drops those redundant boundary markers.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reconcile IMG src and data-* attribute changes in Content Model cache

Previously any attribute change other than id on editor content would set
mutation type to "unknown" and invalidate the whole cached Content Model.

Recognize src and data-* changes on an indexed IMG element and update the
related ContentModelImage (src property or dataset) in place, so the cache
stays valid. Add a new "attribute" mutation type carrying the element and
attribute name, and a reconcileImageAttribute method on DomIndexer.


@

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds two new public APIs to roosterjs-content-model-markdown and a "Paste as Markdown" demo button that uses them to decide whether to convert clipboard content with convertMarkdownToContentModel or fall back to the regular paste flow.
#3365)

@
Treat a backslash-escaped ASCII punctuation character (e.g. "\*") as a
literal character so it is not parsed as a formatting marker.


@

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Add MarkdownPastePlugin to convert pasted markdown content

Add a MarkdownPastePlugin in the roosterjs-content-model-markdown package
that handles the BeforePaste event and, when the clipboard content can be
interpreted as markdown, converts the plain text into a Content Model and
pastes it as rich content.

- Introduce the 'asMarkdown' PasteType so callers can explicitly request a
  markdown paste; the demo's "Paste as Markdown" button now routes through it.
- Add MarkdownPasteOptions with an autoConversion flag (default false) so the
  plugin can optionally auto-convert any markdown-looking paste.
- Map the new PasteType to Normal in the legacy editor adapter.
- Wire the plugin and its autoConversion option into the demo site's plugins
  side pane.
This change makes the converter prefer the pasteType already present on the new event, only falling back to the mapping from the old event when the new event doesn't have one
Adds a new project skill, draft-pr, at .claude/skills/draft-pr/SKILL.md. The skill walks through creating a pull request for the current branch: it inspects the diff against master, generates a concise imperative title and a structured description (a ## Summary plus a ## How to test section), and opens the PR with the gh CLI. It follows the same authoring conventions as the existing version-bump skill and enforces repo-specific rules from AGENTS.md (PRs target master, tests use yarn test:fast).
…rd uppercase (#3372)

* new tests

* Only capitalize the beginning of a word

* Add button to demo

* Normalize line endings to LF for capitalization changes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.0 to 3.4.9.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@3.4.0...3.4.9)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.9
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jiuqing Song <jisong@microsoft.com>
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.9 to 3.4.11.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@3.4.9...3.4.11)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.11
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.1 to 7.29.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 7.29.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jiuqing Song <jisong@microsoft.com>
Fixes the editor jumping/scrolling when an image is selected for editing. In createImageWrapper.ts, attaching the shadow root replaces the rendered light-DOM image with a taller edit wrapper (border + resize/rotate/crop handles), which grows the surrounding line box and causes the browser to scroll the selection back into view.

This pins the shadow host span to the original image's footprint — captured from image.offsetWidth/offsetHeight before the shadow root takes over — by setting display: inline-block, fixed width/height, vertical-align: bottom, and overflow: visible. The handles and wrapper still overflow the host visually, but the line box no longer grows, so the editor stays put. Pinning is skipped when the image has no measurable footprint (offsetWidth/offsetHeight of 0).
* Re-enable and stabilize previously-disabled tests

Several test suites were disabled (xit/xdescribe) due to flakiness or
environment dependence. Re-enable them and fix the underlying issues so
they pass deterministically regardless of spec order:

- selectionConverterTest: spy on the deep createRange module did not
  intercept the barrel import; exercise the real createRange with a
  document-attached image instead.
- updateRotateHandleTest: the spy targeted rotateHandle while the code
  reads rotateCenter; point it at the right element and feed each
  "hidden" case the intended edge distance (and correct an impossible
  expected handle value).
- applyChangeTest: replace brittle exact PNG data-URL comparisons with
  IHDR-dimension checks (encoder-independent), and create a fresh
  contentModelImage per test to remove order-dependent editingInfo state.
- tableEditorTest: give the editor a deterministic size so the table is
  never flush against the scroll-container edge, which otherwise made
  inserter visibility depend on leftover document.body layout.
- tableResizerTest: recreate the content model table per test (onDragging
  mutates it in place) and gate verifyCellRectChange on growth only so an
  incidental cross-axis border-box shift does not flip the assertion.

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

* fix test

* improve

* improve

* fix

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion (#3379)

* Fix normalizeSingleSegment to preserve leading space for word separation

- Search backward for the nearest non-empty text segment to determine
  whether leading spaces should be preserved or removed
- Skip empty text segments during normalization to avoid corrupting context
- Replace nbsp with regular space for leading space preservation since
  nbsp prevents word wrapping
- Add unit tests for normalizeSingleSegment

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix comment

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…3378)

Cover previously-untested code paths:
- ContextMenuPluginBase, TouchPlugin (new test files)
- CustomReplacePlugin guard branches and replacement callback
- TableEditPlugin onMouseMove/ensureTableRects/defaultTableSelector
- TableEditor editing lifecycle, public methods, getOnMouseOut, RTL
- EditorAdapter API surface (new describe block)
- buildRangeEx and insertNode utils (new test files)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Retain segments with undeletable links during model pruning

Keep segments that have link.format.undeletable set to true in
pruneUnselectedModel, even when they are not selected. This prevents
undeletable link segments from being lost during selection-based pruning.

Add unit tests covering the new behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* improve

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
)

* Pin aria-live announcer to top:0; left:0 to avoid scroll overflow

createAriaLiveElement sets position:absolute on the screen-reader announcer
container but leaves top/left unset. CSS resolves them to the element's
static position (its place in normal flow), which sits after every other
child of the announcer's eventual container. When that container has a
non-trivial content height (typical app layouts), the absolute element
contributes to the documentElement's scrollable overflow region and pushes
out a small but visible scrollbar even though nothing is laid out beyond
the viewport.

Standard visually-hidden patterns anchor the element to a known viewport
corner. Add top:0; left:0 so the absolute element sits at the top-left of
its containing block and never extends the scroll area.

The element remains invisible (clip-path:inset(100%) + 1x1 size +
overflow:hidden) and aria-live continues to announce textContent changes.

Repro: mount the editor in any host page where document body has a
height >= viewport. A 1px-tall scrollbar appears even with no editor
content overflowing.

* Update announce tests for new top:0; left:0 in announcer style

Existing tests use toEqual to assert the exact shape of the announcer
div's style object. Adding top/left in createAriaLiveElement breaks
those assertions; add the same two properties to expected style blocks
to match.

---------

Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>
* Add ariaLabel to TextField for accessibility

* Refactor label handling in InputDialogItem component
* Add support for HTML data element in Content Model

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Exclude dataValue from EmptySegmentFormat to avoid leaking into segment formats

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refactor data element support to use a segment decorator

Replace the flat dataValue segment-format approach with a dedicated ContentModelData segment decorator, mirroring how the link and code decorators work. This isolates the data value from ContentModelSegmentFormat and removes the EmptySegmentFormat pollution that caused the paste E2E failures.

- Add ContentModelData decorator and ContentModelDataFormat types
- Add dataValueFormatHandler and 'data' format category
- Wire data into DomToModel/ModelToDom contexts and stackFormat
- dataProcessor now uses knownElementProcessor + addData decorator
- Handle data in handleSegmentDecorator, cloneModel and mergeTextSegments
- Update and add tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add createText test for data decorator parameter

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add mergeNode tests for DATA element optimization

Cover the addition of 'DATA' to mergeNode OptimizeTags: adjacent <data> elements with the same value attribute merge, while different values do not.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add end-to-end tests for DATA element round-trip

Cover a normal <data value> round-trip and a special case where the <data> element contains an inner <b>. Verifies that after Model => DOM rewrite the per-segment <data> wrappers are merged back into a single <data> element by mergeNode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-01 18:19 UTC

@vinguyen12
vinguyen12 marked this pull request as ready for review July 1, 2026 17:53
BryanValverdeU
BryanValverdeU previously approved these changes Jul 1, 2026
BryanValverdeU
BryanValverdeU previously approved these changes Jul 1, 2026
@JiuqingSong

Copy link
Copy Markdown
Collaborator

We added a bunch of new types, so this should be 9.56.0

@vinguyen12 vinguyen12 changed the title Version bump main: 9.55.0 -> 9.55.1, react: 9.0.4 -> 9.0.5 Version bump main: 9.55.0 -> 9.56.0, react: 9.0.4 -> 9.0.5 Jul 1, 2026
@vinguyen12

Copy link
Copy Markdown
Contributor Author

We added a bunch of new types, so this should be 9.56.0

I changed it to 9.56.0

@vinguyen12
vinguyen12 merged commit 31d9954 into release Jul 1, 2026
8 checks passed
@vinguyen12
vinguyen12 deleted the u/nguyenvi/bump-9.55.1 branch July 1, 2026 19:18
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.

7 participants