Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
990f372
chore(documentation): investigate cross-component referencing
myrta2302 Apr 29, 2025
3f6d832
documenting examples
myrta2302 May 5, 2025
7e6e7d2
more investigation
myrta2302 May 8, 2025
78ea0e6
add examples
myrta2302 May 12, 2025
6c7f1b2
aria controls and aria roles
myrta2302 May 20, 2025
d2ed38e
update
myrta2302 May 26, 2025
b20d257
Merge branch 'main' into 5300-investigate-and-document-cross-componen…
myrta2302 May 28, 2025
89a00dd
merge error fix
myrta2302 Jun 3, 2025
c936ed5
refactor(styles): generate not-defined selectors by using the compone…
oliverschuerch Jun 11, 2025
d3e3b68
chore(deps): update actions/checkout digest to 09d2aca (#5608)
renovate[bot] Jun 11, 2025
5fbf233
chore(deps): update changesets/action digest to 04d574e (#5610)
renovate[bot] Jun 11, 2025
8d726e2
chore(deps): update dawidd6/action-download-artifact digest to 9b54a0…
renovate[bot] Jun 11, 2025
76543d2
fix(styles): fixed `post-tooltip` text overflow by implementing prope…
alionazherdetska Jun 11, 2025
3e0398e
chore(deps): update actions/github-script digest to f28e40c (#5559)
renovate[bot] Jun 11, 2025
8cffd83
chore(deps): update actions/stale digest to f78de97 (#5560)
renovate[bot] Jun 11, 2025
0f43dca
chore(deps): update actions/upload-artifact digest to 6027e3d (#5561)
renovate[bot] Jun 11, 2025
0e2a13e
fix(styles): floating labels appear above mobile navigation menu on I…
alionazherdetska Jun 11, 2025
8e734dd
feat(documentation): add first level hidden section for accessibility…
myrta2302 Jun 11, 2025
db37230
Merge branch '53001-add-accessibility-hidden-section' into 5300-inves…
myrta2302 Jun 11, 2025
ffc7701
move and rename files
myrta2302 Jun 12, 2025
41faa7a
chore(components): set `<post-tooltip>` to `display:contents` to avoi…
myrta2302 Jun 12, 2025
c2beffc
chore(styles): adjust textarea floating label top position to fix sub…
myrta2302 Jun 12, 2025
faa18ed
chore(documentation): post header with custom logo link (#5171)
myrta2302 Jun 12, 2025
922ea33
chore(workflow): add validation logic for `deploy-demo` and `deploy-d…
alionazherdetska Jun 12, 2025
9742a51
Merge branch '5300-investigate-and-document-cross-component-dom-refer…
myrta2302 Jun 12, 2025
1b25fe6
delete not relevant files
myrta2302 Jun 13, 2025
630fa38
revert files
myrta2302 Jun 13, 2025
97ee6e9
revert file
myrta2302 Jun 13, 2025
cde59b4
delete obsolete component
myrta2302 Jun 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/angry-trams-stick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-components': patch
---

Fixed `post-tooltip` text overflow by implementing proper word wrapping and updating width constraints. Tooltips now break correctly within a maximum width of 280px, preventing text from bleeding outside container boundaries.
5 changes: 5 additions & 0 deletions .changeset/fifty-roses-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-documentation': patch
---

Added a new page 'Header with Custom Logo Link' under Guidelines, on how to use post-header logo with a custom link wrapper.
14 changes: 14 additions & 0 deletions .changeset/old-teachers-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@swisspost/design-system-styles': major
'@swisspost/design-system-components-angular': major
'@swisspost/design-system-components-react': major
'@swisspost/design-system-components': major
---

Moved the file responsible for preventing flashes of unstyled content for components from the styles to the components package. The flashes occur when non-hydrated components are rendered before JavaScript has loaded on a client. These styles hide the non-hydrated component, preventing the flash.

**Changes:**
Removed: `@swispost/design-system-styles/components/not-defined.(scss|css)`
Added: `@swisspost/design-system-components/post-components/post-components.css`
Added: `@swisspost/design-system-components-angular/post-components.css`
Added: `@swisspost/design-system-components-react/post-components.css`
5 changes: 5 additions & 0 deletions .changeset/purple-cooks-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-components': patch
---

Set `<post-tooltip>` to `display: contents` to avoid affecting document layout.
5 changes: 5 additions & 0 deletions .changeset/soft-women-show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': patch
---

Fixed an issue on iOS Chrome where floating labels would appear above the mobile navigation menu after users interacted with multiple form inputs, by increasing the z-index hierarchy for `post-header` components on mobile and tablet devices to ensure proper layering and maintain the navigation menu's top-level priority.
5 changes: 5 additions & 0 deletions .changeset/two-clubs-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': patch
---

Adjusted label top position to prevent text from appearing between label and border on Windows at 125% scaling.
2 changes: 1 addition & 1 deletion .github/actions/artifact-download/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
run: mkdir -p ${{ runner.temp }}/artifact_download

- name: Download artifact
uses: dawidd6/action-download-artifact@07ab29fd4a977ae4d2b275087cf67563dfdf0295
uses: dawidd6/action-download-artifact@9b54a0a70c3d482a3d96da8a2f9fc08d0209c9ae
with:
name: ${{ inputs.name }}
run_id: ${{ github.event.workflow_run.id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/artifact-upload/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ runs:
run: cd ${{ inputs.folder }} && zip artifacts.zip . -r

- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
with:
name: ${{ inputs.name }}
path: ${{ inputs.folder }}/artifacts.zip
2 changes: 1 addition & 1 deletion .github/actions/preview/message/create/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/github-script@e7aeb8c663f696059ebb5f9ab1425ed2ef511bdb
- uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b
env:
ISSUE_NUMBER: ${{ inputs.issue-number }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/preview/message/update/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/github-script@e7aeb8c663f696059ebb5f9ab1425ed2ef511bdb
- uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b
env:
ISSUE_NUMBER: ${{ inputs.issue-number }}
PREVIEW_URL: ${{ inputs.preview-url }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-pnpm/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
steps:
- name: Detect wanted version
id: wanted-versions
uses: actions/github-script@e7aeb8c663f696059ebb5f9ab1425ed2ef511bdb
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b
with:
script: |
const fs = require('fs')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f

- name: Setup
uses: ./.github/actions/setup-pnpm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-tokens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f

- name: Setup
uses: ./.github/actions/setup-pnpm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-token-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
with:
fetch-depth: 0
token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}
Expand Down
48 changes: 41 additions & 7 deletions .github/workflows/deploy-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
with:
ref: ${{ github.event.workflow_run.head_branch }}
ref: main

- name: Setup
uses: ./.github/actions/setup-pnpm
Expand All @@ -39,20 +39,54 @@ jobs:
name: design-system-demo
folder: build-output

- name: Validate issue number
id: validate
uses: actions/github-script@v6
with:
env:
RAW_ID: ${{ steps.build.outputs.id }}
script: |
const rawId = process.env.RAW_ID;
if (!/^\d{1,10}$/.test(rawId)) {
core.setFailed('Invalid issue number format - must be 1-10 digits');
return;
}
// Convert to number and validate range
const issueNumber = Number(rawId);
if (!Number.isInteger(issueNumber) || issueNumber <= 0) {
core.setFailed('Invalid issue number - must be a positive integer');
return;
}

core.setOutput('safe_id', rawId);
core.setOutput('issue_number', issueNumber);

- name: Deploy demo app to netlify
if: steps.validate.outcome == 'success'
uses: swisspost/design-system/.github/actions/deploy-to-netlify@release/v8
id: deploy
with:
id: ${{ steps.build.outputs.id }}
id: ${{ steps.validate.outputs.safe_id }}
netlify_auth_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify_site_id: ${{ secrets.NETLIFY_SITE_ID }}
netlify_site_url: swisspost-web-frontend.netlify.app
folder: ${{ steps.build.outputs.folder }}
package_name: '@swisspost/design-system-demo'

- name: Update preview message
uses: ./.github/actions/preview/message/update
if: steps.validate.outcome == 'success' && steps.deploy.outcome == 'success'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
access-token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}
issue-number: ${{ steps.build.outputs.id }}
preview-url: ${{ steps.deploy.outputs.preview-url }}
github-token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}
env:
ISSUE_NUMBER: ${{ steps.validate.outputs.issue_number }}
PREVIEW_URL: ${{ steps.deploy.outputs.preview-url }}
script: |
const issueNumber = Number(process.env.ISSUE_NUMBER);
const previewUrl = process.env.PREVIEW_URL;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: `βœ… Preview deployment is ready!\n\n[Preview URL](${previewUrl})`
});
84 changes: 60 additions & 24 deletions .github/workflows/deploy-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f

- name: Setup pnpm & node
uses: ./.github/actions/setup-pnpm
Expand All @@ -37,27 +37,67 @@ jobs:
access-token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}
issue-number: ${{ steps.build.outputs.id }}

- name: Get netlify config
id: netlify-config
uses: actions/github-script@e7aeb8c663f696059ebb5f9ab1425ed2ef511bdb
with:
script: |
const fs = require('fs')
return JSON.parse(fs.readFileSync('./${{ steps.build.outputs.folder }}/netlify.config.json', 'utf8'))
- name: Get and validate netlify config
run: |
if [[ ! -f "${{ steps.build.outputs.folder }}/netlify.config.json" ]]; then
echo "Error: Netlify config file missing"
exit 1
fi

node -e "
try {
const config = JSON.parse(process.env.CONFIG);
const { siteId, siteUrl } = config;

// Check if required fields exist
if (!siteId || !siteUrl) {
console.error('Error: Missing siteId or siteUrl in netlify config');
process.exit(1);
}

// Validate siteId format (alphanumeric and hyphens only)
if (!/^[a-zA-Z0-9-]+$/.test(siteId)) {
console.error('Error: Invalid site ID format. Must contain only letters, numbers, and hyphens.');
process.exit(1);
}

// Validate siteUrl format (alphanumeric, dots, and hyphens only)
if (!/^[a-zA-Z0-9.-]+$/.test(siteUrl)) {
console.error('Error: Invalid site URL format. Must contain only letters, numbers, dots, and hyphens.');
process.exit(1);
}

} catch (error) {
console.error(error.message);
process.exit(1);
}
" >> $GITHUB_ENV
env:
CONFIG: $(cat "${{ steps.build.outputs.folder }}/netlify.config.json")

- name: Remove netlify.config.json from artifact folder
run: rm ${{ steps.build.outputs.folder }}/netlify.config.json

- name: Create URL alias
env:
BUILD_ID: ${{ steps.build.outputs.id }}
run: |
url_alias=$(echo "preview-$BUILD_ID" | iconv -t ascii//TRANSLIT | sed -E 's/[~\^]+//g' | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+\|-+$//g' | sed -E 's/^-+//g' | sed -E 's/-+$//g' | tr A-Z a-z)
echo "URL_ALIAS=$url_alias" >> $GITHUB_ENV

preview_url="https://${url_alias}--${SITE_URL}"
echo "PREVIEW_URL=$preview_url" >> $GITHUB_ENV

- name: Deploy Documentation Preview
id: deploy
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ fromJSON(steps.netlify-config.outputs.result).siteId }}
# run command taken from https://gist.github.com/oneohthree/f528c7ae1e701ad990e6, shortened to 28 chars, prepended with build-number
NETLIFY_SITE_ID: ${{ env.SITE_ID }}
URL_ALIAS: ${{ env.URL_ALIAS }}
FOLDER: ${{ steps.build.outputs.folder }}
run: |
url_alias=`echo "preview-${{ steps.build.outputs.id }}" | iconv -t ascii//TRANSLIT | sed -E 's/[~\^]+//g' | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+\|-+$//g' | sed -E 's/^-+//g' | sed -E 's/-+$//g' | tr A-Z a-z`
echo "site-url=https://$url_alias--${{ fromJSON(steps.netlify-config.outputs.result).siteUrl }}" >> $GITHUB_OUTPUT
netlify deploy --filter @swisspost/design-system-documentation --dir ${{ steps.build.outputs.folder }} --alias $url_alias
netlify deploy --filter @swisspost/design-system-documentation --dir "$FOLDER" --alias "$URL_ALIAS"
echo "site-url=$PREVIEW_URL" >> $GITHUB_OUTPUT

- name: Update preview message
uses: ./.github/actions/preview/message/update
Expand All @@ -67,14 +107,10 @@ jobs:
preview-url: ${{ steps.deploy.outputs.site-url }}

- name: Create Summary
id: summary
uses: actions/github-script@e7aeb8c663f696059ebb5f9ab1425ed2ef511bdb
with:
script: |
return `# Deployed Documentation Preview
- SiteId: <code>${{ fromJSON(steps.netlify-config.outputs.result).siteId }}</code>
- SiteUrl: ${{ steps.deploy.outputs.site-url }}
`

- name: Output Summary
run: echo -e ${{ steps.summary.outputs.result }} >> $GITHUB_STEP_SUMMARY
env:
SITE_ID: ${{ env.SITE_ID }}
SITE_URL: ${{ steps.deploy.outputs.site-url }}
run: |
echo "# Deployed Documentation Preview" >> $GITHUB_STEP_SUMMARY
echo "- SiteId: <code>${SITE_ID}</code>" >> $GITHUB_STEP_SUMMARY
echo "- SiteUrl: ${SITE_URL}" >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion .github/workflows/dry-run-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f

- name: Setup Node & pnpm
uses: ./.github/actions/setup-pnpm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
with:
fetch-depth: 0

Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
run: pnpm e2e:ci

- name: Upload screenshots
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
if: failure()
with:
name: cypress-snapshots
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fetch-icons-v8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
with:
fetch-depth: 0

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/fetch-icons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
with:
fetch-depth: 0

Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:

- name: Get Changed Icons
id: changed-icons
uses: actions/github-script@e7aeb8c663f696059ebb5f9ab1425ed2ef511bdb
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b
env:
ADDED_FILES: ${{ steps.changed-files.outputs.added_files }}
MODIFIED_FILES: ${{ steps.changed-files.outputs.modified_files }}
Expand All @@ -105,7 +105,7 @@ jobs:

- name: Create Changeset
if: steps.changed-files.outputs.any_modified != 'false'
uses: actions/github-script@e7aeb8c663f696059ebb5f9ab1425ed2ef511bdb
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b
env:
DATE: ${{ steps.current-date.outputs.date }}
ICON_CHANGES: ${{ steps.changed-icons.outputs.result }}
Expand All @@ -124,7 +124,7 @@ jobs:
- name: Write PR Body
id: pr-body
if: steps.changed-files.outputs.any_modified != 'false'
uses: actions/github-script@e7aeb8c663f696059ebb5f9ab1425ed2ef511bdb
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b
env:
PR_BODY_FILE: pr-body.md
ICON_CHANGES: ${{ steps.changed-icons.outputs.result }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
with:
fetch-depth: 0

Expand Down
Loading
Loading