Flagsmith / Flagsmith/flagsmith

Refactor and migrate AdminAPIKeys to TypeScript

Open
#8,173 0 comments 0 reactions 1 assignee Claimed by @talissoncosta View on GitHub
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 13h
Merged PRs (30d)
121

Description

Part of #5002. `web/components/AdminAPIKeys.js` is 565 lines holding two `PureComponent` classes, with `static propTypes = {}`, so nothing states what either component expects.

Blocked on #8172, so the E2E suite can be run after review rather than trusting the diff.

Split into PRs: drop the `AccountStore` dependency (#8175, ready, and needs no test net because it substitutes a value the component already receives); split `CreateAPIKey` and `AdminAPIKeys` into their own folders; migrate to TypeScript, which is smaller than it looks since there are no `data.*` calls and it already goes through RTK services; then optionally classes to functions with hooks, which is the piece that most wants the E2E net.

Found while looking: the edit path was not passing `organisationId`, so it leaned on the global store, which left `MyRoleSelect` with no organisation when editing a key. Fixed in #8175.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.