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

Allow querying for interval from its local reference endpoint #11582

Merged
merged 2 commits into from Aug 18, 2022

Conversation

Abe27342
Copy link
Contributor

This adds an API to @fluidframework/sequence which enables recovering an interval from one of its endpoints. The specific API retrieves the label for the interval collection that endpoint is a part of, as well as the id of the interval. This required storing an additional prop on each endpoint reference. I also fixed a bug in treating the label field differently on reloaded intervals.

The motivation for this change is to enable reasonable undo-redo behaviors for SlideOnRemove intervals to be implementable. There is some discussion of the issue on #11269.

This includes the changes to interval collections from #11550 without suggesting exact implementation for undo-redo.

@Abe27342 Abe27342 requested a review from a team as a code owner August 17, 2022 22:35
@Abe27342 Abe27342 changed the title Interval collection query Allow querying for interval from its local reference endpoint Aug 17, 2022
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: sharedstring public api change Changes to a public API base: main PRs targeted against main branch labels Aug 17, 2022
@msfluid-bot
Copy link
Collaborator

@fluid-example/bundle-size-tests: +330 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 392.28 KB 392.45 KB +165 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 191.92 KB 191.92 KB No change
loader.js 151.12 KB 151.12 KB No change
map.js 42.63 KB 42.63 KB No change
matrix.js 131.63 KB 131.63 KB No change
odspDriver.js 150.23 KB 150.23 KB No change
odspPrefetchSnapshot.js 38.39 KB 38.39 KB No change
sharedString.js 152.26 KB 152.42 KB +165 Bytes
Total Size 1.25 MB 1.25 MB +330 Bytes

Baseline commit: a320268

Generated by 🚫 dangerJS against 4ca3956

/**
* Label for the collection the interval is a part of
*/
label: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

i assume we need this because it's not possible to get back to the collection from a specific interval? seems like something that could be improved.

@Abe27342 Abe27342 merged commit 1dd9cec into microsoft:main Aug 18, 2022
@github-actions
Copy link
Contributor

This commit is queued for merging with the next branch! Please ignore this PR for now. Contact @microsoft/fluid-cr-infra for help.

@Abe27342 Abe27342 deleted the interval-collection-query branch February 3, 2023 19:00
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 base: main PRs targeted against main branch public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants