Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 2.61 KB

CONTRIBUTING.md

File metadata and controls

49 lines (33 loc) · 2.61 KB

Nice to see you want to contribute! 👍

As I do not want to duplicate the instructions all over, please find the common contributors docs here: https://github.com/TinyWebEx/common/blob/master/CONTRIBUTING.md

Some links and potential special rules for this repo only are listed below.

Translations

Coding guidelines

Adding symbol replacements

If you want to add symbols to be replaced, do it like this:

Add the item to the symbols object in the src/common/modules/data/Symbols.js file. The syntax is a simple "key": "value" replacement.

Note: Make sure the key does not conflict with any of the existing symbols. The value must be an Unicode symbol. Note: Emoji autocorrections should instead be added to the Awesome Emoji Picker.

Adding Unicode font conversions

If you want to add a transformation for an Unicode font with a context menu entry, do it like this:

  1. Add the item to the fonts object in the src/common/modules/data/Fonts.js file. The syntax is again a ["key"]: "value" JavaScript object.
  • The key should start with the FONT_ID_PREFIX.
  • The value of the item lists all replacement characters and needs to include either
    1. all uppercase letters (A-Z) in alphabetical order
    2. all upper and lowercase letters (A-Z, a-z) in alphabetical order (all upper case letters first)
    3. all uppercase letters and numbers (A-Z, 0-9) with letters first,
    4. all upper and lowercase letters and numbers (A-Z, a-z, 0-9) in this order or
    5. all printable ASCII characters (!-~).
  1. Add the name to the menuStructure[TRANSFORMATION_TYPE.FONT] array in the same file at the position, where the context menu entry should appear.

Note: Casing transformations do have a different prefix and are separately handling in the source code (src/common/modules/UnicodeTransformationHandler.js), so to change something there, you have to do some “real” code changes.

Tests