Skip to content

SharedString DDS annotateAdjustRange#22751

Merged
anthony-murphy merged 165 commits into
mainfrom
test/merge-tree-adjust
Nov 15, 2024
Merged

SharedString DDS annotateAdjustRange#22751
anthony-murphy merged 165 commits into
mainfrom
test/merge-tree-adjust

Conversation

@anthony-murphy
Copy link
Copy Markdown
Contributor

@anthony-murphy anthony-murphy commented Oct 8, 2024

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:

sharedString.annotateAdjustRange(start, end, {
    key: { value: 5, min: 0, max: 10 }
});

AB#11819

anthony-murphy and others added 30 commits September 17, 2024 09:32
…to seperate-segment-visabilty-interfaces
Comment thread packages/dds/merge-tree/src/segmentPropertiesManager.ts Outdated
Comment thread .changeset/ninety-dragons-fold.md Outdated
Comment thread packages/dds/sequence/src/sequence.ts Outdated
anthony-murphy added a commit that referenced this pull request Nov 13, 2024
…nge (#23059)

This change splits out the changes the PropertiesManger class from
#22751. The goal is to supply a smaller set of changes that are easier
to review, and allow #22751 to be checked in in two parts. After this
all that will be left in #22751 is plumbing the feature through the
layers.

For the broader context of this change, please read the descriptions
from: #22751

---------

Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
Co-authored-by: Abram Sanderson <Abram.sanderson@gmail.com>
Comment thread packages/dds/sequence/src/sequence.ts Outdated
Copy link
Copy Markdown
Contributor

@jzaffiro jzaffiro left a comment

Choose a reason for hiding this comment

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

Changes look good to me, but I didn't have a chance to review the first PR so you may want a second opinion.

Comment thread packages/dds/sequence/src/sequence.ts Outdated
@anthony-murphy anthony-murphy enabled auto-merge (squash) November 15, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dds: sharedstring area: dds Issues related to distributed data structures area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch changeset-present public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants