github microsoft/FluidFramework client_v3.4.0
Fluid Framework v3.4.0 (minor)

4 hours ago

Contents

  • 🌳 SharedTree DDS Changes
    • Add an alpha incremental-summary field property (#28285)
    • Add experimental SharedTree sandboxing APIs (#28382)

🌳 SharedTree DDS Changes

Add an alpha incremental-summary field property (#28285)

The new alpha summarizeIncrementally property on FieldPropsAlpha marks a field as an incremental-summary boundary without requiring direct use of allowed-types metadata or the incrementalSummaryHint symbol. This property is the preferred way to configure incremental summarization. SchemaFactoryAlpha.requiredRecursive and optionalRecursive provide the same field configuration for recursive allowed types with relaxed compile-time constraints. The SchemaFactoryAlpha.stagedOptional and stagedOptionalRecursive field constructors also accept this option.

const sf = new SchemaFactoryAlpha("example");

class Document extends sf.objectAlpha("Document", {
  sections: sf.required(sf.map(Section), { summarizeIncrementally: true }),
}) {}

Change details

Commit: 5d1392b

Affected packages:

  • @fluidframework/tree
  • fluid-framework

⬆️ Table of contents

Add experimental SharedTree sandboxing APIs (#28382)

The new alpha Sandboxing.createHost and Sandboxing.createGuest APIs synchronize a SharedTree ViewableTree across a MessagePort. The Host remains connected to Fluid services while the Guest exposes a normal schema-aware tree view on the other side of the message channel.

Important

To use Sandboxing, you must set the container runtime's oldestSupportedClient option to "3.4.0" or later.

import { asBeta } from "@fluidframework/tree/beta";
import { FormatValidatorBasic, Sandboxing } from "@fluidframework/tree/alpha";

// Create the application-owned view that remains connected to Fluid services.
const hostView = asBeta(tree.viewWith(config));

// Create the message channel that crosses the sandbox boundary.
const channel = new MessageChannel();

// Connect the Host endpoint to the collaborative tree.
const host = Sandboxing.createHost({ main: hostView, port: channel.port1 });

// Create the independent Guest tree on the other side of the channel.
const guest = await Sandboxing.createGuest({
  port: channel.port2,
  treeOptions: { jsonValidator: FormatValidatorBasic },
});

// Open a schema-aware view for application code running in the sandbox.
const guestView = guest.tree.viewWith(config);

Change details

Commit: e41dc04

Affected packages:

  • @fluidframework/tree
  • fluid-framework

⬆️ Table of contents

🛠️ Start Building Today!

Please continue to engage with us on GitHub Discussion and Issue pages as you adopt Fluid Framework!

Don't miss a new FluidFramework release

NewReleases is sending notifications on new releases.