From bf9d7ee7facc9586776c7cafd44b3a36340ec10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Mon, 2 Jan 2023 17:00:40 +0100 Subject: [PATCH] docs: add RTL and CI errors to contributing guide (#700) --- CONTRIBUTING.md | 15 +++++++++++++++ README.md | 2 ++ 2 files changed, 17 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 80130ff5..59630d0a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,6 +27,21 @@ git checkout -b my-new-branch 7. Run `pnpm dev` in Elk's root folder to start dev server or `pnpm dev:mocked` to start dev server with `@elkdev@universeodon.com` user. +## CI errors + +Sometimes when you push your changes, the CI can fail, but we cannot check the logs to see what went wrong, run the following commands on your local environment: +- `pnpm test:unit` to run unit tests, maybe you also need to update snapshots +- `pnpm test:typecheck` to run TypeScript checks run on CI + +## RTL Support + +Elk supports `right-to-left` languages, we need to make sure that the UI is working correctly in both directions. + +We've added some `UnoCSS` utilities styles to help you with that: +- Do not use `left/right` padding and margin: for example `pl-1`. Use `padding-inline-start/end` instead. So `pl-1` should be `ps-1`, `pr-1` should be `pe-1`. Same rules applies for margin. +- For icons that should be rotated for RTL, add `class="rtl-flip"`. +- For absolute positioned elements, don't use `left/right`: for example `left-0`. Use `inset-inline-start/end` instead. + ## Internalization We are using [vue-i18n](https://vue-i18n.intlify.dev/) via [nuxt-i18n](https://i18n.nuxtjs.org/) to handle internalization. diff --git a/README.md b/README.md index f859bcbd..9f1a8a27 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ pnpm i pnpm run dev ``` +`Warning`: you will need `corepack` enabled, check out the [Elk Contributing Guide](./CONTRIBUTING) for a detailed guide on how to set up the project locally. + We recommend installing [ni](https://github.com/antfu/ni#ni), that will use the right package manager in each of your projects. If `ni` is installed, you can instead run: ```