MetaMask / MetaMask/metamask-extension
Refactor gas components to stateless components that can live in `components/ui/`
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
Motivated by the use of `AdvancedGasInputs` in `swaps-gas-customization-modal/swaps-gas-customization-modal.component.js`
> We really shouldn't be using sub-components of other components.
> Ideally what I'd like to see is for us to have a collection of gas-related components (inputs, gas buttons, the chart, the summary details at the bottom, etc.) that we can mix-and-match as the situation demands, and to have them all be pure-UI with no Redux state, in a directory under ui/. With a Storybook file as well. Then we wouldn't have this use of internal components.
Above quotes from @Gudahtt's comment here: https://github.com/MetaMask/metamask-extension/pull/9599#discussion_r511190192
Contributor guide
Research direction
Start by reading swaps-gas-customization-modal/swaps-gas-customization-modal.component.js and identify the gas inputs, buttons, chart, and summary details it uses. Review the existing gas components, then define the work as complete when the gas pieces are reusable pure-UI components under components/ui/, have a Storybook file, and the modal no longer uses another component's internal components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, redux, storybook
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100