seas-computing / mark-one

A UI component library for building React Apps (in development)
https://seas-computing.github.io/mark-one/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Update table components #59

Closed jonseitz closed 4 years ago

jonseitz commented 4 years ago

This PR is making a number of tweaks to our table components to accommodate the beast that is the Course Instance table. It adds two new components (a HeadingSpacer and RowHeader), updates some of the typings to allow for col and colgroup elements and multiple TableRow elements inside a header, and makes some general styling tweaks to get us as close as possible to Vittorio's prototype. I believe I've managed to do this while maintaining full backwards-compatibility, so there shouldn't be any breaking changes in the other course-planner tables that already exist.

codecov[bot] commented 4 years ago

Codecov Report

Merging #59 into develop will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop       #59   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines          373       358   -15     
  Branches        37        40    +3     
=========================================
- Hits           373       358   -15     
Impacted Files Coverage Δ
src/Tables/Table.tsx 100.00% <100.00%> (ø)
src/Tables/TableBody.tsx 100.00% <100.00%> (ø)
src/Tables/TableCell.tsx 100.00% <100.00%> (ø)
src/Tables/TableHead.tsx 100.00% <100.00%> (ø)
src/Tables/TableHeadingCell.tsx 100.00% <100.00%> (ø)
src/Tables/TableRow.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1e80ed0...e737d6d. Read the comment docs.

jonseitz commented 4 years ago

Ah, thanks for pointing that out about the ForwardRefExoticComponent thing in the styleguide. I found a workaround for that and implemented it in 4f9cdfe. I then went down a long dark rabbit hole of Typescripting, which resulted in a few more commits that resolved a few other underlying issues.

rmainwork commented 4 years ago

Yeah, this looks great! I would also note that there doesn't appear to be any documentation for TableBody, TableCell etc. I assume that's because they're kind of difficult to document on their own