Граф коммитов

21362 Коммитов

Автор SHA1 Сообщение Дата
Matt Rakow 8e4df0d886
Share LocalDeltaConnectionServer between documents (#23146)
In SessionStorageModelLoader
2024-11-20 10:11:15 -08:00
Noah Encke 948fc52e8d
Simplify/Refactor BranchCommitEnricher (#23151)
## Description

This tightens the state machine space for `BranchCommitEnricher` and
makes various simplifications to the API and code.

* The API surface of `BranchCommitEnricher` is reduced to functions
that:
  1. Process branch changes
  2. Get enriched commits
  3. Acknowledge transaction state transitions
  
Item (i) used to be made of a few different methods whose invocations
needed to be coordinated by `SharedTreeCore`. Now,
`BranchCommitEnricher` manages this internally. Previously, it needed to
know whether or not the commit being submitted was the commit of the
outermost transaction. This could be problematic for future refactors of
SharedTreeCore, so the enricher now derives that information from its
internals (since it already keeps track of ongoing transactions via the
`TransactionEnricher`.
* The map of processed commits stored in the enricher is now a WeakMap,
meaning that the enricher does not need to worry about accidentally
holding on to commits forever. The logic that "purges" map entries
between changes has been removed since the entries will now be dropped
automatically as the commits become unreferenced.
* TransactionEnricher no longer allows getting the enriched change in
the middle of a transaction.
* We now properly throw an error if a the SharedTree is attached in the
middle of a transaction - we do not and cannot currently support this
scenario.
* Various renames, conditional refactors, inlining, etc. to shorten
lines, improve code flow, simplify conditional logic, etc. and
additional documentation.
2024-11-20 03:35:47 +00:00
Craig Macomber (Microsoft) 421ba40375
Fix areOnlyKeys handling of optional fields (#23152)
## Description

Fix areOnlyKeys handling of optional fields, add tests for it, and
document issue with index signatures.
2024-11-19 16:24:33 -08:00
Craig Macomber (Microsoft) 86ee6ad7bb
Update type tests to use 2.10 (#23145)
## Description

Update client type tests to use 2.10

Used: `pnpm run typetests:prepare`
2024-11-19 15:21:27 -08:00
Michael Zhen cef6ce1d36
(docs): build-docs pipeline without upload artifact (#23150)
previous build-docs pipeline for temporary deployment of static doc
changes.
excludes steps to upload-json artifacts
2024-11-19 15:08:37 -08:00
Joshua Smithrud dadfe49432
build(docs): Ensure API docs gen doesn't create "partial" documents (#23147)
Docusaurus treats document files whose names start with `_` as "partial"
documents, which don't get included in site output. We have a couple of
API exports that start with `_`, and result in files that end up treated
as partials. To work around this, we now prepend "u" to any files that
would otherwise start with an underscore.

"u" is a pretty arbitrary choice. We can't simply remove the underscore,
as that would be much more likely to create filename collisions. While
it is technically possible that we could export an API item that starts
with "u_", doing so would violate our naming conventions, and seems
pretty unlikely. If such an API item is added, Docusaurus will start
failing on duplicate routes, at which point we can change strategies.

See https://docusaurus.io/docs/create-doc for more details on partial
documents.


[AB#23443](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/23443)
2024-11-19 13:40:57 -08:00
Pranshu 580a3f77ae
added a new page for Presence (#23108)
## Description

Added a new page for the new Presence APIs and supported scenarios

---------

Co-authored-by: Rick Kirkham <Rick-Kirkham@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2024-11-19 11:50:27 -08:00
Tony Murphy 3426b434df
Enable Synchronous Child Datastore Creation (#23143)
## Overview

This feature introduces a new pattern for creating datastores
synchronously within the Fluid Framework. It allows for the synchronous
creation of a child datastore from an existing datastore, provided that
the child datastore is available synchronously via the existing
datastore's registry and that the child's factory supports synchronous
creation. This method also ensures strong typing for the consumer.

In this context, "child" refers specifically to the organization of
factories and registries, not to any hierarchical or hosting
relationship between datastores. The parent datastore does not control
the runtime behaviors of the child datastore beyond its creation.

The synchronous creation of child datastores enhances the flexibility of
datastore management within the Fluid Framework. It ensures type safety
and provides a different way to manage datastores within a container.
However, it is important to consider the overhead associated with
datastores, as they are stored, summarized, garbage collected, loaded,
and referenced independently. This overhead should be justified by the
scenario's requirements.

Datastores offer increased capabilities, such as the ability to
reference them via handles, allowing multiple references to exist and
enabling those references to be moved, swapped, or changed.
Additionally, datastores are garbage collected after becoming
unreferenced, which can simplify final cleanup across clients. This is
in contrast to subdirectories in a shared directory, which do not have
native capabilities for referencing or garbage collection but are very
low overhead to create.

Synchronous creation relies on both the factory and the datastore to
support it. This means that asynchronous operations, such as resolving
handles, some browser API calls, consensus-based operations, or other
asynchronous tasks, cannot be performed during the creation flow.
Therefore, synchronous child datastore creation is best limited to
scenarios where the existing asynchronous process cannot be used, such
as when a new datastore must be created in direct response to
synchronous user input.

## Key Benefits

- **Synchronous Creation**: Allows for the immediate creation of child
datastores without waiting for asynchronous operations.
- **Strong Typing**: Ensures type safety and better developer experience
by leveraging TypeScript's type system.

## Use Cases

### Example 1: Creating a Child Datastore

In this example, we demonstrate how to support creating a child
datastore synchronously from a parent datastore.

```typescript
/**
 * This is the parent DataObject, which is also a datastore. It has a
 * synchronous method to create child datastores, which could be called
 * in response to synchronous user input, like a key press.
 */
class ParentDataObject extends DataObject {
	get ParentDataObject() {
		return this;
	}
	protected override async initializingFirstTime(): Promise<void> {
		// create synchronously during initialization
		this.createChild("parentCreation");
	}

	createChild(name: string): ChildDataStore {
		assert(
			this.context.createChildDataStore !== undefined,
			"this.context.createChildDataStore",
		);
		// creates a detached context with a factory who's package path is the same
		// as the current datastore, but with another copy of its own type.
		const { entrypoint } = this.context.createChildDataStore(
			ChildDataStoreFactory.instance,
		);
		const dir = this.root.createSubDirectory("children");
		dir.set(name, entrypoint.handle);
		entrypoint.setProperty("childValue", name);

		return entrypoint;
	}

	getChild(name: string): IFluidHandle<ChildDataStore> | undefined {
		const dir = this.root.getSubDirectory("children");
		return dir?.get<IFluidHandle<ChildDataStore>>(name);
	}
}
```

For a complete example see the follow test:

https://github.com/microsoft/FluidFramework/blob/main/packages/test/local-server-tests/src/test/synchronousDataStoreCreation.spec.ts

---------

Co-authored-by: jzaffiro <110866475+jzaffiro@users.noreply.github.com>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
2024-11-19 19:33:14 +00:00
Joshua Smithrud c11bc168c4
refactor(docs): Remove binary images from website source (#23137)
The removed images have been uploaded to our blob storage. The website
contents now refer to them by URL.
2024-11-19 19:30:15 +00:00
WillieHabi 13ee3b4b8f
Signal Tracking: update `connected` checks (#22758)
## Description
In this PR we remove any connected checks in signal tracking system and
reset the tracking metrics when a client reconnects.
2024-11-19 09:52:56 -08:00
Alex Villarreal a772c76c70
refactor(examples): Make all depdendencies into devDeps in the simplemde example (#23110)
## Description

Switches all dependencies in the simplemde example app to be
devDependencies.

The example apps in the repo are not production code and aren't
published or deployed anywhere. Having prod dependencies in them causes
our lockfiles to mark them as such, and consequently Component
Governance potentially flags them for prod-level security
vulnerabilities. We have one outstanding prod-level alert about the
simplemde package (which seems abandoned); this change should remove the
prod-level severity from it while we migrate to another package for this
example, or get rid of it altogether.

The [ai-collab sample app already showcases this
pattern](https://github.com/microsoft/FluidFramework/blob/main/examples/apps/ai-collab/package.json#L33).
2024-11-19 16:03:08 +00:00
Craig Macomber (Microsoft) adc25b0961
[bump] client: 2.10.0 => 2.11.0 (minor) (#23134)
## Description

Bumped client from 2.10.0 to 2.11.0.
2024-11-18 19:23:30 -08:00
Tyler Butler 50cb876bc4
build: Remove changelog entries for reverted change (#23139)
Removes changelog entries for the reverted changes in #23133. Also
removes some lingering entries in the release notes from that same
change. Finally, also fixes up some heading levels in the release notes
and TOC that were missed in review.
2024-11-18 19:10:19 -08:00
Jason Hartman b92a003c1e
revert: "Enable Synchronous Child Datastore Creation (#22962)" (#23133)
and collateral "Tag asserts for release (#23128)"

This reverts commits 67b5e4dca8 and
eefaaf3c2a.
2024-11-18 17:39:41 -08:00
Craig Macomber (Microsoft) 3cd1f01a14
Generate changelogs (#23132)
## Description

Generate change logs with `pnpm exec flub generate changelog -g client`
2024-11-19 00:16:38 +00:00
Ji Kim 116064a36e
feat(eslint-config-fluid): Add how to add a new eslint rule in `eslint-plugin-fluid` package. (#23004)
#### Description


[22739](https://dev.azure.com/fluidframework/internal/_workitems/edit/22739)

This PR adds step by step instructions for:
- Adding a new rule to the `estlint-plugin-fluid`
- Bumping the `eslint-plugin-fluid` version
- Bumping the `eslint-config-fluid` version

---------

Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
2024-11-18 23:52:48 +00:00
Joshua Smithrud a101fb23ba
fix(docs): Fix site title and description (#23131)
Current contents were copied from example boilerplate and were missed in
the initial Docusaurus PR.

This PR fixes the generated site title to be `Fluid Framework` instead
of `Fluid Framework | Hello from Fluid Framework!`.
Also removes the template page description.
2024-11-18 15:42:16 -08:00
Michael Zhen e8d8c654e1
(docs): update build-docs to deploy v2 artifacts (#22934)
Update to deployment and docs generation: adjustments to deploy v2
artifact instead of main artifacts. Note: while the update aims to
deploy artifacts from the latest release branches instead of main, the
actual website build is still done on the main branch. This will prevent
the pipeline from deploying docs which were generated with an outdated
version of the website.
Notable changes:

deploy-docs:
- shifted most of the stages from build-docs to deploy-docs
- build-docs now runs check_branch_version -> upload-json -> trigger
deploy

build-docs:
- shifted check_branch_version to the top since its output is required
to properly in the upload json step

upload-json-step:
- added a new upload step which uploads artifacts with the name
"latest-v*.tar.gz"
- takes in new parameters from check_branch_version to ensure it only
uploads with this name when the pipeline is running on the latest
release branch

latestVersions:
- since upload-json-step requires majorVersion, I figured it was best to
include it as an output variable for the function as it seems more
robust compared to relying on a string parsing script in the pipeline
itself

download-apis:
- update such that it only downloads "latest-v*.tar.gz" instead of the
main branch artifacts
2024-11-18 15:30:43 -08:00
Craig Macomber (Microsoft) 25d389a67f
Release notes for 2.10 (#23130)
## Description

Generate release notes with:

`pnpm exec flub generate releaseNotes -g client -t minor --out
RELEASE_NOTES/2.10.0.md`
2024-11-18 15:22:42 -08:00
Craig Macomber (Microsoft) eefaaf3c2a
Tag asserts for release (#23128)
## Description

Tag asserts for release
2024-11-18 22:00:04 +00:00
Jason Hartman c6559be1a6
fix(client-presence): restore initial state values (#23127)
Corrects regression from #23120
2024-11-18 21:20:32 +00:00
Jenn da348bb19e
fix(tree): do not fire changed event for rebases on branches (#23125)
This makes it so that changed events are not fired when rebases happen
on branches that are not the main branch and also adds a regression test
for this scenario. Rebases that happen on the main branch are remote
changes and therefore correct.
2024-11-18 20:56:09 +00:00
daesunp 87261f6a83
chunked forest memory benchmark tests (#23007)
## Description

Adds memory benchmark tests for initializing different types of trees
for chunked forest.

Currently the `defaultChunkPolicy` is being used during initialization,
which defaults to a polymorphic shape. Once this is resolved, the memory
benchmarks should see much better performance for chunked forest.

### SharedTree Memory Usage - Array of Monomorphic Leaves

| Status | Name | Total Time (s) | Heap Used Avg | Heap Used StdDev |
Margin of Error | Relative Margin of Error | Iterations |

|--------|---------------------------------------------------|----------------|----------------|-------------------|----------------|---------------------------|------------|
| ✔ | Initialize 1 nodes into tree using ObjectForest | 6.29 |
236,784.95 | 27,567.46 | ±5,895.40 | ±2.49% | 88 |
| ✔ | Initialize 1 nodes into tree using ChunkedForest | 4.07 |
198,545.04 | 18,408.64 | ±4,909.99 | ±2.47% | 57 |
| ✔ | Initialize 10 nodes into tree using ObjectForest | 3.54 |
205,398.64 | 6,858.28 | ±1,960.75 | ±0.95% | 50 |
| ✔ | Initialize 10 nodes into tree using ChunkedForest | 3.56 |
205,955.57 | 17,454.18 | ±4,990.07 | ±2.42% | 50 |
| ✔ | Initialize 100 nodes into tree using ObjectForest | 7.98 |
296,463.31 | 35,117.96 | ±6,749.45 | ±2.28% | 110 |
| ✔ | Initialize 100 nodes into tree using ChunkedForest| 3.63 |
332,212.26 | 24,223.60 | ±6,925.42 | ±2.08% | 50 |
| ✔ | Initialize 1000 nodes into tree using ObjectForest| 3.76 |
1,250,473.70 | 101,907.43 | ±29,134.86 | ±2.33% | 50 |
| ✔ | Initialize 1000 nodes into tree using ChunkedForest| 3.83 |
1,644,462.98 | 3,907.74 | ±1,117.20 | ±0.07% | 50 |

---

### SharedTree Memory Usage - Array of Polymorphic Leaves

| Status | Name | Total Time (s) | Heap Used Avg | Heap Used StdDev |
Margin of Error | Relative Margin of Error | Iterations |

|--------|---------------------------------------------------|----------------|----------------|-------------------|----------------|---------------------------|------------|
| ✔ | Initialize 1 nodes into tree using ObjectForest | 3.61 |
222,729.19 | 6,744.83 | ±1,928.32 | ±0.87% | 50 |
| ✔ | Initialize 1 nodes into tree using ChunkedForest | 3.56 |
198,200.85 | 5,705.92 | ±1,631.30 | ±0.82% | 50 |
| ✔ | Initialize 10 nodes into tree using ObjectForest | 5.01 |
200,724.97 | 19,817.98 | ±4,781.27 | ±2.38% | 70 |
| ✔ | Initialize 10 nodes into tree using ChunkedForest | 5.07 |
207,667.39 | 12,572.93 | ±3,033.34 | ±1.46% | 70 |
| ✔ | Initialize 100 nodes into tree using ObjectForest | 3.62 |
299,202.55 | 10,332.74 | ±2,954.08 | ±0.99% | 50 |
| ✔ | Initialize 100 nodes into tree using ChunkedForest| 5.10 |
338,058.06 | 3,393.39 | ±818.69 | ±0.24% | 70 |
| ✔ | Initialize 1000 nodes into tree using ObjectForest| 3.74 |
1,270,979.74 | 17,797.32 | ±5,088.17 | ±0.40% | 50 |
| ✔ | Initialize 1000 nodes into tree using ChunkedForest| 3.88 |
1,639,710.13 | 43,026.98 | ±12,301.22 | ±0.75% | 50 |

---

### SharedTree Memory Usage - Array of Deep Monomorphic Leaves

| Status | Name | Total Time (s) | Heap Used Avg | Heap Used StdDev |
Margin of Error | Relative Margin of Error | Iterations |

|--------|---------------------------------------------------|----------------|----------------|-------------------|----------------|---------------------------|------------|
| ✔ | Initialize 1 nodes into tree using ObjectForest | 3.77 |
241,242.72 | 19,135.28 | ±5,470.69 | ±2.27% | 50 |
| ✔ | Initialize 1 nodes into tree using ChunkedForest | 3.56 |
216,456.17 | 11,844.90 | ±3,386.40 | ±1.56% | 50 |
| ✔ | Initialize 10 nodes into tree using ObjectForest | 3.66 |
350,359.83 | 5,682.95 | ±1,624.73 | ±0.46% | 50 |
| ✔ | Initialize 10 nodes into tree using ChunkedForest | 3.69 |
338,993.87 | 9,305.82 | ±2,660.49 | ±0.78% | 50 |
| ✔ | Initialize 100 nodes into tree using ObjectForest | 5.53 |
1,700,227.76 | 155,393.86 | ±37,490.22 | ±2.21% | 70 |
| ✔ | Initialize 100 nodes into tree using ChunkedForest| 8.95 |
1,556,630.92 | 193,734.91 | ±37,234.65 | ±2.39% | 110 |
| ✔ | Initialize 1000 nodes into tree using ObjectForest| 11.03 |
15,515,518.13 | 5,076.09 | ±1,451.23 | ±0.01% | 50 |
| ✔ | Initialize 1000 nodes into tree using ChunkedForest| 12.95 |
13,930,719.83 | 2,269.00 | ±648.70 | ±0.00% | 50 |

---
2024-11-18 11:51:30 -08:00
Jason Hartman e3c4816e56
feat(client-presence): broadcast control defaults (#23120)
- `BroadcastControls` replace `LatestValueControls`
- `BroadcastControls` maybe specified on `PresenceStates` thru new
`controls` property as defaults for all value managers.
- `PresenceNotifications` redeclared apart from `PresenceStates` to
avoid `controls` exposure. Also yields better API documentation.
- `allowableUpdateLatencyMs` was renamed from `allowableUpdateLatency`
to clarify units are milliseconds. Specifying this value currently has
no effect.
- Unsupported `forcedRefreshInterval` has been removed until
implementation is closer.
2024-11-18 11:24:13 -08:00
Joshua Smithrud 233bcc4c08
style(docs): Format docs content with prettier (#23118)
Also makes some line-wrapping adjustments in accordance with [our
guidelines](https://github.com/microsoft/FluidFramework/wiki/Markdown-Best-Practices#line-breaks-along-sentence-boundaries).

I discovered while auditing the prettier output that prettier does not
seem to be able to handle some aspects of JSX syntax in .mdx files.
Specifically, comments. I've filed
[AB#24430](https://dev.azure.com/fluidframework/internal/_workitems/edit/24430)
to track investigations to make this work correctly.
2024-11-18 11:06:25 -08:00
Tony Murphy 53dd76c2c5
Remove Unnecessary Heading from Changeset (#23123)
The first line of a changeset shouldn't be unformatted. This change
removes an unnecessary heading from a this changeset.
2024-11-18 10:44:12 -08:00
Tony Murphy 67b5e4dca8
Enable Synchronous Child Datastore Creation (#22962)
## Overview

This feature introduces a new pattern for creating datastores
synchronously within the Fluid Framework. It allows for the synchronous
creation of a child datastore from an existing datastore, provided that
the child datastore is available synchronously via the existing
datastore's registry and that the child's factory supports synchronous
creation. This method also ensures strong typing for the consumer.

In this context, "child" refers specifically to the organization of
factories and registries, not to any hierarchical or hosting
relationship between datastores. The parent datastore does not control
the runtime behaviors of the child datastore beyond its creation.

The synchronous creation of child datastores enhances the flexibility of
datastore management within the Fluid Framework. It ensures type safety
and provides a different way to manage datastores within a container.
However, it is important to consider the overhead associated with
datastores, as they are stored, summarized, garbage collected, loaded,
and referenced independently. This overhead should be justified by the
scenario's requirements.

Datastores offer increased capabilities, such as the ability to
reference them via handles, allowing multiple references to exist and
enabling those references to be moved, swapped, or changed.
Additionally, datastores are garbage collected after becoming
unreferenced, which can simplify final cleanup across clients. This is
in contrast to subdirectories in a shared directory, which do not have
native capabilities for referencing or garbage collection but are very
low overhead to create.

Synchronous creation relies on both the factory and the datastore to
support it. This means that asynchronous operations, such as resolving
handles, some browser API calls, consensus-based operations, or other
asynchronous tasks, cannot be performed during the creation flow.
Therefore, synchronous child datastore creation is best limited to
scenarios where the existing asynchronous process cannot be used, such
as when a new datastore must be created in direct response to
synchronous user input.

## Key Benefits

- **Synchronous Creation**: Allows for the immediate creation of child
datastores without waiting for asynchronous operations.
- **Strong Typing**: Ensures type safety and better developer experience
by leveraging TypeScript's type system.

## Use Cases

### Example 1: Creating a Child Datastore

In this example, we demonstrate how to support creating a child
datastore synchronously from a parent datastore.

```typescript
/**
 * This is the parent DataObject, which is also a datastore. It has a
 * synchronous method to create child datastores, which could be called
 * in response to synchronous user input, like a key press.
 */
class ParentDataObject extends DataObject {
	get ParentDataObject() {
		return this;
	}
	protected override async initializingFirstTime(): Promise<void> {
		// create synchronously during initialization
		this.createChild("parentCreation");
	}

	createChild(name: string): ChildDataStore {
		assert(
			this.context.createChildDataStore !== undefined,
			"this.context.createChildDataStore",
		);
		// creates a detached context with a factory who's package path is the same
		// as the current datastore, but with another copy of its own type.
		const { entrypoint } = this.context.createChildDataStore(
			ChildDataStoreFactory.instance,
		);
		const dir = this.root.createSubDirectory("children");
		dir.set(name, entrypoint.handle);
		entrypoint.setProperty("childValue", name);

		return entrypoint;
	}

	getChild(name: string): IFluidHandle<ChildDataStore> | undefined {
		const dir = this.root.getSubDirectory("children");
		return dir?.get<IFluidHandle<ChildDataStore>>(name);
	}
}
```

For a complete example see the follow test:

https://github.com/microsoft/FluidFramework/blob/main/packages/test/local-server-tests/src/test/synchronousDataStoreCreation.spec.ts

---------

Co-authored-by: Matt Rakow <ChumpChief@users.noreply.github.com>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
2024-11-18 18:43:40 +00:00
Mark Fields cfaa1deca8
Offline: Add recent batch info from DuplicateBatchDetector to summary (#22454)
We've added a new data structure for tracking "recent" (based on MSN)
batchIds which are at risk for seeing a duplicate sequence batchID come
in. This data structure is consulted and modified on each incoming
batch.

Whenever we summarize, we need to include this state as of the given
sequence number, and when we load from a snapshot we need to repopulate
it as well.

Why? Because summaries can happen at any time, and a future container
loading from that point will need to know the recent batch IDs that may
possibly be followed by a sequenced duplicate.

---------

Co-authored-by: Kian Thompson <102998837+kian-thompson@users.noreply.github.com>
2024-11-18 10:39:42 -08:00
Joshua Smithrud 0b6d14fe51
build(docs): Move static webapp config (#23116)
Publishing step needs this config to live in the build output directory.
Placing it under `static` ensures it is copied to the right place.

See https://github.com/Azure/static-web-apps/issues/1071 for more
details.

Confirmed that the swa-cli is able to find this when run locally. This
is also how the site was setup previously, I was just misled by the
documentation leading me to believe that moving it to the root was okay.
It also worked using the local swa-cli tooling 🤷‍♂️
2024-11-15 23:23:56 +00:00
Joshua Smithrud 74cb3f7a83
build(docs): Make all deps dev (#23115)
Since this isn't a package that we publish, none of the deps need to be
non-dev.
2024-11-15 15:02:06 -08:00
Joshua Smithrud cbe61192be
build(devtools-browser-extension): Update extension name to omit the " (preview)" postfix (#23109)
The extension was previously bumped to 1.0.0, so this postfix should
have been removed.
2024-11-15 22:58:56 +00:00
Joshua Smithrud ac5883c8b7
ci(docs): Fix build location (#23114)
Pipeline still had a couple lingering references to the "public"
directory, but the new Docusaurus site outputs to "build".
2024-11-15 22:22:27 +00:00
Alex Villarreal dc9b5ee9b8
refactor: Update mermaid to address GitHub advisory (#23112)
## Description

Update mermaid to address
https://github.com/advisories/GHSA-m4gq-x24j-jpmf.
2024-11-15 22:19:37 +00:00
Joshua Smithrud fca3fc4215
test(docs): Disable test (#23111)
Fixing this is tracked by
[AB#24415](https://dev.azure.com/fluidframework/internal/_workitems/edit/24415)
2024-11-15 21:56:35 +00:00
Jenn 155a7e573a
test(tree): event test clean up (#23101)
moves some event tests to tree view test file and changes them to be
less undo redo focused
2024-11-15 13:28:35 -08:00
Craig Macomber (Microsoft) 30c7392704
Tag asserts for release (#23107)
## Description

Tag asserts for release using `pnpm exec flub release -g client`
2024-11-15 13:24:52 -08:00
Tony Murphy d54b9dde14
SharedString DDS annotateAdjustRange (#22751)
This update introduces a new feature to the `SharedString` DDS, allowing
for the adjustment of properties over a specified range. The
`annotateAdjustRange` method enables users to apply adjustments to
properties within a given range, providing more flexibility and control
over property modifications.

An adjustment is a modification applied to a property value within a
specified range. Adjustments can be used to increment or decrement
property values dynamically. They are particularly useful in scenarios
where property values need to be updated based on user interactions or
other events. For example, in a rich text editor, adjustments can be
used for modifying indentation levels or font sizes, where multiple
users could apply differing numerical adjustments.

### Key Features and Use Cases:
- **Adjustments with Constraints**: Adjustments can include optional
minimum and maximum constraints to ensure the final value falls within
specified bounds. This is particularly useful for maintaining consistent
formatting in rich text editors.
- **Consistent Property Changes**: The feature ensures that property
changes are consistent, managing both local and remote changes
effectively. This is essential for collaborative rich text editing where
multiple users may be making adjustments simultaneously.
- **Rich Text Formatting**: Adjustments can be used to modify text
properties such as font size, indentation, or other formatting
attributes dynamically based on user actions.

### Configuration and Compatibility Requirements:
This feature is only available when the configuration
`Fluid.Sequence.mergeTreeEnableAnnotateAdjust` is set to `true`.
Additionally, all collaborating clients must have this feature enabled
to use it. If any client does not have this feature enabled, it will
lead to the client exiting collaboration. A future major version of
Fluid will enable this feature by default.

### Usage Example:
```typescript
sharedString.annotateAdjustRange(start, end, {
    key: { value: 5, min: 0, max: 10 }
});
```


[AB#11819](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/11819)

---------

Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
2024-11-15 13:21:18 -08:00
Joshua Smithrud 65d9ac3dc3
feat(docs): Replace Hugo with Docusaurus (#22990)
# Docusaurus

Updates the website (/docs) to leverage
[Docusaurus](https://docusaurus.io/) in place of Hugo as its static site
generator.

## Functional changes

### Versioning

The existing Hugo-based site only has a partial versioning story.
The API docs are versioned, but the rest of the content isn't.
This creates a messy story where our hand-written docs likely only
discuss topics related to the current version, and we have no place to
put docs discussing earlier versions.
Or, even worse, we have a mixed bag of documentation for different
versions, creating a very unclear user story.

This prototype includes an end-to-end versioning story, [automated by
Docusaurus](https://docusaurus.io/docs/versioning).
Current (v2) docs live under `docs`.
Old (v1) docs live under `versioned_docs/version-1`.

Most of the documentation has been duplicated between the two versions,
but some minor changes have been made to make the docs better line up
with the corresponding version of the API.
These changes should be reviewed before being merged into main /
deploying the new website.

### Search

This branch includes an offline implementation of search.
An offline solution comes with some downsides (slower build, larger
bundle), and probably isn't what we want long term.
That said, it is much better than what our current website has (no
search whatsoever).

We should come back to this after v1 of our new website.

---------

Co-authored-by: Wayne Ferrao <wayneferrao@microsoft.com>
2024-11-15 21:04:34 +00:00
Jatin Garg 00e239a548
Fix race condition while establishing connection due to multiplexing in ODSP Driver. (#23085)
## Breaking Changes


[AB#22192](https://dev.azure.com/fluidframework/internal/_workitems/edit/22192)

Following up on this PR:
https://github.com/microsoft/FluidFramework/pull/23078 which we reverted
due to assert 0x245 due to the original change. The assert was caused
due to registering "disconnect" listener before the initialization.
In this change, I removed registering a listener as we already have
disconnectCore which is triggered on disconnection. So using that for
rejecting the promise.

---------

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
2024-11-15 11:38:04 -08:00
Jason Hartman 88a2039547
fix(client): declare proper `IAudience` implementation (#23106)
by explicitly specifying `getSelf` return type. Also remove the
incorrect undefined `client` property.

Enable `exactOptionalPropertyTypes` and fix errors to keep `IAudience`
implementation strictly checked.
2024-11-15 10:12:20 -08:00
Alex Villarreal e539e00ca5
refactor: Make all pipelines use new agent pools in eastus2 (#23072)
## Description

We're moving our agent pools to the eastus2 region as part of a capacity
management initiative. This PR updates all pipelines to use the new
pools.
2024-11-15 10:16:13 -06:00
WillieHabi 325bc7c352
docs(client-presence): remove 'experimental package' usage in Presence docs (#23105)
## Description
Presence has been promoted to alpha and is not experimental package
anymore. This PR removes the 'experimental package' usage in Presence
docs
2024-11-14 23:22:04 -08:00
Jason Hartman 2b69913acd
docs(client-presence): changelog & changeset updates (#23030)
1. Setup changeset to be used for all `Presence` changes
2. Add notes for rename
3. Update CHANGELOG to reflect 2.50 release notes and [vague] 2.4.0
history
2024-11-15 07:20:12 +00:00
Jason Hartman 83ee76e51c
docs(client-presence): update `Notifications` limitations (#23100) 2024-11-14 21:55:43 -08:00
Joshua Smithrud 8a75fa9ab2
bump(devtools-browser-extension): 1.0.0 (#23102)
Bump devtools browser extension version to 1.0.0.
2024-11-15 02:39:02 +00:00
WillieHabi e6030446f8
promote(client-presence): promote to alpha (#23073)
## Description
Promote presence to alpha from experimental

---------

Co-authored-by: Jason Hartman <jasonha@microsoft.com>
2024-11-14 17:20:47 -08:00
Daniel Madrid 136a519cb9
Fix 0x6c8 assert hit (#23079)
This change fixes issue covered in PR
https://github.com/microsoft/FluidFramework/pull/22981
After several simplifications, I realized we could reuse
pendingStashedBlobs map to identify the bug scenario, which is
reuploading a stashed blob that was already processed. If while
onUploadResolve we don't see the blob in the pending list but it's on
the stashed one, then just ignore the new upload.
trackPendingStashedUploads is replaced with waitForStashedBlobs which
also implies there are further simplifications to the blob manager
logic, mainly we could also remove the stashedUpload property on the
PendingBlob type since now we keep track of stashed blobs separately .
2024-11-14 16:10:48 -08:00
Joshua Smithrud b054eb5a39
fix(devtools-view): Assign "button" role to selectable menu section headers. (#23093)
Accessibility bug fix.

Also refactors the code to be a bit more intentional about how the
section header behaves, and applies alt text to section headers that are
buttons.


[AB#4833](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/4833)
2024-11-14 23:38:02 +00:00
Joshua Smithrud d0c5af1b86
build(api-markdown-documenter): Bump package version for publishing (#23098)
Bumped for #23083
2024-11-14 23:15:59 +00:00
Craig Macomber (Microsoft) 662d7a5fe2
Update build-tools version used by client (#23097)
## Description

This used:

1. `pnpm exec flub bump deps client -g  -t latest`
2. Manually update version in root package.json
3. pnpm install --no-frozen-lockfile
4. Remove no longer needed type test breaks from tree (this update had
some fixes to handling of never and system types in type tests)
5. `pnpm run build:fast`
2024-11-14 15:13:41 -08:00