Page MenuHomePhabricator

[lib] Move entries updates logic into a spec
ClosedPublic

Authored by tomek on Sep 21 2023, 8:22 AM.
Tags
None
Referenced Files
F2191296: D9257.diff
Thu, Jul 4, 2:56 PM
F2186241: D9257.id31777.diff
Thu, Jul 4, 2:34 AM
Unknown Object (File)
Wed, Jul 3, 1:21 PM
Unknown Object (File)
Wed, Jul 3, 7:12 AM
Unknown Object (File)
Tue, Jul 2, 4:00 PM
Unknown Object (File)
Sun, Jun 30, 3:31 AM
Unknown Object (File)
Fri, Jun 21, 9:50 AM
Unknown Object (File)
Fri, Jun 21, 9:50 AM
Subscribers

Details

Summary

Move the logic into specs. Entry store update is based on mutating the input, so it isn't ideal, but I didn't want to alter the logic significantly as a part of this simple refactoring.

Depends on D9245

https://linear.app/comm/issue/ENG-4241/handle-processupdatesactiontype-as-a-part-of-a-spec

Test Plan

Check if joining a thread and updating an entry correctly affect the store.

Diff Detail

Repository
rCOMM Comm
Branch
redux-update-spec
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Sep 21 2023, 8:40 AM

Not a fan of keeping the solution with mutating input, but accepting this since fixing this is not a part of this work. Maybe we can at least create a task to improve this?

This revision is now accepted and ready to land.Sep 25 2023, 2:31 AM
In D9257#272801, @kamil wrote:

Not a fan of keeping the solution with mutating input, but accepting this since fixing this is not a part of this work. Maybe we can at least create a task to improve this?

Makes sense. Created a task for it https://linear.app/comm/issue/ENG-5158/consider-using-an-immutable-approach-in-entries-updates-spec