Skip to content

feat(table): migrates remaining table styles to s2 part2 #3818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/hip-shoes-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spectrum-css/tokens": patch
---

Adds `--spectrum-table-selected-row-background-color-rgb` to `light-vars.css` and `dark-vars.css` for custom tokens.
2 changes: 1 addition & 1 deletion .changeset/petite-toys-greet.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ In Storybook, several new stories have been added to the docs page and the testi
- `--mod-table-row-bottom-to-text--spacious`
- `--mod-table-row-top-to-text--compact`
- `--mod-table-row-top-to-text--spacious`
- `--mod-table-thumbnail-block-spacing"`
- `--mod-table-thumbnail-block-spacing`
- `--mod-table-thumbnail-block-spacing-compact`
- `--mod-table-thumbnail-block-spacing-spacious`
42 changes: 42 additions & 0 deletions .changeset/real-jobs-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
"@spectrum-css/table": minor
---

### S2 table migration (continued)

#### Net-new features

- New sparkline SVGs available for cell content

#### Description of other S2 table work

A new `.spectrum-Table-headCell--alignEnd` class was created to correspond to tables that may have end-aligned numerical data so the head cell follows the text alignment correctly.

Semantically, if a table should enable column sorting, the content of a column's head cell should actually be a button, since it is triggering an action. If the column header cell could trigger a menu, the content of that cell should also be a button. New markup has been included to improve the semantic design of the content of header cells, utilizing button components to signify an action can be triggered, or a menu can be triggered.

In Storybook, new stories have been added to the docs page and the testing grid for Chromatic. These stories include `WithMenuButton`, `WithChartContent`. Documentation has been added for each of these stories, as well as expanded in other stories.

#### Mods

##### Renamed Modifiers

| Old Modifier | New modifier |
| ------------------------------ | ----------------------------------------- |
| `--mod-table-row-active-color` | `--mod-table-row-background-color-active` |

##### New Modifiers

- `--mod-table-header-font-style`
- `--mod-table-header-icons-color-active`
- `--mod-table-header-icons-color-default`
- `--mod-table-header-icons-color-hover`
- `--mod-table-header-icons-color-key-focus`
- `--mod-table-row-font-family`
- `--mod-table-row-font-style`
- `--mod-table-row-text-color-active`
- `--mod-table-row-text-color-hover`

##### Removed Modifiers

- `--mod-table-header-background-color-quiet`
- `--mod-table-row-background-color-quiet`
17 changes: 17 additions & 0 deletions .storybook/assets/images/sparkline-informative.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions .storybook/assets/images/sparkline-negative.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions .storybook/assets/images/sparkline-notice.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions .storybook/assets/images/sparkline-positive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading