-
Notifications
You must be signed in to change notification settings - Fork 531
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
(tree): Add explicit revision tag to all changes #22525
(tree): Add explicit revision tag to all changes #22525
Conversation
packages/dds/tree/src/feature-libraries/optional-field/optionalField.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/default-schema/defaultEditBuilder.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/optional-field/optionalField.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/sequence-field/sequenceFieldEditor.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/sequence-field/sequenceFieldEditor.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/sequence-field/sequenceFieldEditor.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/modular-schema/modularChangeFamily.ts
Outdated
Show resolved
Hide resolved
@@ -672,18 +673,19 @@ export class ModularChangeFamily | |||
change.change.destroys === undefined, | |||
0x89a /* Unexpected destroys in change to invert */, | |||
); | |||
const { revInfos } = getRevInfoFromTaggedChanges([change]); | |||
|
|||
if (hasConflicts(change.change)) { | |||
return makeModularChangeset( |
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.
I agree its the current code is ugly and unclear. I think the best way to improve it would be to refator makeModularChangeset
so that it takes a bag of named properies (most of which would be optional).
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.
Agreed. I will do it in a separate PR. This PR is anyway too big :-). Created AB#15937 to do this.
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.
The comments are still here. Unresolving.
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.
Not sure what you mean. Do you want me remove the comments for params?
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.
Ah, sorry that was not clear. Yes, that's what I had in mind. It's adding noise to this PR and the comments are likely to go stale without anyone noticing (or be wrong from the start as was the case at one point, I haven't checked the rest).
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.
I am working on this already. So, we can leave the comments :-). I will send out a PR soon.
packages/dds/tree/src/feature-libraries/modular-schema/modularChangeFamily.ts
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/modular-schema/modularChangeFamily.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/sequence-field/invert.ts
Outdated
Show resolved
Hide resolved
ec5d6e8
to
bfd3c31
Compare
⯅ @fluid-example/bundle-size-tests: +2.3 KB
Baseline commit: ecdf26a |
packages/dds/tree/src/feature-libraries/optional-field/optionalField.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/optional-field/optionalField.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/modular-schema/modularChangeFamily.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/feature-libraries/modular-schema/modularChangeFamily.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/test/feature-libraries/modular-schema/modularChangeFamily.spec.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/test/feature-libraries/optional-field/optionalChangeRebaser.test.ts
Outdated
Show resolved
Hide resolved
packages/dds/tree/src/test/feature-libraries/sequence-field/invert.test.ts
Outdated
Show resolved
Hide resolved
31ef2ea
to
4b8907b
Compare
…property bag (#22699) From #22525 (comment). Updated `makeModularChangeset`, `buildModularChangesetFromField` and `buildModularChangesetFromNode` to take a property bag as parameter. These functions take a lot of parameters and it's currently a little hard to tell them apart from calling them. Having a property bag makes the parameters clear.
## Description When the default edit builder generates a change, it does not have a revision tag associated with it. The revision tag is added later by calling `ChangeRebaser.changeRevision`. This PR updates these changes to have revision tag associated with it. It also updates the `invert` function to generate changes with revision tags. [AB#13508](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/13508) --------- Co-authored-by: Yann Achard <[email protected]>
…property bag (#22699) From #22525 (comment). Updated `makeModularChangeset`, `buildModularChangesetFromField` and `buildModularChangesetFromNode` to take a property bag as parameter. These functions take a lot of parameters and it's currently a little hard to tell them apart from calling them. Having a property bag makes the parameters clear.
Description
When the default edit builder generates a change, it does not have a revision tag associated with it. The revision tag is added later by calling
ChangeRebaser.changeRevision
. This PR updates these changes to have revision tag associated with it.It also updates the
invert
function to generate changes with revision tags.AB#13508