Commit f714012
authored
[IndexTable] Add sort toggle labels and fix z-index icon issue (#7360)
### WHY are these changes introduced?
Fixes Shopify/web#74406
Fixes Shopify/web#74393
This PR fixes a couple of bugs in the IndexTable when the table is
sortable and adds the ability to have Tooltips showing the sort
direction label.
- Fixes a visual bug where if a table is sticky and sortable, the sticky
headings have a different color to the unsticky ones
- Fixes a visual bug where the sort icon would display above the sticky
heading cells
- Adds functionality to display the label of the sort direction in a
Tooltip when hovering over the index table heading.
https://user-images.githubusercontent.com/2562596/194280147-f553b94e-6f91-411c-9914-87bb96c35103.mov
### 🎩 checklist
- [x] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [x] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [x] Updated the component's `README.md` with documentation changes
- [x] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide1 parent 5d0a18f commit f714012
File tree
5 files changed
+168
-21
lines changed- .changeset
- polaris-react/src/components/IndexTable
- tests
5 files changed
+168
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
220 | | - | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| |||
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
244 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
245 | 256 | | |
246 | 257 | | |
247 | 258 | | |
| |||
390 | 401 | | |
391 | 402 | | |
392 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
393 | 410 | | |
394 | 411 | | |
395 | 412 | | |
| |||
Lines changed: 52 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1351 | 1351 | | |
1352 | 1352 | | |
1353 | 1353 | | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
1354 | 1365 | | |
1355 | 1366 | | |
1356 | 1367 | | |
1357 | 1368 | | |
1358 | 1369 | | |
| 1370 | + | |
1359 | 1371 | | |
1360 | 1372 | | |
1361 | 1373 | | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
1362 | 1377 | | |
1363 | 1378 | | |
1364 | 1379 | | |
1365 | 1380 | | |
| 1381 | + | |
1366 | 1382 | | |
1367 | 1383 | | |
1368 | 1384 | | |
1369 | 1385 | | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
1370 | 1389 | | |
1371 | 1390 | | |
1372 | 1391 | | |
1373 | 1392 | | |
| 1393 | + | |
1374 | 1394 | | |
1375 | 1395 | | |
1376 | 1396 | | |
1377 | 1397 | | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
1378 | 1401 | | |
1379 | 1402 | | |
1380 | 1403 | | |
1381 | 1404 | | |
| 1405 | + | |
1382 | 1406 | | |
1383 | 1407 | | |
1384 | 1408 | | |
1385 | 1409 | | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
1386 | 1413 | | |
1387 | 1414 | | |
1388 | 1415 | | |
| |||
1420 | 1447 | | |
1421 | 1448 | | |
1422 | 1449 | | |
1423 | | - | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
1424 | 1464 | | |
1425 | 1465 | | |
1426 | 1466 | | |
| |||
1430 | 1470 | | |
1431 | 1471 | | |
1432 | 1472 | | |
| 1473 | + | |
1433 | 1474 | | |
1434 | 1475 | | |
1435 | 1476 | | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1436 | 1480 | | |
1437 | 1481 | | |
1438 | 1482 | | |
| |||
1448 | 1492 | | |
1449 | 1493 | | |
1450 | 1494 | | |
| 1495 | + | |
1451 | 1496 | | |
1452 | 1497 | | |
1453 | 1498 | | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
1454 | 1502 | | |
1455 | | - | |
| 1503 | + | |
1456 | 1504 | | |
1457 | 1505 | | |
1458 | 1506 | | |
| 1507 | + | |
| 1508 | + | |
1459 | 1509 | | |
1460 | 1510 | | |
1461 | 1511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
| |||
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
88 | 99 | | |
89 | 100 | | |
90 | 101 | | |
| |||
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
| 123 | + | |
112 | 124 | | |
113 | 125 | | |
114 | 126 | | |
| |||
655 | 667 | | |
656 | 668 | | |
657 | 669 | | |
| 670 | + | |
| 671 | + | |
658 | 672 | | |
659 | 673 | | |
660 | 674 | | |
661 | 675 | | |
662 | 676 | | |
663 | 677 | | |
664 | 678 | | |
| 679 | + | |
665 | 680 | | |
666 | 681 | | |
667 | 682 | | |
| |||
830 | 845 | | |
831 | 846 | | |
832 | 847 | | |
833 | | - | |
| 848 | + | |
834 | 849 | | |
835 | 850 | | |
836 | 851 | | |
837 | 852 | | |
838 | 853 | | |
839 | | - | |
| 854 | + | |
840 | 855 | | |
841 | 856 | | |
842 | 857 | | |
843 | 858 | | |
844 | 859 | | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | 860 | | |
851 | 861 | | |
852 | 862 | | |
853 | 863 | | |
854 | 864 | | |
855 | 865 | | |
856 | 866 | | |
857 | | - | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
858 | 872 | | |
859 | 873 | | |
860 | 874 | | |
861 | | - | |
| 875 | + | |
862 | 876 | | |
863 | 877 | | |
864 | 878 | | |
| |||
868 | 882 | | |
869 | 883 | | |
870 | 884 | | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
871 | 897 | | |
872 | 898 | | |
873 | 899 | | |
| |||
0 commit comments