First off, thanks for taking the time to contribute!
This project and everyone participating in it is governed by the ciphereditor Community Guidelines.
Please follow these steps when creating an issue:
- Make sure your issue hasn't been reported already.
- Please don't report multiple unrelated bugs or requests in a single issue.
- If your issue has security implications please refer to the security policy.
- Follow all instructions in the issue template.
By contributing your code to this repository, you agree to license your contribution under the same license.
Please follow these steps to have your contribution considered:
- Follow the technical assumptions, constraints and styleguides below.
- Write tests for your changes.
- Successfully build the project.
- Create a pull request and follow all instructions in the template.
We target modern browsers that support the native ES Modules, native ESM dynamic import and the import.meta operator.
- Chrome >=87
- Edge >=88
- Safari >=14
- Firefox >=78
- Opera >=54
For more details refer to the Vite docs.
- Use functional style React components with hooks over React component classes.
- Use Pointer events instead of mouse or touch specific events.
- Capitalize comments (“Awesome comment” instead of “awesome comment”).
- Split lines longer than 80 characters into multiple subsequent lines, if possible.
- Avoid trailing whitespaces at the ends of lines.
- Add a single newline character at the end of each file.
When referring to “ciphereditor” use this exact spelling (all lowercase and no space between “cipher” and “editor”).
- Capitalize the subject line
- Use the present tense (“Add feature” instead of “Added feature”)
- Use the imperative mood (“Move cursor to…” instead of “Moves cursor to…”)
- Do not end the subject line with a period
- Limit the first line to 72 characters or less
All JavaScript, JSX and TypeScript must adhere to the Standard Style.
Additional rules:
- Never omit curly braces around blocks (e.g. after control statements like
if
,for
,while
, anddo
), even when they are optional.
Naming conventions:
- When dealing with Zod schema objects use the naming pattern
${typeName}Schema
with a lowercase first character. Example: The Zod schema for the TypeScript typeBlueprintValue
is calledblueprintValueSchema
. Instances ofBlueprintValue
may be calledblueprintValue
. - Use a
View
suffix when naming React components to avoid mixing them up with equally named object types (OperationView
instead ofOperation
)
We use Sass with the SCSS syntax for CSS style generation and follow the BEM methodology (introducing blocks, elements and modifiers) with the Two Dashes style to organize and name our CSS classes.
- Introduce new BEM blocks or elements instead of using HTML tags as selectors to keep the CSS specificity flat. Default styles for HTML tags go to
generics.scss
.
Wearing nice sneakers while coding is not a requirement but it is very much appreciated.