diff --git a/.changeset/beige-needles-matter.md b/.changeset/beige-needles-matter.md deleted file mode 100644 index b70c34e764..0000000000 --- a/.changeset/beige-needles-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@digdir/designsystemet-css": patch ---- - -New class `ds-focus--inset` for adding a focus border on the insider of an element diff --git a/.changeset/breezy-walls-change.md b/.changeset/breezy-walls-change.md deleted file mode 100644 index 4eaf174b81..0000000000 --- a/.changeset/breezy-walls-change.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@digdir/designsystemet-react": minor ---- - -`SeverityColors` is removed from `Color` type. Components where we deem severity to be relevant, now explicitly have SeverityColors added to `data-color`. `Button` component only allows `"danger"`. diff --git a/.changeset/eleven-hounds-mix.md b/.changeset/eleven-hounds-mix.md deleted file mode 100644 index afc95bf13d..0000000000 --- a/.changeset/eleven-hounds-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@digdir/designsystemet-css": patch ---- - -**Button**: When setting both `aria-busy` and `aria-disabled`, we don't turn down opacity, and show a progress cursor diff --git a/.changeset/fair-geckos-judge.md b/.changeset/fair-geckos-judge.md deleted file mode 100644 index f04cd344a2..0000000000 --- a/.changeset/fair-geckos-judge.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@digdir/designsystemet-react": patch ---- - -**Suggestion**: Fix clear button not unselecting the selected option diff --git a/.changeset/fast-years-push.md b/.changeset/fast-years-push.md deleted file mode 100644 index 30412c160a..0000000000 --- a/.changeset/fast-years-push.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@digdir/designsystemet-react": patch ---- - -**Button**: `loading` now sets `aria-disabled="true"` diff --git a/.changeset/kind-lizards-tickle.md b/.changeset/kind-lizards-tickle.md deleted file mode 100644 index d6e6e32566..0000000000 --- a/.changeset/kind-lizards-tickle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@digdir/designsystemet-css": patch ---- - -**Tabs**: change selected color and inherit color on content diff --git a/.github/workflows/deploy-storefront.yml b/.github/workflows/deploy-storefront.yml index 217d2f1cfb..df2adba2e7 100644 --- a/.github/workflows/deploy-storefront.yml +++ b/.github/workflows/deploy-storefront.yml @@ -38,22 +38,22 @@ jobs: - name: Install Vercel CLI run: npm install --global vercel@latest - - name: Set default environment value if push event is triggered - id: defaultenvironment + - name: Set Vercel environment + id: environment run: | - ENVIRONMENT=${{ github.event.inputs.environment }} - echo "value=${ENVIRONMENT:-"next"}" >> "$GITHUB_OUTPUT" + ENVIRONMENT=${{ github.event.inputs.environment == 'production' && 'production' || 'preview' }} + echo "vercel=${ENVIRONMENT}" >> "$GITHUB_OUTPUT" - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=${{(steps.defaultenvironment.outputs.value == 'next' && 'preview') || 'production'}} --token=${{ secrets.VERCEL_TOKEN }} + run: vercel pull --yes --environment=${{steps.environment.outputs.vercel}} --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts - run: vercel build ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }} + run: vercel build ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }} - id: deploy name: Deploy Project Artifacts to Vercel - run: echo "url=$(vercel deploy --prebuilt ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + run: echo "url=$(vercel deploy --prebuilt ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT - name: Set Vercel alias + if: steps.environment.outputs.vercel == 'preview' run: vercel alias --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_TEAM }} set ${{ steps.deploy.outputs.url }} next.designsystemet.no - if: steps.defaultenvironment.outputs.value == 'next' diff --git a/.github/workflows/deploy-storybook.yml b/.github/workflows/deploy-storybook.yml index 6da06214e2..4bc72f3c0d 100644 --- a/.github/workflows/deploy-storybook.yml +++ b/.github/workflows/deploy-storybook.yml @@ -43,22 +43,22 @@ jobs: - name: Install Vercel CLI run: npm install --global vercel@latest - - name: Set default environment value if push event is triggered - id: defaultenvironment + - name: Set Vercel environment + id: environment run: | - ENVIRONMENT=${{ github.event.inputs.environment }} - echo "value=${ENVIRONMENT:-"next"}" >> "$GITHUB_OUTPUT" + ENVIRONMENT=${{ github.event.inputs.environment == 'production' && 'production' || 'preview' }} + echo "vercel=${ENVIRONMENT}" >> "$GITHUB_OUTPUT" - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=${{(steps.defaultenvironment.outputs.value == 'next' && 'preview') || 'production'}} --token=${{ secrets.VERCEL_TOKEN }} + run: vercel pull --yes --environment=${{steps.environment.outputs.vercel}} --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts - run: vercel build ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }} + run: vercel build ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }} - id: deploy name: Deploy Project Artifacts to Vercel - run: echo "url=$(vercel deploy --prebuilt ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + run: echo "url=$(vercel deploy --prebuilt ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT - name: Set Vercel alias + if: steps.environment.outputs.vercel == 'preview' run: vercel alias --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_TEAM }} set ${{ steps.deploy.outputs.url }} next.storybook.designsystemet.no - if: steps.defaultenvironment.outputs.value == 'next' diff --git a/.github/workflows/deploy-theme.yml b/.github/workflows/deploy-theme.yml index 91696fdf06..3239fcf0af 100644 --- a/.github/workflows/deploy-theme.yml +++ b/.github/workflows/deploy-theme.yml @@ -38,22 +38,22 @@ jobs: - name: Install Vercel CLI run: npm install --global vercel@latest - - name: Set default environment value if push event is triggered - id: defaultenvironment + - name: Set Vercel environment + id: environment run: | - ENVIRONMENT=${{ github.event.inputs.environment }} - echo "value=${ENVIRONMENT:-"next"}" >> "$GITHUB_OUTPUT" + ENVIRONMENT=${{ github.event.inputs.environment == 'production' && 'production' || 'preview' }} + echo "vercel=${ENVIRONMENT}" >> "$GITHUB_OUTPUT" - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=${{(steps.defaultenvironment.outputs.value == 'next' && 'preview') || 'production'}} --token=${{ secrets.VERCEL_TOKEN }} + run: vercel pull --yes --environment=${{steps.environment.outputs.vercel}} --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts - run: vercel build ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }} + run: vercel build ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }} - id: deploy name: Deploy Project Artifacts to Vercel - run: echo "url=$(vercel deploy --prebuilt ${{(steps.defaultenvironment.outputs.value == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + run: echo "url=$(vercel deploy --prebuilt ${{(steps.environment.outputs.vercel == 'production' && '--prod') || ''}} --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT - name: Set Vercel alias + if: steps.environment.outputs.vercel == 'preview' run: vercel alias --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_TEAM }} set ${{ steps.deploy.outputs.url }} next.theme.designsystemet.no - if: steps.defaultenvironment.outputs.value == 'next' diff --git a/.github/workflows/preview-storefront.yml b/.github/workflows/preview-storefront.yml index 655c7bf073..a7c55c50bd 100644 --- a/.github/workflows/preview-storefront.yml +++ b/.github/workflows/preview-storefront.yml @@ -8,6 +8,8 @@ on: workflow_dispatch: pull_request: types: [opened, synchronize] + branches-ignore: + - main paths: - 'apps/storefront/**' jobs: diff --git a/.github/workflows/preview-storybook.yml b/.github/workflows/preview-storybook.yml index 102ade3cf5..4e6f49c567 100644 --- a/.github/workflows/preview-storybook.yml +++ b/.github/workflows/preview-storybook.yml @@ -8,6 +8,8 @@ on: workflow_dispatch: pull_request: types: [opened, synchronize] + branches-ignore: + - main paths: - 'packages/**' - 'apps/storybook/**' diff --git a/.github/workflows/preview-theme.yml b/.github/workflows/preview-theme.yml index 00063f66bd..b0627f61e6 100644 --- a/.github/workflows/preview-theme.yml +++ b/.github/workflows/preview-theme.yml @@ -8,6 +8,8 @@ on: workflow_dispatch: pull_request: types: [opened, synchronize] + branches-ignore: + - main paths: - 'apps/theme/**' jobs: diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index ad26661b54..332feae26d 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -34,3 +34,5 @@ jobs: git diff echo '---' yarn run publish --tag "${{ steps.variables.outputs.tag }}" --no-git-tag + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.vscode/settings.json b/.vscode/settings.json index 1c30a30397..fdffe701cd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,7 +22,7 @@ ], "html-css-class-completion.includeGlobPattern": "packages/css/**/*.{css,html}", "[github-actions-workflow]": { - "editor.defaultFormatter": "biomejs.biome" + "editor.defaultFormatter": "redhat.vscode-yaml" }, "[html]": { "editor.defaultFormatter": "biomejs.biome" diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..b9d838deda --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,39 @@ +Follow these steps to ensure a smooth and consistent release process. +# Release + +We currently use [changesets](https://github.com/changesets/changesets) for tracking changes, generating changelogs, and publishing releases. + +We don't use changesets prerelease mode yet as we want to avoid additonal steps when creating a new release. + +## 1. Update Main with changes from next + +- Make a PR from `next` into `main` branch + +- Merge PR into `main` using a merge commit + +## 2. Publish new package version + +- [Changeset bot](https://github.com/apps/changeset-bot) should now pickup the changesets (inside `.changeset/`) and generate a PR with bumped version and changelog. + +- Approve and merge the PR. + +- [Changeset bot](https://github.com/apps/changeset-bot) will now publish new a package version to npmjs and create [github releases](https://github.com/digdir/designsystemet/releases) + +- Verify that new version is available in [npmjs](https://www.npmjs.com/package/@digdir/designsystemet) (under `latest` tag) and on [github releases](https://github.com/digdir/designsystemet/releases) + +## 3. Deploy new application version to production + +- Manually trigger the github action deployment to `production` environment from `main` branch: + - Deploy Storefront + - Deploy Theme + - Deploy Storybook + +## 4. Update next branch with changes from main + +- Make a PR from `main` into `next` branch + +- Merge PR into `next` using a merge commit + +### **Next** + +- Use Release Snapshot to publish new version for testing on `@next` before releasing to production diff --git a/apps/_components/src/ClipboardButton/ClipboardButton.tsx b/apps/_components/src/ClipboardButton/ClipboardButton.tsx index 9872b55d2a..5242bdcb2e 100644 --- a/apps/_components/src/ClipboardButton/ClipboardButton.tsx +++ b/apps/_components/src/ClipboardButton/ClipboardButton.tsx @@ -41,7 +41,7 @@ export const ClipboardButton = ({ data-size='sm' aria-label={ariaLabel} > - +