Abstract diff_table_cell component to reduce component count in each diff row
Summary
In the effort of lowering number of components and DOM nodes, we'll be looking into abstracting diff_table_cell.vue
to reduce component nesting and unnecessary complexities.
Some loose thoughts:
- Maybe functional template.
- Move certain calculations to the line itself
- isContextLine
- isMetaLine
- ...
![](/-/project/278964/uploads/74968692e56039ab4b32085c1d64db38/Screenshot_2020-08-13_at_19.50.22.png)
Improvements
Risks
Involved components
app/assets/javascripts/diffs/components/diff_table_cell.vue
- potentially, wrapping components too:
-
app/assets/javascripts/diffs/components/inline_diff_table_row.vue
(parent) -
app/assets/javascripts/diffs/components/parallel_diff_table_row.vue
(parent)
-
Optional: Intended side effects
Optional: Missing test coverage
Edited by André Luís