Adds contribution guidelines to VueUI (#6915)

This needs to be added, because documentation.
This commit is contained in:
Karolis
2019-09-29 13:29:38 +03:00
committed by Erki
parent 66a6e32ca9
commit e26585d6cc
+21
View File
@@ -219,3 +219,24 @@ for (var/client/C in world)
All tables for the database should be prefixed according to the following list:
* `ss13_` for tables in which ingame data is held.
* `discord_` for tables in which BOREALIS data is held.
# HTML UI Standards
### UI conversion policy
Due to our current situation with 5 different HTML UI systems we are now enforcing a policy that all new UIs should be made using the VueUi UI system. This policy also applies to editing existing UIs, with the following exceptions:
1. Modification is security / severe bug fix.
0. It is typo fix.
0. Touched UI file is too large.
0. VueUi can't accommodate that type of UI.
### Responsiveness
All new UIs must be responsive, that means that when parameters change in game world, UI data must update as quickly as possible to reflect that change. If change is time dependant, then client side time approximation should be used.
### Conditional usage policy
If you need to use conditional rendering inside UI, then try to put conditional statements on elements you want to hide, then try using `<template>` to apply condition to multiple components.
For conditional rendering try to prefer to use `v-show` attribute when change is expected to be often occurring. Use `v-if` when you need `v-else` and switch is expected expected not often.
### Reusability
If there is segment of UI that is used multiple times with different content, then we strongly encourage making of new component. If that component is general or may be reused globally, then it should be made in to global component (placed in `vui` folder), else it should be made in to UI specific component that must be placed in folder inside `view` folder.