Page MenuHomePhabricator

[lib] Add reducer and action to store established holder
ClosedPublic

Authored by bartek on Sep 20 2024, 3:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 2:47 PM
Unknown Object (File)
Mon, Nov 25, 4:30 AM
Unknown Object (File)
Mon, Nov 25, 1:37 AM
Unknown Object (File)
Sun, Nov 24, 4:59 PM
Unknown Object (File)
Fri, Nov 22, 9:23 AM
Unknown Object (File)
Wed, Nov 20, 10:35 AM
Unknown Object (File)
Wed, Nov 20, 10:35 AM
Unknown Object (File)
Wed, Nov 20, 10:35 AM
Subscribers

Details

Summary

First action from ENG-9285. Addresses ENG-9286.

Added reducer for holders and action to store already-established holder in the store.
We use it in the blob service upload hook, to store the initial holder, which previously was forgotten

Inspired by D12949

Depends on D13401, D13402

Test Plan
  • Reducer unit test
  • Uploaded multimedia to a DM thread and used Redux Devtools to ensure the action was performed correctly

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Sep 20 2024, 4:20 AM
lib/actions/upload-actions.js
155–158 ↗(On Diff #44361)

Why isn't this type read-only?

kamil added inline comments.
lib/reducers/holder-reducer.js
17 ↗(On Diff #44361)

Is it possible to have this holder in store already?

lib/reducers/holder-reducer.test.js
23 ↗(On Diff #44361)

nice

This revision is now accepted and ready to land.Sep 20 2024, 6:08 AM
lib/actions/upload-actions.js
155–158 ↗(On Diff #44361)

Not sure, but making readonly didn't break Flow so I guess we can do it.

lib/reducers/holder-reducer.js
17 ↗(On Diff #44361)

In theory, it could but in current implementation not really