Skip to content

Commit

Permalink
Update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ricktu288 committed May 21, 2024
1 parent c3028b6 commit d619012
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ For direct contributions, see the following guidelines.

1. Fork this repo and clone locally. If you have forked previously, sync to get the latest changes.

2. Add a script <code><var>TOOL_ID</var>.js</code> in `simulator/js/objs`, where <code><var>TOOL_ID</var></code> is the id of the new tool, and write the code there. See the README there for a correspondence between the id with the name of the existing tools on the toolbar.
2. Add a script <code><var>TOOL_ID</var>.js</code> in a subfolder of `simulator/js/objs`, where <code><var>TOOL_ID</var></code> is the id of the new tool, and write the code there.

3. Add a script tag in `simulator/index.html` for the new tool.

4. Add the locale strings for the tool to `simulator/locales/en.js`:
- <code>toolname_<var>TOOL_ID</var></code>: the label on the parameter bar when the object is selected
- <code>toolname_<var>TOOL_ID</var></code>: the label on the object bar when the object is selected
- If the tool has some new parameters, add the strings for them.

After the steps above, The new tool can be tested by opening `simulator/index.html` locally in your browser and executing <code>AddingObjType = '<var>TOOL_ID</var>'</code> with the developer tool to choose the tool, without being on the toolbar.
Expand Down Expand Up @@ -121,6 +121,6 @@ If you modified some existing tools/components, make sure that the following are

1. If a file is saved before the modification, it should be readable by the app after the modification, with the logic unmodified.
2. After opening such a file, the appearance within the canvas when none of the objects are selected and the mouse is not over any object should be essentially the same as before the modification (except for quality improvement and bug fixing.)
3. If the default appearance of a tool (the appearance of an object newly created with the tool, without selection or mouse hovering) is modified, there should be a way to recover the original appearance, such as with a checkbox in the parameter box.
3. If the default appearance of a tool (the appearance of an object newly created with the tool, without selection or mouse hovering) is modified, there should be a way to recover the original appearance, such as with a checkbox in the object bar.

For a feature marked as "beta" and for parameters outside the range of the sliders, 2. and 3. do not apply.

0 comments on commit d619012

Please sign in to comment.