MetaMask / MetaMask/metamask-extension
Refactor Settings page to use template system
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
If the following are true
1. Settings are *usually* toggles, dropdowns, textfields, etc
2. We need a JSON object structure to power search capabilities #13214
3. That JSON structure is relied upon in many places to make sure search capabilities work
4. Adding a new setting in code requires touching many different files now to keep search working
5. The current way of scrolling a section into view by registering refs with sections could potentially lead to memory leaks or at least make memory leaks harder to diagnose
6. Settings page is among some of the oldest CSS currently maintained
It makes sense to me to refactor the settings page to use the template system such that a single JSON tree can be used to both render search and the settings under it. We could greatly reduce complexity of the current implementation as well as make adding new settings relatively painless. We would need to make sure that the settings page has UI components for things like toggles, textfields, etc, but this would make updating the look and feel of the settings page profoundly easier in the future.
I would say that we would simply have the contacts/address book and network tabs as exceptions to this rule given that they do not follow the pattern of being predominately individual toggles/fields
Contributor guide
Research direction
No files, tests, or entry points are named. First trace the existing Settings page, its JSON structure for search, and the template system, then identify how the contacts/address book and network tabs are separated. Done means one JSON tree powers rendering and search for the settings while preserving those exceptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100