Page MenuHomePhabricator

[lib] introduce the aux user store ops
ClosedPublic

Authored by will on Mar 31 2024, 9:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 1:50 AM
Unknown Object (File)
Oct 14 2024, 3:54 PM
Unknown Object (File)
Oct 14 2024, 3:54 PM
Unknown Object (File)
Oct 14 2024, 3:54 PM
Unknown Object (File)
Oct 14 2024, 3:54 PM
Unknown Object (File)
Sep 23 2024, 9:47 AM
Unknown Object (File)
Sep 18 2024, 3:21 AM
Unknown Object (File)
Sep 4 2024, 1:28 AM
Subscribers

Details

Summary

This diff introduces the aux user store ops spec. This will be used to process aux user store operations.

Depends on D11505

Test Plan

flow check. Functionality tested later in stack.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will requested review of this revision.Mar 31 2024, 9:56 PM
atul added inline comments.
lib/ops/aux-user-store-ops.js
12 ↗(On Diff #38619)

Same feedback as in other stack, I think we typically exclude the entity type in the operation.type and do eg replace, remove, remove_all, etc.

46–52 ↗(On Diff #38619)

Can we define type outside so this is more readable.

Also, wouldn't the following be equivalent:

function convertAuxUserInfoToClientDBAuxUserInfo({
  +id: string,
  +auxUserInfo: AuxUserInfo,
}): ClientDBAuxUserInfo {

and avoid need to define type altogether?

This revision is now accepted and ready to land.Apr 1 2024, 1:33 PM
lib/ops/aux-user-store-ops.js
46–52 ↗(On Diff #38619)

I don't think the second one counts as valid Flow syntax but I could be wrong

lib/ops/aux-user-store-ops.js
46–52 ↗(On Diff #38619)

Looks like the Flow team is working on improving the duplication necessary if you use object destructuring (the reason Atul's syntax doesn't work, I think): https://medium.com/flow-type/announcing-component-syntax-b6c5285660d0

lib/ops/aux-user-store-ops.js
12 ↗(On Diff #38619)

Already spoke with Atul about this. We'll be including the entity for now as we currently do that with other operation types as well

46–52 ↗(On Diff #38619)

yeah. Unfortunately tried doing Atul's recommended syntax and flow check fails.

This revision was automatically updated to reflect the committed changes.