From a44310af46a705435f4c17dc267fa350850bd8be Mon Sep 17 00:00:00 2001 From: literat Date: Sat, 14 Dec 2024 18:14:54 +0100 Subject: [PATCH 1/7] Style(form-validations): Fix documentation by markdown linter --- .remarkignore | 6 +++--- packages/form-validations/README.md | 30 +++++++++++++++-------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.remarkignore b/.remarkignore index 3ca7ea0fc5..8caee49792 100644 --- a/.remarkignore +++ b/.remarkignore @@ -6,8 +6,8 @@ dist build .github -# Temporary disabled packages -# we will fix them incrementally -form-validations # Codemods transforms directory transforms + +# Fix case of the files +MIGRATION-* diff --git a/packages/form-validations/README.md b/packages/form-validations/README.md index 71ead35dc7..ee2fc64a23 100644 --- a/packages/form-validations/README.md +++ b/packages/form-validations/README.md @@ -1,3 +1,5 @@ + + # @lmc-eu/spirit-form-validations > Form validations for Web and Web-Twig packages of the Spirit Design System. @@ -40,19 +42,19 @@ Now create a form: … and validate it: -``` +```javascript window.onload = () => { - const form = document.getElementById("form1"); + const form = document.getElementById('form1'); - // create the FormValidations instance - const formValidations = new FormValidations(form); + // create the FormValidations instance + const formValidations = new FormValidations(form); - form.addEventListener('submit', function (event) { - event.preventDefault(); + form.addEventListener('submit', function (event) { + event.preventDefault(); - // check if the form is valid - const valid = formValidations.validate(); // returns true or false - }); + // check if the form is valid + const valid = formValidations.validate(); // returns true or false + }); }; ``` @@ -87,7 +89,7 @@ const defaultConfig = { - **live** - A boolean value indicating whether FormValidations should validate as you type, default is `true` -## Built-in validators +## Built-in Validators | Name | Usage | Description | | --------- | ----------------------------------------------------------------------------------------------------- | ------------------------------- | @@ -108,7 +110,7 @@ const defaultConfig = { FormValidations.addValidator(nameOrElem, handler, errorMessage, priority, halt); ``` -### Add a custom validator to a field +### Add a Custom Validator to a Field ```javascript var formValidations = new FormValidations(document.getElementById('form1')); @@ -130,7 +132,7 @@ FormValidations.addElementValidator( ); ``` -### Add a global custom validator +### Add a Global Custom Validator A validator to check if the input value is within a specified range. @@ -157,7 +159,7 @@ Now you can assign it to your inputs like this ``` -### Add custom error messages +### Add Custom Error Messages ```html @@ -218,7 +220,7 @@ _Set the current locale globally_ | `locale` | — | ✓ | The corresponding locale | | `messages` | — | ✓ | Object containing validator names as keys and error texts as values | -### Custom validators +### Custom Validators **FormValidations.addElementValidator(elem, fn, message, priority, halt)** From d151340118119c7ff47df5b591cff2b609081e58 Mon Sep 17 00:00:00 2001 From: literat Date: Sat, 14 Dec 2024 18:15:37 +0100 Subject: [PATCH 2/7] Docs(repo): Typo in release names link --- docs/contribution/release-schedule.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contribution/release-schedule.md b/docs/contribution/release-schedule.md index c7639ee403..27b7565780 100644 --- a/docs/contribution/release-schedule.md +++ b/docs/contribution/release-schedule.md @@ -68,7 +68,7 @@ To get support for a specific version, please refer to the [support Slack channe ## Release Names -To get more information about the release names, please refer to the [Release Namse Decision][release-name-decision]. +To get more information about the release names, please refer to the [Release Names Decision][release-names-decision]. ## Assets Managed Under This Release Schedule From 2fc6dffde77bbc77eefe872655ccc9e93c9a29d3 Mon Sep 17 00:00:00 2001 From: literat Date: Sat, 14 Dec 2024 18:16:18 +0100 Subject: [PATCH 3/7] Style(web-react): Fix documentation links for Card and Footer --- .../web-react/src/components/Card/README.md | 20 +++++++++---------- .../web-react/src/components/Footer/README.md | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/web-react/src/components/Card/README.md b/packages/web-react/src/components/Card/README.md index dc1b1cb4a2..951fb48ccf 100644 --- a/packages/web-react/src/components/Card/README.md +++ b/packages/web-react/src/components/Card/README.md @@ -89,11 +89,11 @@ Card can be displayed with a border and a box shadow on hover. ### API -| Name | Type | Default | Required | Description | -| ------------- | --------------------------------------------------------------------------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `direction` | [[Direction dictionary][dictionary-direction], `horizontal-reversed` \| `object`] | `vertical` | ✕ | Direction of the content inside Card component, use object to set responsive values, e.g. `{ mobile: 'horizontal', tablet: 'vertical', desktop: 'horizontal-reversed' }` | -| `elementType` | `ElementType` | `article` | ✕ | Type of element | -| `isBoxed` | `bool` | `false` | ✕ | Whether the Card have border | +| Name | Type | Default | Required | Description | +| ------------- | ---------------------------------------------------------------------------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `direction` | \[[Direction dictionary][dictionary-direction], `horizontal-reversed` \| `object`] | `vertical` | ✕ | Direction of the content inside Card component, use object to set responsive values, e.g. `{ mobile: 'horizontal', tablet: 'vertical', desktop: 'horizontal-reversed' }` | +| `elementType` | `ElementType` | `article` | ✕ | Type of element | +| `isBoxed` | `bool` | `false` | ✕ | Whether the Card have border | On top of the API options, the components accept [additional attributes][readme-additional-attributes]. If you need more control over the styling of a component, you can use [style props][readme-style-props] @@ -220,11 +220,11 @@ horizontal (and reversed horizontal) Cards. But in all other contexts, the two p ### API -| Name | Type | Default | Required | Description | -| ---------------------- | -------------------------------------------- | ------- | -------- | ------------------------------------------- | -| `hasFilledHeightClass` | `bool` | `false` | ✕ | Whether the image fill the height of a Card | -| `isExpanded` | `bool` | `false` | ✕ | Whether the media has space around | -| `size` | [[Size dictionary][dictionary-size], `auto`] | `auto` | ✕ | Size of the image media | +| Name | Type | Default | Required | Description | +| ---------------------- | --------------------------------------------- | ------- | -------- | ------------------------------------------- | +| `hasFilledHeightClass` | `bool` | `false` | ✕ | Whether the image fill the height of a Card | +| `isExpanded` | `bool` | `false` | ✕ | Whether the media has space around | +| `size` | \[[Size dictionary][dictionary-size], `auto`] | `auto` | ✕ | Size of the image media | On top of the API options, the components accept [additional attributes][readme-additional-attributes]. If you need more control over the styling of a component, you can use [style props][readme-style-props] diff --git a/packages/web-react/src/components/Footer/README.md b/packages/web-react/src/components/Footer/README.md index f6ce1cc8c3..fc96253950 100644 --- a/packages/web-react/src/components/Footer/README.md +++ b/packages/web-react/src/components/Footer/README.md @@ -273,6 +273,5 @@ and [escape hatches][readme-escape-hatches]. [readme-additional-attributes]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/README.md#additional-attributes [readme-escape-hatches]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/README.md#escape-hatches [readme-style-props]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/README.md#style-props -[readme-style-props]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/README.md#style-props [select]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/src/components/Select/README.md [stack]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/src/components/Stack/README.md From 8d59a420ad0a82be46eea6fa4cd121305f7b142f Mon Sep 17 00:00:00 2001 From: literat Date: Sat, 14 Dec 2024 18:21:34 +0100 Subject: [PATCH 4/7] Style(codemods): Disable markdown heading capitalization for transforms refs #DS-1100 --- .remarkignore | 3 --- .../codemods/src/transforms/v2/web-react/README.md | 10 +++++----- .../codemods/src/transforms/v3/web-react/README.md | 14 +++++++------- .../codemods/src/transforms/v4/web-react/README.md | 4 ++-- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.remarkignore b/.remarkignore index 8caee49792..c5a1b3f5e0 100644 --- a/.remarkignore +++ b/.remarkignore @@ -6,8 +6,5 @@ dist build .github -# Codemods transforms directory -transforms - # Fix case of the files MIGRATION-* diff --git a/packages/codemods/src/transforms/v2/web-react/README.md b/packages/codemods/src/transforms/v2/web-react/README.md index 753e4af09f..aa5de4287a 100644 --- a/packages/codemods/src/transforms/v2/web-react/README.md +++ b/packages/codemods/src/transforms/v2/web-react/README.md @@ -1,4 +1,4 @@ -# Web-React v2 Codemods +# `web-react` v2 Codemods This is a collection of codemods for updating Web-React v2 components. @@ -6,7 +6,7 @@ You can find instructions on how to run these codemods in the main package [READ ## Included Scripts -### `v2/web-react/dropdown-tooltip-flow-placement` — Dropdown & Tooltip Flow placements +### `v2/web-react/dropdown-tooltip-flow-placement` — Dropdown & Tooltip Flow Placements This codemod updates the placement props in `Dropdown` and `Tooltip` components. It transforms removed non-flow-related placements to their flow-related counterparts. @@ -102,7 +102,7 @@ npx @lmc-eu/spirit-codemods -p -t v2/web-react/grid-gridspan + ``` -### `v2/web-react/header-headerdesktopactions-isatend` — HeaderDesktopActions isAtEnd Prop +### `v2/web-react/header-headerdesktopactions-isatend` — HeaderDesktopActions `isAtEnd` Prop This codemod sets the `isAtEnd` prop instead of the removed `color="secondary"` prop. Also it removes the `color="primary"` prop from the `HeaderDesktopActions` component @@ -143,7 +143,7 @@ npx @lmc-eu/spirit-codemods -p -t v2/web-react/modal-custom-height + ``` -### `v2/web-react/modal-isdockedonmobile-prop` — Modal isDockedOnMobile Prop +### `v2/web-react/modal-isdockedonmobile-prop` — Modal `isDockedOnMobile` Prop This codemod adds the `isDockedOnMobile` prop to the `ModalDialog` component, if it is missing. The purpose of this is to maintain the same behaviour as @@ -162,7 +162,7 @@ npx @lmc-eu/spirit-codemods -p -t v2/web-react/modal-isdockedonmobile-pro + ``` -### `v2/web-react/modal-isscrollable-prop` — Modal isScrollable Prop +### `v2/web-react/modal-isscrollable-prop` — Modal `isScrollable` Prop This codemod adds the `isScrollable` prop to the `ModalDialog` component, if it is missing. The purpose of this is to maintain the same behaviour as diff --git a/packages/codemods/src/transforms/v3/web-react/README.md b/packages/codemods/src/transforms/v3/web-react/README.md index afcbdccec6..ac8e015262 100644 --- a/packages/codemods/src/transforms/v3/web-react/README.md +++ b/packages/codemods/src/transforms/v3/web-react/README.md @@ -1,4 +1,4 @@ -# Web-React v3 Codemods +# `web-react` v3 Codemods This is a collection of codemods for updating Web-React v3 components. @@ -6,7 +6,7 @@ You can find instructions on how to run these codemods in the main package [READ ## Included Scripts -### `v3/web-react/link-underlined-prop` — Link `isUnderlined` to `underlined` prop change +### `v3/web-react/link-underlined-prop` — Link `isUnderlined` to `underlined` Prop Change This codemod updates the `Link` component by replacing the `isUnderlined` prop with a new `underlined` prop, setting it to "always". @@ -23,7 +23,7 @@ npx @lmc-eu/spirit-codemods -p -t v3/web-react/link-underlined-prop + ``` -### `v3/web-react/button-isSquare-prop-name` — Button `isSquare` to `isSymmetrical` prop change +### `v3/web-react/button-isSquare-prop-name` — Button `isSquare` to `isSymmetrical` Prop Change This codemod updates the `Button` component by replacing the `isSquare` prop with a `isSymmetrical` prop. @@ -38,7 +38,7 @@ npx @lmc-eu/spirit-codemods -p -t v3/web-react/button-isSquare-prop-name +