feat: Add Copier Dashboard - #25
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## frontend-infrastructure #25 +/- ##
==========================================================
Coverage 100.00% 100.00%
==========================================================
Files 50 52 +2
Lines 3122 3296 +174
==========================================================
+ Hits 3122 3296 +174 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a7f1a08 to
3e96422
Compare
3e96422 to
b311d62
Compare
Janina Wibker (JaninaWibkerQC)
left a comment
There was a problem hiding this comment.
The amount of code that deals with error handling and fallbacks is sprinkled in everywhere instead of it being done in a few limited places and giving you confidence about types and especially truthyness of values.
Much of the code feels overly defensive as if the type system isn't doing its job.
I suspect that error handling placed in a few sensible locations could increase this confidence by quite a lot
Similarly the logic for applying filters and transforming data from one thing to another seems to spread everywhere.
Each and every component has multiple helper functions, does a few operations itself, and just overall deals with data transformations way too much.
This can likely be fixed by properly thinking about what types should be used where, creating a few really useful helper functions and then reusing them.
There are many places where I'd suggest splitting things out into seperate reusable components.
Many components seem to concern themselves with quite a lot of different things that you'd usually split up. You can also use react hooks to separate out stuff from the function body of a component
| const filters: DashboardFilter[] = [...selectedFilterColumns] | ||
| .filter((column) => filterColumns.includes(column)) | ||
| .map((column) => { | ||
| if (!valueFilterColumns.has(column)) { |
| return stored | ||
| } | ||
|
|
||
| export function restoreDashboardState( |
There was a problem hiding this comment.
This file and a few others contain an insane number of .map, .filter, new Map(), and new Set() calls.
I can't imagine that all of that is needed. I suspect with a good and thorough look you can remove about 1/2 of all this complexity
Co-authored-by: Janina Wibker <106881157+JaninaWibkerQC@users.noreply.github.com>
Co-authored-by: Janina Wibker <106881157+JaninaWibkerQC@users.noreply.github.com>
Changes
Depends on the frontend infrastructure PR #24.