Skip to content

Commit c9facfc

Browse files
committed
fix doc
1 parent 3f56555 commit c9facfc

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

contributor_docs/accessibility.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ The code for the p5.js web editor adheres to web accessibility standards. The fo
88

99
* Screen Readers are an assistive technology for vision loss that helps users to navigate a web page. They are able to prioritize content based on the semantic meaning of HTML tags. Therefore, it is important to use specific tags, such as `nav`, `ul`, `li`, `section`, and so on. `div` is the least screen reader-friendly tag. For example, [here is the semantic meaning of the `body` tag](http://html5doctor.com/element-index/#body)
1010
* All buttons/links/windows need to be accessible by the keyboard ( By tabbing, pressing space etc.)
11-
* In cases where tags are not screen reader-friendly, we can take advantage of [tabIndex](http://webaim.org/techniques/keyboard/tabindex). Using tabIndex ensures that all elements are accessible via keyboard. [code example](https://github.com/processing/p5.js-web-editor/blob/develop/client/modules/IDE/components/Editor.jsx#L249)
12-
* When opening a new window or pop up window, ensure the keyboard focus also moves to the new window. [code example](https://github.com/processing/p5.js-web-editor/blob/develop/client/modules/IDE/components/NewFileForm.jsx#L16)
11+
* In cases where tags are not screen reader-friendly, we can take advantage of [tabIndex](http://webaim.org/techniques/keyboard/tabindex). Using tabIndex ensures that all elements are accessible via keyboard. [code example](https://github.com/processing/p5.js-web-editor/blob/develop/client/modules/IDE/components/Sidebar.jsx#L88)
12+
* When opening a new window or pop up window, ensure the keyboard focus also moves to the new window. [code example](https://github.com/processing/p5.js-web-editor/blob/develop/client/modules/IDE/components/NewFileForm.jsx#L32)
1313

1414
**Labeling**
1515

1616
* When creating button icons, images, or something without text (this does not include an HTML5 `<button>`), use [aria-labels](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute). [code example](https://github.com/processing/p5.js-web-editor/blob/develop/client/modules/IDE/components/Toolbar.jsx#L67)
17-
* All `<table>`s need to have a `summary` attribute. This will ensure user is given context to what the table is. [code example](https://github.com/processing/p5.js-web-editor/blob/develop/client/modules/IDE/components/SketchList.jsx#L39)
18-
* `ul`s and `nav`s menus need to include a title. [code example](https://github.com/processing/p5.js-web-editor/blob/develop/client/components/Nav.jsx#L7)
17+
* All `<table>`s need to have a `summary` attribute. This will ensure user is given context to what the table is. [code example](https://github.com/processing/p5.js-web-editor/blob/develop/client/modules/IDE/components/SketchList.jsx#L491)
18+
* `ul`s and `nav`s menus need to include a title. [code example](https://github.com/processing/p5.js-web-editor/blob/develop/client/components/Nav.jsx#L281)
1919

2020
For more information on accessibility see the [teach access tutorial](https://teachaccess.github.io/tutorial/)

contributor_docs/development.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ See the [release guide](./release.md) for information about creating a release.
3030
## Tests
3131
To run the test suite simply run `npm test` (after installing dependencies with `npm install`)
3232

33-
A sample unit test could be found here: [Nav.test.jsx](../client/components/__test__/Nav.test.jsx).
33+
A sample unit test could be found here: [Nav.unit.test.jsx](../client/components/Nav.unit.test.jsx).
3434

3535
## Committing Code
3636
Inspired by [Git/GitHub commit standards & conventions](https://gist.github.com/digitaljhelms/3761873).
@@ -73,7 +73,7 @@ Structure your commit message like this:
7373
* Note that you can connect multiple issues to a commit, if necessary: `[#123][#456] Add Button component`
7474

7575
## Design
76-
- [Style Guide/Design System on Figma](https://github.com/processing/p5.js-web-editor/labels/good%20medium%20issues)
76+
- [Style Guide/Design System on Zeplin](https://scene.zeplin.io/project/55f746c54a02e1e50e0632c3)
7777
- [Latest Design on Figma](https://www.figma.com/file/5KychMUfHlq97H0uDsen1U/p5-web-editor-2017.p.copy?node-id=0%3A1). Note that the current design on the website has diverged, parts of this design will not be implemented, but it is still helpful to have around for reference.
7878
- [Mobile Designs](https://www.figma.com/file/5KychMUfHlq97H0uDsen1U/p5-web-editor-2017.p.copy?node-id=0%3A2529), [Responsive Designs](https://www.figma.com/file/5KychMUfHlq97H0uDsen1U/p5-web-editor-2017.p.copy?node-id=0%3A3292)
7979

contributor_docs/installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Note that this takes up a significant amount of space on your machine. Make sure
4949
3. Clone this repository and cd into it
5050
4. `$ docker-compose -f docker-compose-development.yml build`
5151
5. `$ cp .env.example .env`
52-
6. (Optional) Update `.env` with necessary keys to enable certain app behavoirs, i.e. add Github ID and Github Secret if you want to be able to log in with Github.
52+
6. (Optional) Update `.env` with necessary keys to enable certain app behaviors, i.e. add Github ID and Github Secret if you want to be able to log in with Github.
5353
7. `$ docker-compose -f docker-compose-development.yml run --rm app npm run fetch-examples` - note that you need to configure your GitHub Credentials, which you can do by following the [Github API Configuration](#github-api-configuration) section.
5454
8. Enable Prettier in your text editor by following [this guide](https://prettier.io/docs/en/editors.html).
5555

contributor_docs/public_api.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The API is versioned and this version is indicated in the root URL path e.g. ver
2222
You must provide the version number when accessing the API.
2323

2424
| Version | Release date |
25-
| ------- | ------------ |
25+
|---------|--------------|
2626
| v1 | Unreleased |
2727

2828
# Models
@@ -31,8 +31,8 @@ The API accepts and returns the following model objects, as JSON.
3131

3232
## Sketch
3333

34-
| Name | Type | Description |
35-
| ----- | ----------------- | ------------------------------------------------------------------------------------ |
34+
| Name | Type | Description |
35+
|-------|-------------------|--------------------------------------------------------------------------------------|
3636
| name | String | The sketch’s title |
3737
| files | DirectoryContents | The files and directories in this sketch. See `DirectoryContents` for the structure. |
3838
| slug | String | A path that can be used to access the sketch |
@@ -71,7 +71,7 @@ A map of filenames to `File` or `Directory`. The key of each item is used as the
7171
This file is editable in the Editor UI and stored in the Editor's database.
7272

7373
| Name | Type | Description |
74-
| ------- | ------------ | ------------------------------------------ |
74+
|---------|--------------|--------------------------------------------|
7575
| content | UTF-8 String | The contents of the file as a UTF-8 string |
7676

7777
{
@@ -83,8 +83,8 @@ This file is editable in the Editor UI and stored in the Editor's database.
8383
This file is hosted elsewhere on the Internet. It appears in the Editor's listing and can be referenced using a proxy URL in the Editor.
8484

8585

86-
| Name | Type | Description |
87-
| ---- | ---- | ----------------------------------------------- |
86+
| Name | Type | Description |
87+
|------|------|-------------------------------------------------|
8888
| url | URL | A valid URL pointing to a file hosted elsewhere |
8989

9090
{
@@ -98,7 +98,7 @@ A `File` is either a `DirectFile` or `ReferencedFile`. The API supports both eve
9898
## Directory
9999

100100
| Name | Type | Description |
101-
| ----- | ----------------- | ------------------------------- |
101+
|-------|-------------------|---------------------------------|
102102
| files | DirectoryContents | A map of the directory contents |
103103

104104
{
@@ -183,8 +183,8 @@ See `Sketch` in Models above.
183183

184184
### Responses
185185

186-
| HTTP code | Body |
187-
| ------------------------ | ----------------------------------------------------------------- |
186+
| HTTP code | Body |
187+
|--------------------------|-------------------------------------------------------------------|
188188
| 201 Created | id of sketch |
189189
| 422 Unprocessable Entity | file validation failed, unsupported filetype, slug already exists |
190190

@@ -214,6 +214,6 @@ No body
214214
### Responses
215215

216216
| HTTP code | Description |
217-
| ------------- | ----------------------- |
217+
|---------------|-------------------------|
218218
| 200 OK | Sketch has been deleted |
219219
| 404 Not Found | Sketch does not exist |

contributor_docs/public_api_proposed.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Returns `Sketch`.
4343
### Responses
4444

4545
| HTTP code | Description |
46-
| ------------- | ---------------------------- |
46+
|---------------|------------------------------|
4747
| 200 OK | Returns ID of created sketch |
4848
| 404 Not Found | Sketch does not exist |
4949

@@ -73,7 +73,7 @@ No body.
7373
### Responses
7474

7575
| HTTP code | Description |
76-
| ------------------------ | -------------------------------------------- |
76+
|--------------------------|----------------------------------------------|
7777
| 200 OK | |
7878
| 404 Not Found | Sketch does not exist |
7979
| 422 Unprocessable Entity | file validation failed, unsupported filetype |
@@ -116,7 +116,7 @@ Add a file to a sketch, or replace an existing file.
116116
### Responses
117117

118118
| HTTP code | Description |
119-
| ------------------------ | ------------------------- |
119+
|--------------------------|---------------------------|
120120
| 200 OK | Change were made |
121121
| 404 Not Found | Sketch does not exist |
122122
| 422 Unprocessable Entity | Validation error of files |
@@ -147,7 +147,7 @@ Returns file contents.
147147
### Responses
148148

149149
| HTTP code | Description |
150-
| ------------- | ------------------------------------------------------------------------ |
150+
|---------------|--------------------------------------------------------------------------|
151151
| 200 OK | Returns body of the file with the content-type set by the file extension |
152152
| 404 Not Found | File does not exist |
153153

@@ -198,7 +198,7 @@ Files are added to the directory, in addition to what is there.
198198
### Responses
199199

200200
| HTTP code | Description |
201-
| ------------------------ | -------------------------- |
201+
|--------------------------|----------------------------|
202202
| 200 OK | The changes have been made |
203203
| 404 Not Found | Path does not exist |
204204
| 422 Unprocessable Entity | Validation error of files |
@@ -230,7 +230,7 @@ The `assets` directory and everything within it, will be removed.
230230
### Responses
231231

232232
| HTTP code | Description |
233-
| ------------- | ------------------------- |
233+
|---------------|---------------------------|
234234
| 200 OK | The item has been deleted |
235235
| 404 Not Found | Path does not exist |
236236

contributor_docs/translations.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In order to simplify the translations process the following rules of thumb were
1010
## Technical Part
1111

1212
* There is only one file to translate all the texts in any specific language, which is located under the directory, in the respective locale [subdirectory](https://github.com/processing/p5.js-web-editor/tree/develop/translations/locales)
13-
* The new language code must be added to [client/i18n.js](https://github.com/processing/p5.js-web-editor/blob/develop/client/i18n.js#L8)
13+
* The new language code must be added to [client/i18n.js](https://github.com/processing/p5.js-web-editor/blob/develop/client/i18n.js#L22)
1414
* New languages will need to be selected using a dropdown in the Nav component, specifically in function [renderLanguageMenu.](https://github.com/processing/p5.js-web-editor/blob/develop/client/components/Nav.jsx#L611)
1515
* Need to add `TRANSLATIONS_ENABLED=true` to `.env` to activate the dropdown for the languages.
1616

@@ -42,7 +42,7 @@ export function languageKeyToDateLocale(lang) {
4242
const languageMap = {
4343
'en-US': enUS,
4444
'es-419': es,
45-
'ja': ja
45+
'ja': ja,
4646
'newLanguage': newLanguage
4747
};
4848
return languageMap[lang];

0 commit comments

Comments
 (0)