klaw icon indicating copy to clipboard operation
klaw copied to clipboard

refactoring(coral): Unify Table container views

Open roope-kar opened this issue 1 year ago • 1 comments

What is currently missing?

We repeat a lot of code between the different table container views:

Approve topic requests Approve schema requests Approve connector requests My topic requests My schema requests My connector requests

This includes the boilerplate of setting up the queries, parameters, opening / closing the modals, filters ...

The test files for each of these look very similar and test very much the same logic, for example pagination, filters, can delete, can view details ...

The main discrepancy between the views seems to be the displayed columns and the query endpoints.

How could this be improved?

Investigate if it would be feasible to create a component that would reduce this boilerplate into a reusable shape which could then be used for these views and implement a solution.

In the end each view would only need to test the unique behavior to the corresponding Table component. For example, the expected columns for that Table and not for example the pagination controls.

We should be able to express through props the difference between these views.

Is this a feature you would work on yourself?

Possibly, but i don't have any better insight than what's described yet.

  • [ ] I plan to open a pull request for this feature

roope-kar avatar Mar 28 '23 09:03 roope-kar

The actions that can be performed in the different tables is also a thing that differs, and consequently the modals / flows a bit. But I definitely agree that it would be valuable to find a way to duplicate less!

programmiri avatar Mar 28 '23 11:03 programmiri