Closed ricardovdheijden closed 2 weeks ago
My report/Proposal
In general the functionality in the listing pages that use tables like the metadata pages or the tasklist page is divided between a Wfo
Wfo<Name>Page >> TableLoader >> Table component
Where the page configuries what data to load and what columns to show. This is passed of to the DataLoader which does the actual calling and maintains state like pagination and filtering. The TableLoader could be generalized so it could be reuseable for all pages. This way a lot of functionality could be deduplicated. I have put some example code in the branch 676-refactor-tables
Considerations All in all I'm not very convinced the refactoring will be worth it. It will move some complexity but not necessarily reduce it. We will have a easier and lighter Page component but the TableLoader will be another moving part. Let's discuss.
Won't fix now, leave till suitable opportunity
All pages with a FilterableTable have strong similarities:
Try to move reusable parts to hooks