Page MenuHomePhabricator

[lib] client side logic for handling policy acknowledgment
ClosedPublic

Authored by kamil on Dec 6 2022, 6:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 8:30 PM
Unknown Object (File)
Sun, Dec 15, 8:30 PM
Unknown Object (File)
Sun, Dec 15, 8:30 PM
Unknown Object (File)
Sun, Dec 15, 8:30 PM
Unknown Object (File)
Sun, Dec 15, 8:29 PM
Unknown Object (File)
Sun, Dec 15, 8:20 PM
Unknown Object (File)
Fri, Nov 29, 12:09 AM
Unknown Object (File)
Nov 6 2024, 6:21 AM
Subscribers

Details

Summary

Adding a redux store in which will be stored data about user's policies, and action which will be dispatched on acknowledgment.

Context in ENG-2363.

There is a minor thing with this approach, there is possibility to dispatch the action multiple times, more in ENG-2431.

Test Plan

Connect to keyserver from account without accepted policies and check if action was properly dispatched after interaction with keyserver on both mobile/web.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Dec 6 2022, 6:55 AM
tomek requested changes to this revision.Dec 8 2022, 8:22 AM
tomek added inline comments.
lib/actions/user-actions.js
235–237 ↗(On Diff #19179)

Shouldn't we return a result from this function?

lib/reducers/policies-reducer.js
5–6 ↗(On Diff #19179)

We can merge these

lib/types/policy-types.js
5–24 ↗(On Diff #19179)

Shouldn't all of these be readonly?

lib/types/redux-types.js
52–56 ↗(On Diff #19179)

We can merge these

This revision now requires changes to proceed.Dec 8 2022, 8:22 AM

merge imports, make fields read-only

lib/actions/user-actions.js
235–237 ↗(On Diff #19179)

keyserver returns void, so we do not return here anything but to update policy in redux we use a value from this part of code: D5828 - which is returning after successful call to keyserver

tomek added inline comments.
lib/types/policy-types.js
15 ↗(On Diff #19314)
This revision is now accepted and ready to land.Dec 13 2022, 6:02 AM