-
Notifications
You must be signed in to change notification settings - Fork 14
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
81943f0
chore(documentation): update styles import files with theme and channel
leagrdv 1ef5a90
Merge branch 'main' into 4026-update-the-stylespackageimport-component
leagrdv 765eb6d
Merge branch 'main' into 4026-update-the-stylespackageimport-component
leagrdv e13e750
update js to update theme and channel to work across all import scss …
leagrdv 89e1ca0
chore(documentations): add palette scss file import documentation
leagrdv 2cd95d0
Merge branch 'main' into 4025-add-style-imports-for-the-palettes
leagrdv 4ee57bb
revert file
leagrdv b699bb0
Update app-store-badge.mdx
leagrdv 38c6dbd
put back prev name for appstorebadge
leagrdv 3103314
Merge branch '4025-add-style-imports-for-the-palettes' of https://git…
leagrdv 691b91a
Merge branch 'main' into 4025-add-style-imports-for-the-palettes
leagrdv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
--- | ||
|
||
Added scss file import documentation to palette. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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".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.
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.
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.
Would it also update
post-palettes
forcargo-palettes
?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.
Yes, if you check here and switch the theme, you'll see it changes it dynamically to cargo-palettes: https://preview-4127--swisspost-design-system-next.netlify.app/?path=/docs/43481535-5b39-40b5-a273-478b07dc3b31--docs