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

feat: add semantic layer token machinery #3349

Merged
merged 29 commits into from
Aug 12, 2024

Conversation

gfellerph
Copy link
Member

@gfellerph gfellerph commented Jul 24, 2024

This PR introduces the core and semantic layer tokens into the styles package. With this, a couple of new entry files become available as well as mixins to generate token maps.

New entry files:

post-external.scss
post-internal.scss
post-tokens-external.scss
post-tokens-internal.scss

New mixins:

_media.scss (for min, max, between media queries)
_tokens.scss (for creating token maps from the scss list outputs)

@gfellerph gfellerph requested a review from a team as a code owner July 24, 2024 16:16
@gfellerph gfellerph requested a review from alizedebray July 24, 2024 16:16
Copy link

changeset-bot bot commented Jul 24, 2024

🦋 Changeset detected

Latest commit: 11dac21

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@swisspost/design-system-styles Minor
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components Minor
@swisspost/design-system-demo Patch
@swisspost/design-system-documentation Patch
@swisspost/internet-header Patch
@swisspost/design-system-intranet-header-workspace Patch
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-styles-primeng-workspace Patch
@swisspost/design-system-intranet-header Minor
@swisspost/design-system-styles-primeng Minor
@swisspost/design-system-components-react Minor
@swisspost/design-system-components-angular Minor
@swisspost/design-system-intranet-header-showcase Patch
@swisspost/design-system-icons Minor
@swisspost/design-system-migrations Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gfellerph gfellerph linked an issue Jul 24, 2024 that may be closed by this pull request
@swisspost-bot
Copy link
Contributor

swisspost-bot commented Jul 24, 2024

Related Previews

@gfellerph gfellerph linked an issue Jul 24, 2024 that may be closed by this pull request
@gfellerph gfellerph marked this pull request as draft July 24, 2024 16:17
@gfellerph gfellerph marked this pull request as ready for review July 24, 2024 21:01
packages/styles/package.json Outdated Show resolved Hide resolved
packages/styles/src/placeholders/_modes.scss Outdated Show resolved Hide resolved
packages/styles/src/tokens/_device.scss Show resolved Hide resolved
packages/styles/src/tokens/_external.scss Show resolved Hide resolved
packages/styles/src/tokens/_modes.scss Outdated Show resolved Hide resolved
Copy link
Contributor

@alizedebray alizedebray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is neat, I look forward to working with these tokens!

packages/documentation/.storybook/styles/preview.scss Outdated Show resolved Hide resolved
packages/styles/gulpfile.js Outdated Show resolved Hide resolved
packages/styles/gulpfile.js Outdated Show resolved Hide resolved
packages/styles/gulpfile.js Outdated Show resolved Hide resolved
@@ -20,6 +20,10 @@ gulp.task('copy', () => {
.pipe(gulp.dest(options.outputDir));
});

gulp.task('temprarily-copy-token-files', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment so that we know why this task is there and when we can remove it?

packages/styles/src/mixins/_media.scss Outdated Show resolved Hide resolved
packages/styles/src/mixins/_media.scss Outdated Show resolved Hide resolved
packages/styles/src/mixins/_tokens.scss Outdated Show resolved Hide resolved
packages/styles/src/mixins/_tokens.scss Outdated Show resolved Hide resolved
@use './../mixins/media';

:root {
@include media.max(600px) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the breakpoints be tokenized too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we were talking about this. We'll update this once they are (also, there might be two more).

@swisspost swisspost deleted a comment from swisspost-bot Aug 12, 2024
Copy link

@gfellerph gfellerph merged commit a767c23 into main Aug 12, 2024
12 checks passed
@gfellerph gfellerph deleted the 3310-tokens-set-up-semantic-layer-for-channels branch August 12, 2024 10:09
gfellerph pushed a commit that referenced this pull request Aug 22, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @swisspost/[email protected]

### Minor Changes

- Added the post-logo component, which enables displaying the Post's
logo either as a clickable link or as a simple image. (by
[@alizedebray](https://github.com/alizedebray) with
[#3354](#3354))

### Patch Changes

- Fixed the `post-card-control` component to use the correct color
scheme when placed on nested colored backgrounds. (by
[@alizedebray](https://github.com/alizedebray) with
[#3358](#3358))
-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Minor Changes

- Added the post-logo component, which enables displaying the Post's
logo either as a clickable link or as a simple image. (by
[@alizedebray](https://github.com/alizedebray) with
[#3354](#3354))

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Minor Changes

- Added icon number 2612. (by
[@swisspost-bot](https://github.com/swisspost-bot) with
[#3373](#3373))

## @swisspost/[email protected]

### Minor Changes

-   Added four new entry files that enable working with Design Tokens:
    -   post-external.(s)css: For portal and other external pages
    -   post-internal.(s)css: For applications and other internal pages
    -   post-tokens-external.(s)css: External tokens only
- post-tokens-internal.(s)css: Internal tokens only (by
[@gfellerph](https://github.com/gfellerph) with
[#3349](#3349))

### Patch Changes

- Realigned the checkbox and the radio button with the label. (by
[@davidritter-dotcom](https://github.com/davidritter-dotcom) with
[#3366](#3366))

- Set the `max-width` constraint of the tag component to 100% for
improved accessibility. Try to keep tag text as short as possible
though. (by [@gfellerph](https://github.com/gfellerph) with
[#3388](#3388))

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]



## @swisspost/[email protected]

### Minor Changes

- Added the post-logo component, which enables displaying the Post's
logo either as a clickable link or as a simple image. (by
[@alizedebray](https://github.com/alizedebray) with
[#3354](#3354))

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Minor Changes

- Added the post-logo component, which enables displaying the Post's
logo either as a clickable link or as a simple image. (by
[@alizedebray](https://github.com/alizedebray) with
[#3354](#3354))

### Patch Changes

- Fixed the font in the full page previews. (by
[@alizedebray](https://github.com/alizedebray) with
[#3378](#3378))

- Marked the card button and the carousel as deprecated (will be removed
in a future version). (by [@schaertim](https://github.com/schaertim)
with [#3380](#3380))

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants