From 614829a854722ac6fd68bf3523099359268337f8 Mon Sep 17 00:00:00 2001 From: literat Date: Sat, 14 Dec 2024 18:14:54 +0100 Subject: [PATCH 1/5] Style(form-validations): Fix documentation by markdown linter --- .remarkignore | 6 +++--- packages/form-validations/README.md | 32 ++++++++++++++++------------- 2 files changed, 21 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..110697089f 100644 --- a/packages/form-validations/README.md +++ b/packages/form-validations/README.md @@ -1,3 +1,7 @@ + + + + # @lmc-eu/spirit-form-validations > Form validations for Web and Web-Twig packages of the Spirit Design System. @@ -40,19 +44,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 +91,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 +112,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 +134,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 +161,7 @@ Now you can assign it to your inputs like this ``` -### Add custom error messages +### Add Custom Error Messages ```html @@ -218,7 +222,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 95aa1895bea95febcc4e0ebc9579b8681147ccda Mon Sep 17 00:00:00 2001 From: literat Date: Sat, 14 Dec 2024 18:15:37 +0100 Subject: [PATCH 2/5] 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 35e2c01e29c1049b6ee6999e1815a712f6732a19 Mon Sep 17 00:00:00 2001 From: literat Date: Sat, 14 Dec 2024 18:16:18 +0100 Subject: [PATCH 3/5] 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 4ddc20f5498291df6f46e928eb0d3b1cbc30871a Mon Sep 17 00:00:00 2001 From: literat Date: Sat, 14 Dec 2024 18:21:34 +0100 Subject: [PATCH 4/5] Style(codemods): Disable markdown heading capitalization for transforms refs #DS-1100 --- .remarkignore | 3 --- packages/codemods/src/transforms/v2/web-react/README.md | 3 +++ packages/codemods/src/transforms/v3/web-react/README.md | 3 +++ packages/codemods/src/transforms/v4/web-react/README.md | 3 +++ 4 files changed, 9 insertions(+), 3 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..12216c2ffb 100644 --- a/packages/codemods/src/transforms/v2/web-react/README.md +++ b/packages/codemods/src/transforms/v2/web-react/README.md @@ -1,3 +1,6 @@ + + + # Web-React v2 Codemods This is a collection of codemods for updating Web-React v2 components. diff --git a/packages/codemods/src/transforms/v3/web-react/README.md b/packages/codemods/src/transforms/v3/web-react/README.md index afcbdccec6..a46b866b6d 100644 --- a/packages/codemods/src/transforms/v3/web-react/README.md +++ b/packages/codemods/src/transforms/v3/web-react/README.md @@ -1,3 +1,6 @@ + + + # Web-React v3 Codemods This is a collection of codemods for updating Web-React v3 components. diff --git a/packages/codemods/src/transforms/v4/web-react/README.md b/packages/codemods/src/transforms/v4/web-react/README.md index 7d17ae14b3..cf0d03e53c 100644 --- a/packages/codemods/src/transforms/v4/web-react/README.md +++ b/packages/codemods/src/transforms/v4/web-react/README.md @@ -1,3 +1,6 @@ + + + # Web-React v4 Codemods This is a collection of codemods for updating Web-React v4 components. From 8520710a69d5d6018b18781ba83a27b995ff6ec0 Mon Sep 17 00:00:00 2001 From: literat Date: Sat, 14 Dec 2024 18:36:02 +0100 Subject: [PATCH 5/5] Style(docs): Rename migration docs with lower case refs #DS-1100 --- .remarkignore | 3 --- .../form-validations/{MIGRATION-v1.md => migration-v1.md} | 3 +++ docs/migrations/web-react/{MIGRATION-v1.md => migration-v1.md} | 0 docs/migrations/web-react/{MIGRATION-v2.md => migration-v2.md} | 0 docs/migrations/web-react/{MIGRATION-v3.md => migration-v3.md} | 0 docs/migrations/web-twig/{MIGRATION-v2.md => migration-v2.md} | 0 docs/migrations/web-twig/{MIGRATION-v3.md => migration-v3.md} | 0 docs/migrations/web-twig/{MIGRATION-v4.md => migration-v4.md} | 0 docs/migrations/web/{MIGRATION-v1.md => migration-v1.md} | 0 docs/migrations/web/{MIGRATION-v2.md => migration-v2.md} | 0 docs/migrations/web/{MIGRATION-v3.md => migration-v3.md} | 0 11 files changed, 3 insertions(+), 3 deletions(-) rename docs/migrations/form-validations/{MIGRATION-v1.md => migration-v1.md} (87%) rename docs/migrations/web-react/{MIGRATION-v1.md => migration-v1.md} (100%) rename docs/migrations/web-react/{MIGRATION-v2.md => migration-v2.md} (100%) rename docs/migrations/web-react/{MIGRATION-v3.md => migration-v3.md} (100%) rename docs/migrations/web-twig/{MIGRATION-v2.md => migration-v2.md} (100%) rename docs/migrations/web-twig/{MIGRATION-v3.md => migration-v3.md} (100%) rename docs/migrations/web-twig/{MIGRATION-v4.md => migration-v4.md} (100%) rename docs/migrations/web/{MIGRATION-v1.md => migration-v1.md} (100%) rename docs/migrations/web/{MIGRATION-v2.md => migration-v2.md} (100%) rename docs/migrations/web/{MIGRATION-v3.md => migration-v3.md} (100%) diff --git a/.remarkignore b/.remarkignore index c5a1b3f5e0..3a0bc18bf1 100644 --- a/.remarkignore +++ b/.remarkignore @@ -5,6 +5,3 @@ vendor dist build .github - -# Fix case of the files -MIGRATION-* diff --git a/docs/migrations/form-validations/MIGRATION-v1.md b/docs/migrations/form-validations/migration-v1.md similarity index 87% rename from docs/migrations/form-validations/MIGRATION-v1.md rename to docs/migrations/form-validations/migration-v1.md index 91a92445d7..133e92d7b4 100644 --- a/docs/migrations/form-validations/MIGRATION-v1.md +++ b/docs/migrations/form-validations/migration-v1.md @@ -1,3 +1,6 @@ + + + # Migration Guide Introducing version 1 of the _spirit-form-validations_ package diff --git a/docs/migrations/web-react/MIGRATION-v1.md b/docs/migrations/web-react/migration-v1.md similarity index 100% rename from docs/migrations/web-react/MIGRATION-v1.md rename to docs/migrations/web-react/migration-v1.md diff --git a/docs/migrations/web-react/MIGRATION-v2.md b/docs/migrations/web-react/migration-v2.md similarity index 100% rename from docs/migrations/web-react/MIGRATION-v2.md rename to docs/migrations/web-react/migration-v2.md diff --git a/docs/migrations/web-react/MIGRATION-v3.md b/docs/migrations/web-react/migration-v3.md similarity index 100% rename from docs/migrations/web-react/MIGRATION-v3.md rename to docs/migrations/web-react/migration-v3.md diff --git a/docs/migrations/web-twig/MIGRATION-v2.md b/docs/migrations/web-twig/migration-v2.md similarity index 100% rename from docs/migrations/web-twig/MIGRATION-v2.md rename to docs/migrations/web-twig/migration-v2.md diff --git a/docs/migrations/web-twig/MIGRATION-v3.md b/docs/migrations/web-twig/migration-v3.md similarity index 100% rename from docs/migrations/web-twig/MIGRATION-v3.md rename to docs/migrations/web-twig/migration-v3.md diff --git a/docs/migrations/web-twig/MIGRATION-v4.md b/docs/migrations/web-twig/migration-v4.md similarity index 100% rename from docs/migrations/web-twig/MIGRATION-v4.md rename to docs/migrations/web-twig/migration-v4.md diff --git a/docs/migrations/web/MIGRATION-v1.md b/docs/migrations/web/migration-v1.md similarity index 100% rename from docs/migrations/web/MIGRATION-v1.md rename to docs/migrations/web/migration-v1.md diff --git a/docs/migrations/web/MIGRATION-v2.md b/docs/migrations/web/migration-v2.md similarity index 100% rename from docs/migrations/web/MIGRATION-v2.md rename to docs/migrations/web/migration-v2.md diff --git a/docs/migrations/web/MIGRATION-v3.md b/docs/migrations/web/migration-v3.md similarity index 100% rename from docs/migrations/web/MIGRATION-v3.md rename to docs/migrations/web/migration-v3.md