Page MenuHomePhabricator

[lib] DMOperationSpec for edit entry operation
ClosedPublic

Authored by will on Sep 16 2024, 1:18 AM.
Tags
None
Referenced Files
F3011535: D13341.id44195.diff
Sat, Oct 19, 1:26 AM
F3009490: D13341.diff
Fri, Oct 18, 10:23 PM
F3004287: D13341.id.diff
Fri, Oct 18, 1:58 PM
Unknown Object (File)
Tue, Oct 15, 7:18 PM
Unknown Object (File)
Mon, Oct 14, 8:20 PM
Unknown Object (File)
Tue, Oct 1, 9:08 AM
Unknown Object (File)
Sun, Sep 29, 3:44 PM
Unknown Object (File)
Sat, Sep 28, 3:39 PM
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