EditableTree: Implement editable fields with new cursor#12621
Merged
Conversation
sharptrip
commented
Oct 21, 2022
sharptrip
commented
Oct 26, 2022
sharptrip
commented
Oct 26, 2022
Contributor
Author
|
@CraigMacomber I have adopted the latest |
…to editable-sequence
CraigMacomber
approved these changes
Oct 27, 2022
sharptrip
added a commit
to sharptrip/FluidFramework
that referenced
this pull request
Oct 28, 2022
) Same as [microsoft#12488](microsoft#12512), but using a new cursor API. ## Description This PR implements `EditableField` as an array-like sequence of nodes (`EditableTrees`), which 1) replaces handling of sequence fields with arrays, 2) allows to access nodes lazily by their indices with and without unwrapping, and 3) is a required change to implement editing of `EditableTree`. ## Reviewer Guidance Everything around "root" probably might be considered as a workaround as currently `cursor.getPath()` and anchors do not support fields. Also, it seems that "primaryField" property of `FieldProxyTarget` is redundant, as `fieldKey` is also there, but it adds clarity, and we might make use of it when implementing editing. ## Other information or known dependencies **Step 4** in a series to push code from microsoft#12182 to enable editing of EditableTree. [Step 3](microsoft#12428) [Step 2](microsoft#12306) [Step 1](microsoft#12300) Co-authored-by: Craig Macomber (Microsoft) <42876482+CraigMacomber@users.noreply.github.com>
alexvy86
pushed a commit
to alexvy86/FluidFramework
that referenced
this pull request
Nov 1, 2022
) Same as [microsoft#12488](microsoft#12512), but using a new cursor API. ## Description This PR implements `EditableField` as an array-like sequence of nodes (`EditableTrees`), which 1) replaces handling of sequence fields with arrays, 2) allows to access nodes lazily by their indices with and without unwrapping, and 3) is a required change to implement editing of `EditableTree`. ## Reviewer Guidance Everything around "root" probably might be considered as a workaround as currently `cursor.getPath()` and anchors do not support fields. Also, it seems that "primaryField" property of `FieldProxyTarget` is redundant, as `fieldKey` is also there, but it adds clarity, and we might make use of it when implementing editing. ## Other information or known dependencies **Step 4** in a series to push code from microsoft#12182 to enable editing of EditableTree. [Step 3](microsoft#12428) [Step 2](microsoft#12306) [Step 1](microsoft#12300) Co-authored-by: Craig Macomber (Microsoft) <42876482+CraigMacomber@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Same as #12488, but using a new cursor API.
Description
This PR implements
EditableFieldas an array-like sequence of nodes (EditableTrees), whichEditableTree.Reviewer Guidance
Everything around "root" probably might be considered as a workaround as currently
cursor.getPath()and anchors do not support fields.Also, it seems that "primaryField" property of
FieldProxyTargetis redundant, asfieldKeyis also there, but it adds clarity, and we might make use of it when implementing editing.Other information or known dependencies
Step 4 in a series to push code from #12182 to enable editing of EditableTree.
Step 3
Step 2
Step 1