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)
Apr 12 2024, 11:40 AM
Unknown Object (File)
Apr 12 2024, 11:18 AM
Unknown Object (File)
Apr 11 2024, 4:58 PM
Unknown Object (File)
Apr 10 2024, 2:11 AM
Unknown Object (File)
Apr 8 2024, 6:19 AM
Unknown Object (File)
Apr 7 2024, 6:49 PM
Unknown Object (File)
Apr 7 2024, 3:26 PM
Unknown Object (File)
Apr 6 2024, 5:58 PM
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.