Page MenuHomePhabricator

[lib] DMOperationSpec for edit entry operation
ClosedPublic

Authored by will on Sep 16 2024, 1:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 7:02 AM
Unknown Object (File)
Wed, Nov 20, 6:40 AM
Unknown Object (File)
Wed, Nov 20, 6:39 AM
Unknown Object (File)
Thu, Nov 7, 4:52 PM
Unknown Object (File)
Thu, Nov 7, 6:38 AM
Unknown Object (File)
Wed, Oct 23, 9:11 AM
Unknown Object (File)
Oct 22 2024, 1:18 PM
Unknown Object (File)
Oct 22 2024, 10:22 AM
Subscribers
None

Details

Summary

Implements dm operation spec for editing entries

Depends on D13340

Test Plan

tested later in stack. will not land until I test notifs

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

will requested review of this revision.Sep 16 2024, 1:36 AM
tomek requested changes to this revision.Sep 16 2024, 3:47 AM
tomek added inline comments.
lib/shared/dm-ops/edit-entry-spec.js
52–66 ↗(On Diff #44195)

We have to check the timestamp before performing this operation. An example of a problem we're trying to solve is receiving an operation about editing an entry that happened before deleting an entry, but in inverse order (we first receive the delete operation and the edit).

lib/types/dm-ops.js
422–445 ↗(On Diff #44195)

Can we extract the common part of the types and validators?

This revision now requires changes to proceed.Sep 16 2024, 3:47 AM
lib/shared/dm-ops/edit-entry-spec.js
52–66 ↗(On Diff #44195)

I did this check in a separate diff way up the stack. Should I merge them into one diff here?
https://phab.comm.dev/D13347

will requested review of this revision.Sep 16 2024, 8:02 AM

Requesting review. Timestamp check included in future diff and will prioritize landing this by organizing code in a future diff

lib/types/dm-ops.js
422–445 ↗(On Diff #44195)

Going to reorganize these in a future diff

tomek added inline comments.
lib/types/dm-ops.js
422–445 ↗(On Diff #44195)

I think you can introduce something similar to existingThreadDetails from some other operations from this file. And then, make it a property of your operations. By doing that we would be able to create a function that converts an entry into the entry details and reduce some duplication.

This revision is now accepted and ready to land.Sep 16 2024, 8:43 AM

keep op time field consistent in edit entry operation. rename lastUpdatedTo field to time