Commit d333cf5
authored
Data Table: refactor data table to use divs instead of html table (#6397)
## 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.
<img width="731" alt="Screenshot 2023-05-18 at 4 41 01 PM"
src="https://github.com/tensorflow/tensorboard/assets/8672809/4e7eadc2-18c7-4320-919e-9d30573d72a5">
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.1 parent a0865d9 commit d333cf5
File tree
3 files changed
+117
-98
lines changed- tensorboard/webapp/widgets/data_table
3 files changed
+117
-98
lines changedLines changed: 59 additions & 66 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
80 | 73 | | |
81 | | - | |
82 | | - | |
| 74 | + | |
| 75 | + | |
83 | 76 | | |
84 | 77 | | |
85 | 78 | | |
| |||
Lines changed: 27 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
29 | 39 | | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| |||
36 | 47 | | |
37 | 48 | | |
38 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
39 | 57 | | |
40 | 58 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 59 | + | |
| 60 | + | |
44 | 61 | | |
45 | 62 | | |
46 | 63 | | |
47 | 64 | | |
48 | 65 | | |
49 | 66 | | |
50 | 67 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 68 | | |
56 | 69 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
71 | 83 | | |
72 | 84 | | |
73 | 85 | | |
| |||
89 | 101 | | |
90 | 102 | | |
91 | 103 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| |||
Lines changed: 31 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
261 | | - | |
| 263 | + | |
262 | 264 | | |
263 | 265 | | |
264 | 266 | | |
| |||
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
324 | | - | |
325 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
326 | 330 | | |
327 | 331 | | |
328 | 332 | | |
| |||
366 | 370 | | |
367 | 371 | | |
368 | 372 | | |
369 | | - | |
| 373 | + | |
370 | 374 | | |
371 | 375 | | |
372 | 376 | | |
| |||
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
409 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
410 | 416 | | |
411 | 417 | | |
412 | 418 | | |
| |||
451 | 457 | | |
452 | 458 | | |
453 | 459 | | |
454 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
455 | 463 | | |
456 | 464 | | |
457 | 465 | | |
| |||
490 | 498 | | |
491 | 499 | | |
492 | 500 | | |
493 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
494 | 504 | | |
495 | 505 | | |
496 | 506 | | |
| |||
553 | 563 | | |
554 | 564 | | |
555 | 565 | | |
556 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
557 | 569 | | |
558 | 570 | | |
559 | 571 | | |
| |||
616 | 628 | | |
617 | 629 | | |
618 | 630 | | |
619 | | - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
620 | 634 | | |
621 | 635 | | |
622 | 636 | | |
| |||
684 | 698 | | |
685 | 699 | | |
686 | 700 | | |
687 | | - | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
688 | 704 | | |
689 | 705 | | |
690 | 706 | | |
| |||
763 | 779 | | |
764 | 780 | | |
765 | 781 | | |
766 | | - | |
767 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
768 | 786 | | |
769 | 787 | | |
770 | 788 | | |
| |||
0 commit comments