diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 34a612bfdc..cd28a7f11c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ Here are some tips how to make your contributing efforts efficient and eventuall This project uses `makefile` for managing various chores, like dependency installation, testing, linting etc. Make sure you run `make` right after you clone the repository - it will set you up with everything needed to get started. Once you are done with that, have a look at what commands (targets) are available for you to run using `make` - `make install` etc. -## [Decisions](./docs/decisions/README.md) +## [Decisions](https://github.com/lmc-eu/spirit-design-system/blob/main/docs/decisions/README.md) The reasoning behind various decisions made for the Spirit Design System. A good historical record. diff --git a/DEPRECATIONS-v3.md b/DEPRECATIONS-v3.md index e206a819da..468e52c4e9 100644 --- a/DEPRECATIONS-v3.md +++ b/DEPRECATIONS-v3.md @@ -6,8 +6,10 @@ Introducing deprecations and feature flags to be removed in the version 3 lists. ## spirit-web-twig v3 -- [Deprecations](./packages/web-twig/DEPRECATIONS-v3.md) +- [Deprecations][web-twig-deprecations] --- Please refer back to this list or reach out to our team if you encounter any issues during migration. + +[web-twig-deprecations]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/DEPRECATIONS.md diff --git a/MIGRATION.md b/MIGRATION.md index 636ba42f83..264d0657d6 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,3 +1,5 @@ # Migration Guides -Check the [`docs/migrations`](./docs/migrations/) directory to find migration guides for new versions of all packages. +Check the [`docs/migrations`][docs-migrations] directory to find migration guides for new versions of all packages. + +[docs-migrations]: https://github.com/lmc-eu/spirit-design-system/blob/main/docs/migrations/README.md diff --git a/README.md b/README.md index 96231e69da..9966653840 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ ### Spirit Design System -[![Maintained with Lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org) -[![Code Quality Checks](https://github.com/lmc-eu/spirit-design-system/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/lmc-eu/spirit-design-system/actions) -[![Coverage Status](https://coveralls.io/repos/github/lmc-eu/spirit-design-system/badge.svg?branch=main)](https://coveralls.io/github/lmc-eu/spirit-design-system?branch=main) +[![Maintained with Lerna][lerna-svg]][lerna] +[![Code Quality Checks][code-quality-checks-svg]][code-quality-checks] +[![Coverage Status][coverage-status-svg]][coverage-status] Spirit is an open-source design system developed by [Alma Career (formerly LMC)][alma-career]. @@ -17,25 +17,25 @@ See individual [packages](#packages) to learn how to get started. ## Packages -| Package name | Description | Version | -| ---------------------------------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------------- | -| [`@lmc-eu/spirit-analytics`](./packages/analytics) | Analytic tools for Spirit Design System | [![@lmc-eu/spirit-analytics][sa-badge]][sa-npm] | -| [`@lmc-eu/spirit-codemods`](./packages/codemods) | Codemod transforms for Spirit Design System version migration | [![@lmc-eu/spirit-codemods][sc-badge]][sc-npm] | -| [`@lmc-eu/spirit-common`](./packages/common) | Common scripts for Spirit Design System | Private | -| [`@lmc-eu/spirit-design-tokens`](./packages/design-tokens) | Design tokens for Spirit Design System | [![@lmc-eu/spirit-design-tokens][sdt-badge]][sdt-npm] | -| [`@lmc-eu/spirit-form-validations`](./packages/form-validations) | Form Validations for Spirit Design System | [![@lmc-eu/spirit-form-validations][sfv-badge]][sfv-npm] | -| [`@lmc-eu/spirit-icons`](./packages/icons) | Icons for Spirit Design System | [![@lmc-eu/spirit-icons][si-badge]][si-npm] | -| [`@lmc-eu/spirit-web`](./packages/web) | CSS and vanilla JS implementation of Spirit Design System | [![@lmc-eu/spirit-web][sw-badge]][sw-npm] | -| [`@lmc-eu/spirit-web-react`](./packages/web-react) | React implementation of Spirit Design System components | [![@lmc-eu/spirit-web-react][swr-badge]][swr-npm] | -| [`@lmc-eu/spirit-web-twig`](./packages/web-twig) | Twig implementation of Spirit Design System components | [![@lmc-eu/spirit-web-twig][swt-badge]][swt-packagist] | +| Package name | Description | Version | +| -------------------------------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------------- | +| [`@lmc-eu/spirit-analytics`][packages-analytics] | Analytic tools for Spirit Design System | [![@lmc-eu/spirit-analytics][sa-badge]][sa-npm] | +| [`@lmc-eu/spirit-codemods`][packages-codemods] | Codemod transforms for Spirit Design System version migration | [![@lmc-eu/spirit-codemods][sc-badge]][sc-npm] | +| [`@lmc-eu/spirit-common`][packages-common] | Common scripts for Spirit Design System | Private | +| [`@lmc-eu/spirit-design-tokens`][packages-design-tokens] | Design tokens for Spirit Design System | [![@lmc-eu/spirit-design-tokens][sdt-badge]][sdt-npm] | +| [`@lmc-eu/spirit-form-validations`][packages-form-validations] | Form Validations for Spirit Design System | [![@lmc-eu/spirit-form-validations][sfv-badge]][sfv-npm] | +| [`@lmc-eu/spirit-icons`][packages-icons] | Icons for Spirit Design System | [![@lmc-eu/spirit-icons][si-badge]][si-npm] | +| [`@lmc-eu/spirit-web`][packages-web] | CSS and vanilla JS implementation of Spirit Design System | [![@lmc-eu/spirit-web][sw-badge]][sw-npm] | +| [`@lmc-eu/spirit-web-react`][packages-web-react] | React implementation of Spirit Design System components | [![@lmc-eu/spirit-web-react][swr-badge]][swr-npm] | +| [`@lmc-eu/spirit-web-twig`][packages-web-twig] | Twig implementation of Spirit Design System components | [![@lmc-eu/spirit-web-twig][swt-badge]][swt-packagist] | ## Development ### Prerequisites -- [NodeJS](https://nodejs.org) -- [Yarn](https://yarnpkg.com) -- [Lerna](https://lerna.js.org) +- [NodeJS][nodejs] +- [Yarn][yarn] +- [Lerna][lerna] ### Start Development @@ -44,13 +44,31 @@ See individual [packages](#packages) to learn how to get started. - `yarn install` - `yarn start` -See [`package.json`](./package.json) for all available tasks. +See [`package.json`][package.json] for all available tasks. ## License -See the [LICENSE](LICENSE.md) file for information. +See the [LICENSE][license] file for information. [alma-career]: https://github.com/lmc-eu +[code-quality-checks]: https://github.com/lmc-eu/spirit-design-system/actions +[code-quality-checks-svg]: https://github.com/lmc-eu/spirit-design-system/actions/workflows/test.yaml/badge.svg?branch=main +[coverage-status]: https://coveralls.io/github/lmc-eu/spirit-design-system?branch=main +[coverage-status-svg]: https://coveralls.io/repos/github/lmc-eu/spirit-design-system/badge.svg?branch=main +[lerna]: https://lerna.js.org +[lerna-svg]: https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg +[license]: https://github.com/lmc-eu/spirit-design-system/blob/main/LICENSE.md +[nodejs]: https://nodejs.org +[packages-analytics]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/analytics +[packages-codemods]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/codemods +[packages-common]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/common +[packages-design-tokens]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/design-tokens +[packages-form-validations]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/form-validations +[packages-icons]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/icons +[packages-web]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web +[packages-web-react]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web-react +[packages-web-twig]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web-twig +[package.json]: https://github.com/lmc-eu/spirit-design-system/blob/main/package.json [sa-badge]: https://img.shields.io/npm/v/%40lmc-eu/spirit-analytics.svg?style=flat-square [sa-npm]: https://www.npmjs.com/package/@lmc-eu/spirit-analytics [sc-badge]: https://img.shields.io/npm/v/%40lmc-eu/spirit-codemods.svg?style=flat-square @@ -67,3 +85,4 @@ See the [LICENSE](LICENSE.md) file for information. [swr-npm]: https://www.npmjs.com/package/@lmc-eu/spirit-web-react [swt-badge]: https://img.shields.io/packagist/v/lmc/spirit-web-twig-bundle.svg?style=flat-square [swt-packagist]: https://packagist.org/packages/lmc/spirit-web-twig-bundle +[yarn]: https://yarnpkg.com diff --git a/configs/jest-config-spirit/README.md b/configs/jest-config-spirit/README.md index ab5c8b7122..e9f8281970 100644 --- a/configs/jest-config-spirit/README.md +++ b/configs/jest-config-spirit/README.md @@ -45,5 +45,5 @@ check out our [Contributing Guide][contributing]! 👀 Licensed under the [MIT][license]. [yarn]: https://yarnpkg.com/en/ -[contributing]: /CONTRIBUTING.md -[license]: /LICENSE.md +[contributing]: https://github.com/lmc-eu/spirit-design-system/blob/main/CONTRIBUTING.md +[license]: https://github.com/lmc-eu/spirit-design-system/blob/main/LICENSE.md diff --git a/configs/prettier-config-spirit/README.md b/configs/prettier-config-spirit/README.md index 3719afc91e..2866daac57 100644 --- a/configs/prettier-config-spirit/README.md +++ b/configs/prettier-config-spirit/README.md @@ -33,5 +33,5 @@ check out our [Contributing Guide][contributing]! 👀 Licensed under the [MIT][license]. [yarn]: https://yarnpkg.com/en/ -[contributing]: /CONTRIBUTING.md -[license]: /LICENSE.md +[contributing]: https://github.com/lmc-eu/spirit-design-system/blob/main/CONTRIBUTING.md +[license]: https://github.com/lmc-eu/spirit-design-system/blob/main/LICENSE.md diff --git a/configs/stylelint-config-spirit/README.md b/configs/stylelint-config-spirit/README.md index baf87f8839..e43207c14c 100644 --- a/configs/stylelint-config-spirit/README.md +++ b/configs/stylelint-config-spirit/README.md @@ -33,5 +33,5 @@ check out our [Contributing Guide][contributing]! 👀 Licensed under the [MIT][license]. [yarn]: https://yarnpkg.com/en/ -[contributing]: /CONTRIBUTING.md -[license]: /LICENSE.md +[contributing]: https://github.com/lmc-eu/spirit-design-system/blob/main/CONTRIBUTING.md +[license]: https://github.com/lmc-eu/spirit-design-system/blob/main/LICENSE.md diff --git a/docs/decisions/README.md b/docs/decisions/README.md index 9e3658d552..010cd0c648 100644 --- a/docs/decisions/README.md +++ b/docs/decisions/README.md @@ -4,9 +4,11 @@ ### And I've got opinions... -![](./opinions.png) +![][opinions-image] This directory contains all the decisions we've made for this design system as a record for whenever we wonder why certain decisions were made. Decisions here are never final. But these documents should serve as a good way for someone to come up to speed on why certain decisions were made. + +[opinions-image]: https://github.com/lmc-eu/spirit-design-system/blob/main/docs/decisions/opinions.png?raw=true diff --git a/docs/postmortems/README.md b/docs/postmortems/README.md index 5e8dffecdb..82da3a9dc9 100644 --- a/docs/postmortems/README.md +++ b/docs/postmortems/README.md @@ -22,4 +22,4 @@ topic. [learning-from-failure]: https://landing.google.com/sre/sre-book/chapters/postmortem-culture/ [sre-book]: https://landing.google.com/sre/sre-book/chapters/postmortem/ -[postmorem-template]: ./0000-00-00-template.md +[postmortem-template]: https://github.com/lmc-eu/spirit-design-system/blob/main/docs/postmortems/0000-00-00-template.md diff --git a/packages/codemods/README.md b/packages/codemods/README.md index 7804c516ec..a010d32efb 100644 --- a/packages/codemods/README.md +++ b/packages/codemods/README.md @@ -41,6 +41,6 @@ npx @lmc-eu/spirit-codemods -p ./src -t v2/web-react/fileuploader-prop-names -e ## Available Scripts -- [Web-React v2 Codemods](./src/transforms/v2/web-react/README.md) +- [Web-React v2 Codemods](https://github.com/lmc-eu/spirit-design-system/blob/main/packages/codemods/src/transforms/v2/web-react/README.md) [jscodeshift]: https://github.com/facebook/jscodeshift diff --git a/packages/codemods/src/transforms/v2/web-react/README.md b/packages/codemods/src/transforms/v2/web-react/README.md index e37bb60e5e..753e4af09f 100644 --- a/packages/codemods/src/transforms/v2/web-react/README.md +++ b/packages/codemods/src/transforms/v2/web-react/README.md @@ -2,7 +2,7 @@ This is a collection of codemods for updating Web-React v2 components. -You can find instructions on how to run these codemods in the main package [README](./../../../../README.md). +You can find instructions on how to run these codemods in the main package [README](https://github.com/lmc-eu/spirit-design-system/blob/main/packages/codemods/README.md). ## Included Scripts diff --git a/packages/web-twig/CONTRIBUTING.md b/packages/web-twig/CONTRIBUTING.md index d1c4645c17..85ec8c0c8d 100644 --- a/packages/web-twig/CONTRIBUTING.md +++ b/packages/web-twig/CONTRIBUTING.md @@ -10,7 +10,7 @@ To start this project simply run `make start` and then add project certificates In a moment the app will be setup and ready on `https://localhost:4443`. -Please consult [`Makefile`](./Makefile) for available commands and options to setup and run this project. +Please consult [`Makefile`][makefile] for available commands and options to setup and run this project. ## Components definition @@ -34,7 +34,7 @@ This is an example of a typical file structure of a component: ## Rules in components 1. Name of components must be camelCase with first letter small. -2. New components must contain a property class so that they can be extended according to the [instructions](./docs/extendComponents.md) +2. New components must contain a property class so that they can be extended according to the [instructions](https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/docs/extendComponents.md) ```twig {% set _class = (props.class is defined) ? ' ' ~ props.class : '' -%} @@ -66,11 +66,11 @@ Instead use: {%- set _ariaHidden = props.ariaHidden ?? true -%} ``` -See [default filter does not work issue](https://github.com/twigphp/Twig/issues/769) and [Twig default filter documentation](https://twig.symfony.com/doc/2.x/filters/default.html) for more information +See [default filter does not work issue][default-filter-issue] and [Twig default filter documentation][default-filter-documentation] for more information ### Unescaped Props -🚨 All props that uses [raw](https://twig.symfony.com/doc/3.x/filters/raw.html) filter must be prefixed with `UNSAFE_`. +🚨 All props that uses [raw][raw] filter must be prefixed with `UNSAFE_`. These props are unescaped. For example we used this prefix for props that can accept HTML string. @@ -142,7 +142,7 @@ It is balanced between the DRY principle and how the PHPUnit works. ## Release new version -TODO: [Automate release process](https://github.com/lmc-eu/spirit-design-system/issues/393). +TODO: [Automate release process][automate-release-process]. As we are now using only `dev-main` version of this package, until we have stable release process, we are not able to release new version with release script and tag it. @@ -167,3 +167,9 @@ Force push current changes to remote using subtree: Or - use `make publish pkg=web-twig` in repository root to publish changes to remote. + +[automate-release-process]: https://github.com/lmc-eu/spirit-design-system/issues/393 +[default-filter-issue]: https://github.com/twigphp/Twig/issues/769 +[default-filter-documentation]: https://twig.symfony.com/doc/2.x/filters/default.html +[makefile]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/Makefile +[raw]: https://twig.symfony.com/doc/3.x/filters/raw.html diff --git a/packages/web-twig/README.md b/packages/web-twig/README.md index 06609af6a8..bdbabd9a85 100644 --- a/packages/web-twig/README.md +++ b/packages/web-twig/README.md @@ -10,7 +10,7 @@ This is a Symfony bundle with Twig implementation of [Spirit Design System] comp ## Changelog -See [CHANGELOG](./CHANGELOG.md) +See [CHANGELOG][changelog] ## How to install @@ -60,11 +60,11 @@ spirit_web_twig: ## Usage -For detailed usage see [TwigX bundle](https://github.com/lmc-eu/twigx-bundle/blob/main/README.md#usage) +For detailed usage see [TwigX bundle][twigx-bundle] ### Unescaped Props -All props that internally uses the [raw](https://twig.symfony.com/doc/3.x/filters/raw.html) filter are prefixed with `UNSAFE_`. +All props that internally uses the [raw][raw] filter are prefixed with `UNSAFE_`. This is considered a way how you can pass down HTML strings. ```twig @@ -73,10 +73,10 @@ This is considered a way how you can pass down HTML strings. # Spirit Components -For available components see the [components directory](https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web-twig/src/Resources/components). +For available components see the [components directory][components-directory]. -if you want to extend these components, an example guide is [here](./docs/extendComponents.md). -if you want to contribute, read the guide [here](./CONTRIBUTING.md). +if you want to extend these components, an example guide is [here][example-guide]. +if you want to contribute, read the guide [here][contributing]. ## Additional Attributes @@ -155,5 +155,11 @@ Check your Symfony console or log to see if you are using any of the deprecated ![Deprecations in Symfony's console](https://github.com/lmc-eu/spirit-design-system/blob/main/static/deprecations-symfony-console.png?raw=true) +[changelog]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/CHANGELOG.md +[components-directory]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web-twig/src/Resources/components +[contributing]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/CONTRIBUTING.md +[example-guide]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-twig/docs/extendComponents.md +[raw]: https://twig.symfony.com/doc/3.x/filters/raw.html [spirit design system]: https://github.com/lmc-eu/spirit-design-system +[twigx-bundle]: https://github.com/lmc-eu/twigx-bundle/blob/main/README.md#usage [web-pkg-rebrand]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web#rebranding diff --git a/packages/web/README.md b/packages/web/README.md index c951d720e5..17ea959d8d 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -178,7 +178,7 @@ The dev-stack is based on [Vite]. This package uses the deprecation warnings for props, functions and components that will be removed or replaced in the next major release. Check your browser console to see if you are using any of the deprecated functionality. -![Deprecations in the Browser's console](https://github.com/lmc-eu/spirit-design-system/blob/main/static/deprecations-browser-console.png?raw=true) +![Deprecations in the Browser's console][deprecations] ## Feature Flags @@ -190,12 +190,14 @@ Check your browser console to see if you are using any of the deprecated functio ## License -See the [LICENSE](LICENSE.md) file for information. +See the [LICENSE][license] file for information. [configuring-load-path]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/design-tokens#configuring-load-path -[feature-flags-docs]: ../../docs/contributtion/feature-flags.md -[tokens-api]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/design-tokens#tokens-api -[rebranding]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/design-tokens#b-via-load-path +[deprecations]: https://github.com/lmc-eu/spirit-design-system/blob/main/static/deprecations-browser-console.png?raw=true [examples]: https://spirit-design-system.netlify.app/packages/web/ +[feature-flags-docs]: https://github.com/lmc-eu/spirit-design-system/blob/main/docs/contributtion/feature-flags.md +[license]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web/LICENSE.md [postcss-prefix-selector]: https://www.npmjs.com/package/postcss-prefix-selector +[rebranding]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/design-tokens#b-via-load-path +[tokens-api]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/design-tokens#tokens-api [vite]: https://vitejs.dev