Skip to content

feat: add opt-in v2 hydration marker support - #7689

Open
Jane Chu (janechu) wants to merge 6 commits into
mainfrom
fix/remove-legacy-hydration-markers
Open

feat: add opt-in v2 hydration marker support#7689
Jane Chu (janechu) wants to merge 6 commits into
mainfrom
fix/remove-legacy-hydration-markers

Conversation

@janechu

@janechu Jane Chu (janechu) commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

📖 Description

Adds coordinated, opt-in support for FAST Element 2.x indexed hydration markers while retaining FAST Element 3.x data-free markers as the default.

  • Exports markers_v2 from @microsoft/fast-element/hydration.js for use with enableHydration({ markers: markers_v2 }).
  • Adds a matching markers_v2 option to @microsoft/fast-build across its Rust, WASM, CLI, and configuration APIs.
  • Isolates v2 marker parsing from the default v3 implementation.
  • Adds a FAST Build-generated declarative fixture that exercises normal hydration, repeat reconciliation, references, attributes, and events with v2 markers.
  • Updates migration guidance, package documentation, design documentation, and export sizes.

👩‍💻 Reviewer Notes

The v2 compatibility path is explicitly opt-in on both sides:

enableHydration({ markers: markers_v2 });
{
    "markers_v2": true
}

The client and renderer settings must match. Calls without these options continue using FAST Element 3.x data-free hydration markers.

📑 Test Plan

  • Build and test the microsoft-fast-build Rust crate.
  • Build and test @microsoft/fast-build, including CLI/config option forwarding.
  • Build @microsoft/fast-element.
  • Run the FAST Element Chromium and declarative Chromium suites.
  • Verify the generated v2 fixture hydrates and supports repeat updates, attribute bindings, references, and events.

✅ Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Agents

  • I have linked to an existing issue in this project that this change addresses
  • I have read the skills
  • I have read the DESIGN.md file(s) in packages relevant to my changes
  • I have updated the DESIGN.md file(s) in packages relevant to my changes

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

Copilot-Session: c66c1387-9a1b-4386-8d0f-a115ef5706db
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c66c1387-9a1b-4386-8d0f-a115ef5706db
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c66c1387-9a1b-4386-8d0f-a115ef5706db
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c66c1387-9a1b-4386-8d0f-a115ef5706db
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c66c1387-9a1b-4386-8d0f-a115ef5706db
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c66c1387-9a1b-4386-8d0f-a115ef5706db
@janechu Jane Chu (janechu) changed the title fix: remove legacy hydration marker support feat: add opt-in v2 hydration marker support Sep 3, 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.

1 participant