redpanda-data / redpanda-data/console
Move dialog onConfirm handlers into modals that concern them
@rikimaru0345 is already working on this.
Since Jul 9, 2024.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 432
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 40
Description
We have lots of modals that deal with (for example) deletion of resources.
These modals take an onConfirm handler, that deals with the aftermath (refreshing the resource list, showing toasts etc).
It doesn't really make sense that those would be in an extra callback, they can be inlined to the modal,
as the modals themselves are already specialized to the resource that is being modified/deleted.
That would reduce the amount of code whenever a modal is used, and prevent code duplication (the handling is the same, no matter where the call comes from anyway).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.