mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-10 19:09:58 +00:00
docs: add RTL and CI errors to contributing guide (#700)
This commit is contained in:
parent
2756732c33
commit
bf9d7ee7fa
2 changed files with 17 additions and 0 deletions
|
@ -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.
|
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
|
## Internalization
|
||||||
|
|
||||||
We are using [vue-i18n](https://vue-i18n.intlify.dev/) via [nuxt-i18n](https://i18n.nuxtjs.org/) to handle internalization.
|
We are using [vue-i18n](https://vue-i18n.intlify.dev/) via [nuxt-i18n](https://i18n.nuxtjs.org/) to handle internalization.
|
||||||
|
|
|
@ -38,6 +38,8 @@ pnpm i
|
||||||
pnpm run dev
|
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:
|
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:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue