Page MenuHomePhabricator

[lib] DMOperationSpec for edit entry operation
ClosedPublic

Authored by will on Sep 16 2024, 1:18 AM.
Tags
None
Referenced Files
F3174464: D13341.diff
Thu, Nov 7, 4:52 PM
F3168540: D13341.diff
Thu, Nov 7, 6:38 AM
Unknown Object (File)
Wed, Oct 23, 9:11 AM
Unknown Object (File)
Tue, Oct 22, 1:18 PM
Unknown Object (File)
Tue, Oct 22, 10:22 AM
Unknown Object (File)
Sat, Oct 19, 5:57 AM
Unknown Object (File)
Sat, Oct 19, 3:28 AM
Unknown Object (File)
Sat, Oct 19, 1:26 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
Lint Not Applicable
Unit
Tests Not Applicable

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