You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/03/09 19:50:50 UTC

[GitHub] [superset] nytai edited a comment on pull request #13422: test: TableCollection.tsx (Frontend) - Dividing into smaller components and creating tests

nytai edited a comment on pull request #13422:
URL: https://github.com/apache/superset/pull/13422#issuecomment-794362785


   Do others actually find this re-implementation more readable? Personally, when I think of a table I think of it in its entirety, rarely am I thinking about the header and body as 2 completely separate entities, and a header row separately from a header block. When making changes I like to be able to quickly spot the difference in treatment between a header row and a body row, as they are often related. Additionally, this component was mostly a presentational layer on top of `react-table` and there wasn't much logic beyond a mapping of the objects provided by `react-table` into html table markup. Looking at the updated code it looks like some sub components are held in react memo hooks which makes me think there is more complex logic involved in the subcomponents and updating is costly. While these changes likely made unit testing of the subcomponents easier, I can't say readability has improved or that complexity has reduced, from my perspective. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org