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, Dec 21, 11:14 AM
Unknown Object (File)
Fri, Dec 20, 3:35 PM
Unknown Object (File)
Tue, Dec 10, 7:29 AM
Unknown Object (File)
Mon, Dec 9, 8:16 AM
Unknown Object (File)
Nov 15 2024, 1:02 AM
Unknown Object (File)
Nov 14 2024, 11:48 PM
Unknown Object (File)
Nov 7 2024, 3:50 AM
Unknown Object (File)
Oct 28 2024, 12:15 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
No Lint Coverage
Unit
No Test Coverage

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

Try this:

const { [action.payload.keyserverAdminUserID]: _, ...rest } = state.keyserverInfos;
return { ...state, keyserverInfos: rest };
55–70

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.