Page MenuHomePhabricator

[lib] introduce removeKeyserverActionType condition to keyserver reducer
ClosedPublic

Authored by ginsu on Nov 10 2023, 11:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 28, 3:19 AM
Unknown Object (File)
Mon, Sep 23, 12:47 PM
Unknown Object (File)
Sat, Sep 7, 7:02 AM
Unknown Object (File)
Sat, Sep 7, 7:02 AM
Unknown Object (File)
Sat, Sep 7, 7:02 AM
Unknown Object (File)
Sat, Sep 7, 7:02 AM
Unknown Object (File)
Sat, Sep 7, 7:02 AM
Unknown Object (File)
Sat, Sep 7, 6:57 AM

Details

Summary

This diff adds the condition for removing a keyserver from the keyserver store. I am aware that at this time @inka currently has D9750 and D9820 up which refactor this reducer, and this diff might cause some merge conflicts. @inka and I have been communicating throughout this process and I will make @inka a blocking reviewer for this as well.

Linear task: https://linear.app/comm/issue/ENG-5465/introduce-remove-keyserver-action-case-to-reducekeyserver-function

Depends D9828

Test Plan

Confirmed that I was able to remove a keyserver from the keyserver store

Screenshot 2023-11-13 at 4.19.22 PM.png (1×1 px, 575 KB)

Screenshot 2023-11-13 at 4.18.52 PM.png (1×1 px, 573 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu retitled this revision from [lib] introduce removeKeyserverActionType condition to keyserver reducer to DRAFT [lib] introduce removeKeyserverActionType condition to keyserver reducer.Nov 10 2023, 12:01 PM
ginsu edited the summary of this revision. (Show Details)
ginsu added reviewers: inka, michal, rohan.
ginsu edited the summary of this revision. (Show Details)
ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: rohan, michal. ginsu added 1 blocking reviewer(s): inka.
ginsu retitled this revision from DRAFT [lib] introduce removeKeyserverActionType condition to keyserver reducer to [lib] introduce removeKeyserverActionType condition to keyserver reducer.
lib/reducers/keyserver-reducer.js
55–70 ↗(On Diff #33148)

Try this:

const { [action.payload.keyserverAdminUserID]: _, ...rest } = state.keyserverInfos;
return { ...state, keyserverInfos: rest };
55–70 ↗(On Diff #33148)

Actually make sure to [(action.payload.keyserverAdminUserID: string)]... new version of Flow feels strongly about that typehint

Please address @ashoat's comments before landing. Otherwise looks good!

This revision is now accepted and ready to land.Nov 13 2023, 11:44 PM

address comments + rebase before landing

This revision was landed with ongoing or failed builds.Nov 14 2023, 5:49 PM
This revision was automatically updated to reflect the committed changes.