Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharedString DDS annotateAdjustRange #22751

Open
wants to merge 164 commits into
base: main
Choose a base branch
from
Open

Conversation

anthony-murphy
Copy link
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
@anthony-murphy anthony-murphy changed the title Test/merge tree adjust SharedString DDS annotateAdjustRange Nov 8, 2024
@anthony-murphy anthony-murphy marked this pull request as ready for review November 8, 2024 18:00
@anthony-murphy anthony-murphy requested review from a team as code owners November 8, 2024 18:00
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 <[email protected]>
Co-authored-by: Abram Sanderson <[email protected]>
Copy link
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.

packages/dds/sequence/src/sequence.ts Outdated Show resolved Hide resolved
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> [email protected] ci:linkcheck /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test ci:start 1313 linkcheck:full

1: starting server using command "npm run ci:start"
and when url "[ 'http://127.0.0.1:1313' ]" is responding with HTTP status code 200
running tests using command "npm run linkcheck:full"


> [email protected] ci:start
> http-server ./public --port 1313 --silent


> [email protected] linkcheck:full
> npm run linkcheck:fast -- --external


> [email protected] linkcheck:fast
> linkcheck http://localhost:1313 --skip-file skipped-urls.txt --external

Crawling...

Stats:
  444350 links
    3418 destination URLs
       2 URLs ignored
       0 warnings
       0 errors


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.

3 participants