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)
Thu, Feb 6, 10:39 AM
Unknown Object (File)
Thu, Feb 6, 5:25 AM
Unknown Object (File)
Thu, Feb 6, 3:57 AM
Unknown Object (File)
Thu, Feb 6, 3:57 AM
Unknown Object (File)
Thu, Feb 6, 3:57 AM
Unknown Object (File)
Mon, Jan 20, 4:54 PM
Unknown Object (File)
Jan 10 2025, 4:34 PM
Unknown Object (File)
Jan 6 2025, 9:44 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
Lint Not Applicable
Unit
Tests Not Applicable

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