Purpose of the refactor is to not change the logic of the components, but rather to split up the hierarchy of the Log page into multiple components. The log page had too many responsibility and was prone to regression bugs. This change does not necessarily remove the chance of regression bugs, as I have not really changed the logic, but rather enables us to test each component with each of their responsibilities in isolated tests. That will hopefully improve reliability.
Additional benefit is that we will have a clearer boundary of responsibilities and as the code is split, thus each component has less code, we can have another refactor iteration for each component to look for improvements.
Todo
[x] Split Collection Log page into components
[x] Unit test - Item
[x] Unit test - Items
[ ] Unit test - Page List
[ ] Unit test - Tab
[ ] Unit test - Header
[ ] Unit test - Collection Log Page
Note: I will only unit tests happy paths for now and in the future I will see if I can break components, guard against it and write tests for it.
Diagram
Made a component diagram to showcase how the hierarchy is now with this PR:
Purpose of the refactor is to not change the logic of the components, but rather to split up the hierarchy of the Log page into multiple components. The log page had too many responsibility and was prone to regression bugs. This change does not necessarily remove the chance of regression bugs, as I have not really changed the logic, but rather enables us to test each component with each of their responsibilities in isolated tests. That will hopefully improve reliability.
Additional benefit is that we will have a clearer boundary of responsibilities and as the code is split, thus each component has less code, we can have another refactor iteration for each component to look for improvements.
Todo
Note: I will only unit tests happy paths for now and in the future I will see if I can break components, guard against it and write tests for it.
Diagram
Made a component diagram to showcase how the hierarchy is now with this PR: