oxidecomputer / oxidecomputer/console

Refactor `Modal.Footer` into compositional API

Open
#1,751 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tools
Dominant language
TypeScript
Stars
228
Forks
22
Avg merge
19h 42m
Merged PRs (30d)
32

Description

Adding even more props here to pass through to the children is a clear sign this should be refactored into a compositional API.

Originally posted by @david-crespo in https://github.com/oxidecomputer/console/pull/1750#discussion_r1316321572


This is getting to be too many props.

https://github.com/oxidecomputer/console/blob/2b3d519d53565d639681b825f29b4b8a4ef65c60/libs/ui/lib/modal/Modal.tsx#L115-L151

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in libs/ui/lib/modal/Modal.tsx, especially lines 115-151, and inspect how Modal.Footer currently passes props to its children. Define the compositional API from the existing usage and discussion; done means Modal.Footer no longer needs the growing set of child pass-through props.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.