-
Notifications
You must be signed in to change notification settings - Fork 535
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
refactor(tree): move global and rename effects to the delta root #23484
Draft
jenn-le
wants to merge
10
commits into
microsoft:main
Choose a base branch
from
jenn-le:global-rename-delta-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ffb1c44
move global and rename effects to the delta root object
jenn-le f38e178
Merge branch 'main' into global-rename-delta-refactor
jenn-le 223e3d7
move global and rename into root delta
jenn-le 09a1245
avoid making into delta implementation functions have side effects
jenn-le 8097b8e
changes
jenn-le 3753fae
remove change to ToDelta contract
jenn-le 2daf01d
fix field change handler into delta contract
jenn-le 7d65e5f
revert field kind changes
jenn-le 2d4ee09
get build working
jenn-le 134c1fd
Merge remote-tracking branch 'upstream/main' into global-rename-delta…
jenn-le File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ | |
import type { ICodecFamily, IJsonCodec } from "../../codec/index.js"; | ||
import type { | ||
ChangeEncodingContext, | ||
DeltaDetachedNodeChanges, | ||
DeltaDetachedNodeId, | ||
DeltaDetachedNodeRename, | ||
DeltaFieldChanges, | ||
DeltaFieldMap, | ||
EncodedRevisionTag, | ||
|
@@ -49,7 +51,7 @@ export interface FieldChangeHandler< | |
change: TChangeset, | ||
deltaFromChild: ToDelta, | ||
idAllocator: MemoizedIdRangeAllocator, | ||
): DeltaFieldChanges; | ||
): [DeltaFieldChanges, DeltaDetachedNodeChanges[], DeltaDetachedNodeRename[]]; | ||
/** | ||
* Returns the set of removed roots that should be in memory for the given change to be applied. | ||
* A removed root is relevant if any of the following is true: | ||
|
@@ -195,7 +197,9 @@ export interface FieldEditor<TChangeset> { | |
* The `index` represents the index of the child node in the input context. | ||
* The `index` should be `undefined` iff the child node does not exist in the input context (e.g., an inserted node). | ||
*/ | ||
export type ToDelta = (child: NodeId) => DeltaFieldMap; | ||
export type ToDelta = ( | ||
child: NodeId, | ||
) => [DeltaFieldMap, DeltaDetachedNodeChanges[], DeltaDetachedNodeRename[]] | undefined; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason this contract needs to change? (See the second paragraph in https://dev.azure.com/fluidframework/internal/_workitems/edit/13504) |
||
|
||
/** | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.