-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix(table): update tokens and add E2E themed tests #9646
Changes from all commits
c1e7945
3a98a0b
a75d013
95f1508
6baa79d
c4a3813
a816869
3053343
2300f14
787a552
9341dff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,9 @@ | |
* | ||
* @prop --calcite-table-row-background: [Deprecated] Use `--calcite-table-row-background-color` instead. Specifies the background color of the component. | ||
* @prop --calcite-table-row-background-color: Specifies the background color of the component. | ||
* @prop --calcite-table-row-background-color-striped: The background color of the component's `striped` rows, when specified. | ||
* @prop --calcite-table-row-secondary-background-color: The background color of the component's `striped` rows, when specified. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I discussed this token name change with Skye and Aaron. The use of the "secondary" group here aligns better with our naming schema. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm. This seems unexpected to me. The name corresponds directly to the property that causes it to display. We don’t really use secondary elsewhere. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. “striped-background-color”? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. primary / secondary is a common naming pattern for design system colors and one I think we'll be expanding on in the future. "striped" is very specific to table. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I guess that's my take - it is specific to table. To this point we've been intentional to not use primary / secondary / tertiary, so teams can build their own meaning through our properties. I think that's a fine direction to head in if we choose to in the future, but beginning to add it in now seems strange - this css property can only be used when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does "--calcite-table-row-striped-secondary-background-color" work? That way at least there is some indication to a user it pertains and will only be visible when the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would agree with this. If the default row color is "--calcite-table-row-background-color", then I would expect the striped prop to correlate to a "--calcite-table-row-striped-background-color" css property. I don't think the word "secondary" is necessary especially since there is no need for a "--calcite-table-row-primary-background-color" for it to correlate to. |
||
* @prop --calcite-table-row-background-color-selected: The background color of the component's `selected` rows, when specified. | ||
* @prop --calcite-table-row-border-color: Specifies the border color of the component. | ||
* @prop --calcite-table-row-selected-accent-color: Specifies the border color of the component. | ||
alisonailea marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
*/ | ||
|
||
:host { | ||
|
@@ -24,25 +22,52 @@ | |
} | ||
} | ||
|
||
calcite-table-cell { | ||
--calcite-internal-table-cell-background-color: var( | ||
--calcite-table-row-background-color, | ||
tr { | ||
--calcite-internal-table-row-default-background-color: var( | ||
--calcite-table-row-background, | ||
var(--calcite-color-foreground-1) | ||
); | ||
|
||
border-block-end: 1px solid | ||
var(--calcite-table-row-border-color, var(--calcite-internal-table-row-border-color, transparent)); | ||
background-color: var( | ||
--calcite-table-row-background-color, | ||
var(--calcite-internal-table-row-default-background-color) | ||
); | ||
} | ||
|
||
tr.last-visible-row { | ||
border-block-end: 0; | ||
} | ||
|
||
:host([selected]) calcite-table-cell { | ||
--calcite-internal-table-cell-background-color: var( | ||
:host([selected]) tr { | ||
background-color: var( | ||
--calcite-table-row-background-color-selected, | ||
var(--calcite-color-foreground-1) | ||
var(--calcite-table-row-background-color, var(--calcite-internal-table-row-default-background-color)) | ||
); | ||
} | ||
|
||
tr { | ||
border-block-end: 1px solid var(--calcite-table-row-border-color, transparent); | ||
background-color: var(--calcite-table-row-background-color, var(--calcite-color-foreground-1)); | ||
} | ||
:host(:nth-child(2n + 1)) { | ||
&:host([selected]) tr { | ||
background-color: var( | ||
--calcite-table-row-background-color-selected, | ||
var( | ||
--calcite-table-row-secondary-background-color, | ||
var( | ||
--calcite-internal-table-secondary-background-color, | ||
var(--calcite-table-row-background-color, var(--calcite-internal-table-row-default-background-color)) | ||
) | ||
) | ||
); | ||
} | ||
|
||
tr.last-visible-row { | ||
border-block-end: 0; | ||
tr { | ||
background-color: var( | ||
--calcite-table-row-secondary-background-color, | ||
var( | ||
--calcite-internal-table-secondary-background-color, | ||
var(--calcite-table-row-background-color, var(--calcite-internal-table-row-default-background-color)) | ||
) | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't address my issue with this naming change - this is really a row-specific visual display and I think we should keep that nomenclature. I still think it should use table-row terminology, and that "--calcite-table-row-selected-accent-color" is a more apt name. "selected-highlight, "selected-indicator") all work for me, as long as its scoped to the row.