diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..07994fc7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,23 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 1 # set 0 to temporarily disable automatic update requests + pull-request-branch-name: + separator: "/" + assignees: + - "haschek" + # Maintain dependencies for npm + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "monthly" + versioning-strategy: increase + open-pull-requests-limit: 3 # set 0 to temporarily disable automatic update requests + pull-request-branch-name: + separator: "/" + assignees: + - "haschek" diff --git a/.github/workflows/deployment-storybook.yml b/.github/workflows/deployment-storybook.yml index 79875a9b..8006fa1d 100644 --- a/.github/workflows/deployment-storybook.yml +++ b/.github/workflows/deployment-storybook.yml @@ -19,19 +19,20 @@ on: jobs: chromatic-deployment: runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main with: fetch-depth: 0 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@main with: - node-version: "16" + node-version: "18" - name: Install dependencies run: yarn install - name: Create jest results run: yarn test:generate-output - name: Publish to Chromatic - uses: chromaui/action@v1 + uses: chromaui/action@v11 with: token: ${{ secrets.GITHUB_TOKEN }} projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} diff --git a/.github/workflows/release-branch.yml b/.github/workflows/release-branch.yml index 5b56d2a1..ae698b0c 100644 --- a/.github/workflows/release-branch.yml +++ b/.github/workflows/release-branch.yml @@ -4,7 +4,6 @@ on: workflow_dispatch: branches: - "develop" - - "feature/prepareReleaseForDM-CMEM-4151" # TODO: only for testing, remove it later inputs: releasetype: description: "Type of release" @@ -20,10 +19,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@main + - uses: actions/setup-node@main with: - node-version: "16" + node-version: "18" - name: Update package.json with new release candidate version id: create-version run: | diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index 2683dd54..9ef9028a 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -30,15 +30,15 @@ jobs: echo "You started it on '${{ steps.branch-name.outputs.current_branch }}'." exit 1 fi - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Initialize mandatory git config # @see https://github.community/t/how-do-i-get-gh-username-based-on-actions-events/17882 run: | git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" - - uses: actions/setup-node@v3 + - uses: actions/setup-node@main with: - node-version: "16" + node-version: "18" - name: Get version id: package-version run: echo "version=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release-final.yml b/.github/workflows/release-final.yml index dd133eee..d9c775f4 100644 --- a/.github/workflows/release-final.yml +++ b/.github/workflows/release-final.yml @@ -13,15 +13,15 @@ jobs: sha: ${{ steps.tag-revision.outputs.sha }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Initialize mandatory git config # @see https://github.community/t/how-do-i-get-gh-username-based-on-actions-events/17882 run: | git config user.name "${{ github.actor }}" git config user.email "${{ github.actor }}@users.noreply.github.com" - - uses: actions/setup-node@v3 + - uses: actions/setup-node@main with: - node-version: "16" + node-version: "18" - name: Get version id: package-version run: echo "version=$(node -p -e "require('./package.json').version.split('-').shift()")" >> $GITHUB_OUTPUT @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest needs: create-release-version steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main with: ref: develop - name: Initialize mandatory git config diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index b3b09ec1..a282b1c5 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -26,13 +26,13 @@ jobs: echo ${{ inputs.ref }} echo ${{ inputs.sha }} echo ${{ inputs.sectionChangelog }} - - uses: actions/checkout@v3 + - uses: actions/checkout@main with: fetch-depth: 0 ref: ${{ inputs.ref }} - - uses: actions/setup-node@v3 + - uses: actions/setup-node@main with: - node-version: "16" + node-version: "18" registry-url: "https://registry.npmjs.org" - name: Set name vars id: info-vars @@ -56,7 +56,7 @@ jobs: # @see https://github.com/chromaui/chromatic-cli/issues/551 if: inputs.sectionChangelog != 'Unreleased' id: chromatic-upload - uses: chromaui/action@v1 + uses: chromaui/action@v11 with: token: ${{ secrets.GITHUB_TOKEN }} projectToken: ${{ secrets.chromaticToken }} diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 27629721..8e9ec7db 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -15,11 +15,11 @@ jobs: test-code: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Test using Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@main with: - node-version: "16" + node-version: "18" - run: yarn install - run: yarn compile - run: yarn compile-scss diff --git a/.github/workflows/test-project.yml b/.github/workflows/test-project.yml index ac4fac5f..cc84bc19 100644 --- a/.github/workflows/test-project.yml +++ b/.github/workflows/test-project.yml @@ -5,6 +5,8 @@ on: branches-ignore: - "develop" - "main" + - "next" + - "legacy" pull_request: jobs: @@ -12,22 +14,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Test branch name - # https://github.com/marketplace/actions/branch-name-rules - uses: deepakputhraya/action-branch-name@master + # https://github.com/marketplace/actions/enforce-branch-name + uses: finleyfamily/action-enforce-branch-name@master with: regex: '([a-z])+\/([a-z]).([aA-zZ\.\-\d])+' - allowed_prefixes: "feature,release,fix,bugfix,hotfix,change,temp" - ignore: "main,develop" - min_length: 10 - max_length: 100 + allowed_prefixes: "feature,release,fix,bugfix,hotfix,change,temp,dependabot" + exclude: "main,develop,next,legacy" test-documentation: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Test existence of important files # https://github.com/marketplace/actions/file-existence id: check_files - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@main with: files: "package.json, LICENSE, README.md, CHANGELOG.md" - name: 'Test for "## [Unreleased]" section in changelog' diff --git a/.storybook/main.js b/.storybook/main.js index 6af6376b..bdb1a2a4 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -15,6 +15,7 @@ module.exports = { }, }, }, + "@storybook/addon-webpack5-compiler-babel", ], framework: { name: "@storybook/react-webpack5", diff --git a/CHANGELOG.md b/CHANGELOG.md index 82ba8392..fe9d895d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,118 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] +This is a major release, and it might be not compatible with your current usage of our library. Please read about the necessary changes in the section about how to migrate. + +### Migration from v23 to v24 + +- upgrade Typescript to v5 +- upgrade Node to at least v18, see **Changed** section for more info about it +- remove deprecated components, properties and imports from your project, if the info cannot be found here then it was already mentioned in **Deprecated** sections of the past changelogs + - `` + - `full`: was deprecated and now removed because it always uses full width if it is the only column and does not have any othe size config + - `` + - `fullWidth`: was deprecated and now removed, use `flexWidth` as replacement + - `iconName`: was deprecated and now removed, use `icon` property + - `` + - `size`: use only "small", "medium" or "large" as value + - `` + - `emphasized`: was deprecated and now removed, use `minimal=false` plus `emphasis="stronger"` instead + - `IconSized` type: use `CarbonIconType` + - `TimeUnits` type: use `ElapsedDateTimeDisplayUnits` + - `MarkdownParserProps` interface: use `MarkdownProps` + - `elapsedTimeSegmented` function: use `elapsedDateTimeDisplayUtils.elapsedTimeSegmented` + - `simplifiedElapsedTime` function: use `elapsedDateTimeDisplayUtils.simplifiedElapsedTime` + +### Added + +- ``: + - `noTogglerContentSuffix`: Allows to add non-string elements at the end of the content if the full description is shown, i.e. no toggler is necessary. This allows to add non-string elements to both the full-view content and the pure string content. +- `` + - An optional custom search function property has been added, it defines how to filter elements. + - Added a prop `limitHeightOpened` to limit the height of the dropdown by automatically calculating the available height in vh. +- `` and `` + - helper components to create flex layouts for positioning sub elements + - stop misusing `Toolbar*` components to do that (anti pattern) +- `` and `` + - `singleColumn` property to display label and value below each other +- `