Skip to content
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

Design token phase II - Integration across components #7180

Open
geospatialem opened this issue Jun 15, 2023 · 7 comments
Open

Design token phase II - Integration across components #7180

geospatialem opened this issue Jun 15, 2023 · 7 comments
Assignees
Labels
2 - in development Issues that are actively being worked on. Calcite (design) Issues logged by Calcite designers. design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. epic Large scale issues to be broken up into sub-issues and tracked via sprints and/or project. estimate - 13 Requires planning and input from team, consider smaller steps. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@geospatialem
Copy link
Member

geospatialem commented Jun 15, 2023

Description

Addresses the final, or second phase, of our design token integration from #6558.
Majority of the effort will be performed in June and July, targeted for early August for additional documentation and pages for the September main release.
cc @alisonailea @jcfranco

Acceptance Criteria

  1. All relevant components have been refactored to use CSS variables which match component design tokens.
    • Token Jam Session 01/12/2024
    • Design Tokens Standup
    • Tracking in Monday
  2. All relevant components have E2E tests to automate testing of token application. (remaining estimate 1-week)
  3. All relevant components have one been added to the custom theme Chromatic test page to visually confirm token application. (remaining estimate 1 day)
  4. All relevant components pass final QA (remaining estimate 5 days)
    • Design confirmation design-tokens are in alignment between Figma and Web platforms.
    • Engineering confirmation that tokens work does not cause breaking changes in Calcite-Components (remaining estimate > 1 day)
      • @DitwanP and @geospatialem to do manual check of all themed demos on a local instance in all major browsers to confirm tokens are applied correctly to the component.
    • Docs confirmation (remaining estimate > 1 day)
      • Each token as a CSS Custom Property/CSS Variable is listed in the relevant Calcite Component .scss file as a JSDocs @prop "token name": "description"
      • Each token listed in the component's JSDoc section is used in the component code.
      • Each token listed in the component's JSDoc section is listed in the e2e tests under "themed"
        • If a CSS Variable is deprecated, it should be noted in the JSDoc as @prop "token name": [Deprecated] Use "new token name" instead. "description"
      • Confirm any CSS Variables listed as deprecated are tested in E2E tests under a describe("deprecated", () => {}) section

Relevant Info

  • Component Token Developer Docs
  • For specific component issues, we can use the design-tokens label.
  • add your name and status next to component you're working on (start with high ❗ priority components)

Components

Example Use Case

/**
 * CSS Custom Properties
 *
 * These properties can be overridden using the component's tag as selector.
 *
 * @prop --calcite-my-component-background-color: Specifies the background color of the component.
 * @prop --calcite-el-color-background: [Deprecated] Use `--calcite-my-component-background-color` instead. Specifies the background color of the component.
 * @prop --calcite-my-component-icon-color: Specifies the color of the icon sub-component.
 */
div {
  background-color: var(--calcite-my-component-background-color, var(--calcite-el-color-background, var(--calcite-color-brand)));
}
// calcite-icon
.icon {
    --calcite-icon-color: var(--calcite-my-component-icon-color, var(--calcite-color-brand));
}
describe("theme", () => {
    describe("default", () => {
      themed(`calcite-my-component`, {
        "--calcite-my-component-background-color": {
          shadowSelector: `div`,
          targetProp: "backgroundColor",
        },
        "--calcite-my-component-icon-color": {
          shadowSelector: `.${CSS.icon}`,
          targetProp: "--calcite-icon-color",
        },
      });
    });
    describe("deprecated", () => {
      themed(`calcite-my-component`, {
        "--calcite-el-color-background": {
          shadowSelector: `div`,
          targetProp: "backgroundColor",
        },
      });
    });
});

Priority impact

impact - p2 - want for an upcoming milestone

Esri team

Calcite (design)

@geospatialem geospatialem added enhancement Issues tied to a new feature or request. p - high Issue should be addressed in the current milestone, impacts component or core functionality 0 - new New issues that need assignment. estimate - 13 Requires planning and input from team, consider smaller steps. labels Jun 15, 2023
@geospatialem geospatialem added this to the 2023 August Priorities milestone Jun 15, 2023
@geospatialem geospatialem added the epic Large scale issues to be broken up into sub-issues and tracked via sprints and/or project. label Jun 15, 2023
@github-actions github-actions bot added Calcite (design) Issues logged by Calcite designers. p3 - want for upcoming milestone labels Jun 15, 2023
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Jun 15, 2023
@geospatialem geospatialem added the design-tokens Issues requiring design tokens. label Jun 29, 2023
@geospatialem
Copy link
Member Author

A list of components we could use for exploring tokens to start estimations and next steps:

  • avatar
  • modal
  • shell-panel
  • tooltip

jcfranco added a commit that referenced this issue Aug 18, 2023
**Related Issue:** #7180

## Summary

This updates how `onToggleOpenCloseComponent` determines the duration
for the `openTransitionProp` to be more robust to work consistently
across browsers.

The previous approach relied on the computed `transition` property
having all associated transition values laid out per prop, which didn't
work in Safari since it won't include all values if shared.

This change should be covered by existing tests.

cc @Elijbet
@geospatialem
Copy link
Member Author

A related issue surfaced with the Maps SDK for JS team regarding a global font family variable, #7175. Should we consider the effort as part of the design token epic above? cc @alisonailea

Elijbet added a commit that referenced this issue Dec 30, 2024
**Related Issue:** #7180

## Summary
Adds the following subcomponent tokens (CSS props):

- `--calcite-block-border-color`
- `--calcite-block-header-background-color`
- `--calcite-block-header-background-color-hover`
- `--calcite-block-header-text-color`
- `--calcite-block-block-text-color`
- `--calcite-block-block-text-color-hover`
jcfranco pushed a commit that referenced this issue Jan 4, 2025
**Related Issue:** #7180

## Summary
Adds the following subcomponent tokens (CSS props):

- `--calcite-notice-background-color`
- `--calcite-notice-close-background-color-focus`
- `--calcite-notice-close-background-color-press`
- `--calcite-notice-close-text-color-hover`
- `--calcite-notice-close-text-color`
- `--calcite-notice-content-text-color`
geospatialem added a commit that referenced this issue Jan 6, 2025
**Related Issue:** #7180 

## Summary
Updates component token descriptions for `block` and `notice` in
alignment with our [documentation
standard](https://github.com/Esri/calcite-design-system/wiki/tokens-documentation#component-tokens).
aPreciado88 added a commit that referenced this issue Jan 7, 2025
**Related Issue:**
[#7180](#7180)

## Summary

Add `rating` component tokens.

`--calcite-rating-spacing`: Specifies the amount of left and right
margin spacing between each item.
`--calcite-rating-color-hover`: Specifies the component's item color
when hovered or selected.
`--calcite-rating-color`: Specifies the component's item color.
`--calcite-rating-average-color`: Specifies the component's item color
when average is set.
`--calcite-rating-average-text-color`: Specifies the component's average
text color.
`--calcite-rating-count-text-color`: Specifies the component's count
text color.

---------

Co-authored-by: Ali Stump <[email protected]>
anveshmekala added a commit that referenced this issue Jan 8, 2025
**Related Issue:** #7180 

## Summary

Add the following component-scoped CSS Variables to calcite-menu-item:

`--calcite-menu-item-accent-color`: Specifies the border color of the
component when `active`.
`--calcite-menu-item-accent-color-hover`: Specifies the border color of
the component when hovered.
` --calcite-menu-background-color`: Specifies the background color of
the component.
`--calcite-menu-item-sub-menu-border-color`: Specifies the border color
of sub-menu.
` --calcite-menu-item-sub-menu-corner-radius`: Specifies the border
radius of sub-menu.
`--calcite-menu-text-color`: Specifies the text color of the component.
aPreciado88 added a commit that referenced this issue Jan 10, 2025
**Related Issue:**
[#7180](#7180)

## Summary

Add `select` component tokens.

`--calcite-select-font-size`: Specifies the font size of
`calcite-option`s in the component.
`--calcite-select-text-weight`: Specifies the font weight of
`calcite-option`s in the component.
`--calcite-select-text-color`: Specifies the text color of
`calcite-option`s in the component.
`--calcite-select-border-color`: Specifies the component's border color.
`--calcite-select-icon-color`: Specifies the component's icon color.
`--calcite-select-icon-color-hover`: Specifies the component's icon
color when hovered or active.
aPreciado88 added a commit that referenced this issue Jan 13, 2025
**Related Issue:**
[#7180](#7180)

## Summary

Add `pagination` component tokens.

`--calcite-pagination-spacing`: Specifies the amount of left and right
margin spacing between each item.
`--calcite-pagination-size`: Specifies the width of each item.
`--calcite-pagination-color`: Specifies the component's item color.
`--calcite-pagination-color-hover`: Specifies the component's item color
when hovered or selected.
`--calcite-pagination-color-border-hover`: Specifies the component's
item bottom border color when hovered.
`--calcite-pagination-color-border-active`: Specifies the component's
item bottom border color when selected.
`--calcite-pagination-background-color`: Specifies the component's item
background color when active.
`--calcite-pagination-icon-color-background-hover`: Specifies the
component's chevron item background color when hovered.
Elijbet added a commit that referenced this issue Jan 16, 2025
**Related Issue:** #7180

## Summary
Refactor block heading text color. `open/close` icon shares a hover
state with the color of the heading text when the component is open.

Adds the following component token:

`--calcite-block-heading-text-color-press`
alisonailea added a commit that referenced this issue Jan 21, 2025
**Related Issue:** #7180 
Blocked issues: #11210 

## Summary

### Calcite Button

--calcite-button-background-color: Specifies the component's background
color when appearance="solid" or appearance="outline-fill".
--calcite-button-border-color: Specifies the component's border color
when it has appearance="outline" or appearance="outline-fill".
--calcite-button-corner-radius: Specifies the component's corner radius.
--calcite-button-text-color: Specifies the component's text color.
driskull added a commit that referenced this issue Jan 24, 2025
**Related Issue:** #7180

## Summary

Add `graph` component tokens.

`--calcite-graph-highlight-fill-color`: Specifies the fill color of the
`highlight` element, when present.
driskull added a commit that referenced this issue Jan 27, 2025
**Related Issue:** #7180

## Summary

Add `flow` and `flow-item` component tokens.

### Deprecates the following tokens

- `--calcite-flow-item-footer-padding`: [Deprecated] Use
`--calcite-flow-footer-space` instead. Specifies the padding of the
component's footer.
- `--calcite-flow-item-header-border-block-end`: [Deprecated] Use
`--calcite-flow-border-color` instead. Specifies the component header's
block end border.

### Adds the following tokens

- `--calcite-flow-corner-radius`: Specifies the component's corner
radius.
- `--calcite-flow-heading-text-color`: Specifies the text color of the
component's `heading`.
- `--calcite-flow-description-text-color`: Specifies the text color of
the component's `description`.
- `--calcite-flow-border-color`: Specifies the component's border color.
- `--calcite-flow-background-color`: Specifies the component's
background color.
- `--calcite-flow-header-background-color`: Specifies the background
color of the component's header.
- `--calcite-flow-footer-background-color`: Specifies the background
color of the component's footer.
- `--calcite-flow-space`: Specifies the padding of the component's
`"unnamed (default)"` slot.
- `--calcite-flow-header-content-space`: Specifies the padding of the
`"header-content"` slot.
- `--calcite-flow-footer-space`: Specifies the padding of the
component's footer.
- `--calcite-action-background-color`: Specifies the background color of
the component's `closable`, `collapsible`, and `back` `calcite-action`s.
Applies to any slotted `calcite-action`s.
- `--calcite-action-background-color-hover`: Specifies the background
color of the component's `closable`, `collapsible`, and `back`
`calcite-action`s when hovered. Applies to any slotted
`calcite-action`s.
- `--calcite-action-background-color-pressed`: Specifies the background
color of the component's `closable`, `collapsible`, and `back`
`calcite-action`s when pressed. Applies to any slotted
`calcite-action`s.
- `--calcite-action-text-color-hover`: Specifies the text and icon color
of the component's `closable`, `collapsible`, and `back`
`calcite-action`s when hovered. Applies to any slotted
`calcite-action`s.
- `--calcite-action-text-color-pressed`: Specifies the text and icon
color of the component's `closable`, `collapsible`, and `back`
`calcite-action`s when pressed. Applies to any slotted
`calcite-action`s.
- `--calcite-popover-border-color`: Specifies the border color of the
component's internally rendered `calcite-popover`, which is rendered
within a `calcite-action` menu when slotted `calcite-action`s are
present in the `header-actions-end` slot. Applies to any slotted
`calcite-popover`s.
- `--calcite-flow-header-action-background-color-hover`: Specifies the
background color of the component's `calcite-action` items in the flow
item header when hovered.
- `--calcite-flow-header-action-background-color-press`: Specifies the
background color of the component's `calcite-action` items in the flow
item header when pressed.
- `--calcite-flow-header-action-background-color`: Specifies the
background color of the component's `calcite-action` items in the flow
item header.
- `--calcite-flow-header-action-indicator-color`: Specifies the color of
the component's `calcite-action` items' indicator in the flow item
header.
- `--calcite-flow-header-action-text-color-press`: Specifies the text
color of the component's `calcite-action` items in the flow item header
when pressed.
- `--calcite-flow-header-action-text-color`: Specifies the text color of
the component's `calcite-action` items in the flow item header.
driskull added a commit that referenced this issue Jan 29, 2025
…#11359)

**Related Issue:** #7180

## Summary

Add `segmented-control`, `segmented-control-item` component tokens.

`--calcite-segmented-control-color`: Specifies the component's color.
`--calcite-segmented-control-background-color`: Specifies the
component's background color.
`--calcite-segmented-control-border-color`: Specifies the component's
border color.
`--calcite-segmented-control-shadow`: Specifies the component's shadow.
`--calcite-segmented-control-icon-color`: Specifies the icons's color.
driskull added a commit that referenced this issue Jan 29, 2025
**Related Issue:** #7180

## Summary

Add `inline-editable` component tokens.

`--calcite-inline-editable-background-color-hover`: Specifies the
component's background color when hovered.
`--calcite-inline-editable-background-color`: Specifies the component's
background color.
` --calcite-inline-editable-button-background-color`: Specifies the
button element's background color when appearance="solid" or
appearance="outline-fill".
`--calcite-inline-editable-button-corner-radius`: Specifies the button
element's corner radius.
`--calcite-inline-editable-button-loader-color`: Specifies the button
element's loader color.
`--calcite-inline-editable-button-shadow-color`: Specifies the button
element's box-shadow color.
`--calcite-inline-editable-button-text-color`: Specifies the button
element's text color.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - in development Issues that are actively being worked on. Calcite (design) Issues logged by Calcite designers. design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. epic Large scale issues to be broken up into sub-issues and tracked via sprints and/or project. estimate - 13 Requires planning and input from team, consider smaller steps. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

7 participants