redpanda-data / redpanda-data/console

Move dialog onConfirm handlers into modals that concern them

Open
#1,321 0 comments 0 reactions 1 assignee View on GitHub

@rikimaru0345 is already working on this.

Since Jul 9, 2024.

frontend low-priority
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

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.