Skip to content

Conversation

@JamesHollyer
Copy link
Contributor

@JamesHollyer JamesHollyer commented May 18, 2023

Motivation for features / changes

This probably should have been done when the data table was created. html table is generally considered old technology. Building tables with divs is preferred as it allows for more flexibility.

Technical description of changes

Pretty straight forward swap to using display table, table-row, table-column instead of table, tr, td. For the header we use a <header> to wrap it and still use the .col. Because of this header specific logic for .col was moved inside the header object.

I also had to mess around with the row-circle class to get the color circle to align properly because the display is now table-cell instead of flex.

Screenshots of UI changes (or N/A)

New table looks like this.
Screenshot 2023-05-18 at 4 41 01 PM

The only change is that the circle icon moves ever so slightly(to see the difference more clearly googlers can check the screenshot diffs here cl/529831620).

Detailed steps to verify changes work correctly (as executed by you)

A couple CSS queries changes and all the tests pass. I also clicked around and tested functionality in local instance.

Alternate designs / implementations considered (or N/A)

Considered leaving it as is.

width: 100%;

th {
header,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would prefer you put a class on the header element and then styled that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I also changed this to just be a div.

Copy link
Contributor

@rileyajones rileyajones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the visual diff tests seem to pass LGTM

@JamesHollyer JamesHollyer merged commit d333cf5 into tensorflow:master May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants