MetaMask / MetaMask/metamask-extension

Refactor gas components to stateless components that can live in `components/ui/`

Open
#9,714 0 comments 0 reactions 0 assignees View on GitHub
area-gas type-refactor
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.