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

chore(documentation): add palette scss file import documentation #4127

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

leagrdv
Copy link
Contributor

@leagrdv leagrdv commented Dec 2, 2024

No description provided.

@leagrdv leagrdv added the 🚂 PR train PR which follows another one. label Dec 2, 2024
@leagrdv leagrdv requested review from a team as code owners December 2, 2024 15:08
@leagrdv leagrdv requested review from gfellerph and removed request for a team December 2, 2024 15:08
Copy link

changeset-bot bot commented Dec 2, 2024

🦋 Changeset detected

Latest commit: 691b91a

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

This PR includes changesets to release 1 package
Name Type
@swisspost/design-system-documentation Patch

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

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Dec 2, 2024

Related Previews

@@ -25,3 +26,5 @@ You can apply this text color to any element by using the `.palette-text` class.
<div className="hide-col-default">
<Controls of={paletteStories.Default} />
</div>

<StylesPackageImport components={['post-palettes']} />
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good if the import could adapt to the selected theme. It is stored in the local storage under swisspost-documentation-theme, if not defined the default is "Post".

Copy link
Contributor Author

@leagrdv leagrdv Dec 10, 2024

Choose a reason for hiding this comment

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

If I use the value from the local storage, it doesn't update when I change the theme, so I had to update the styles package import from the styles switcher directly: https://github.com/swisspost/design-system/pull/4085/files#diff-7afcbc69ddf51598841204e61dceede5164073437393967b7e3b4c345515983b
It detects if there is a theme or a channel in the path of the scss and replaces it if needed to the correct theme.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it also update post-palettes for cargo-palettes?

@gfellerph gfellerph removed their request for review December 4, 2024 09:26
Base automatically changed from 4026-update-the-stylespackageimport-component to main December 4, 2024 15:27
@leagrdv leagrdv removed the 🚂 PR train PR which follows another one. label Dec 9, 2024
@leagrdv leagrdv linked an issue Dec 9, 2024 that may be closed by this pull request
@leagrdv leagrdv requested a review from alizedebray December 10, 2024 12:24
Copy link

sonarcloud bot commented Dec 12, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add style imports for the palettes
3 participants