-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
draft: updating contributing_to_the_p5js_reference for v2 #8462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev-2.0
Are you sure you want to change the base?
draft: updating contributing_to_the_p5js_reference for v2 #8462
Conversation
e679c39 to
3b8ee24
Compare
|
|
||
| The `@for` tag defines the relationship between this module and the overall `p5` class, effectively saying this module is a part of the `p5` class. | ||
|
|
||
| <!-- TODO: clarify the nature of this relationship documented by the @for tag. Where might this be used - still only in docs? also in type-gen? elsewhere? --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes I think we add it when documentation.js inference fails. The main one I think is in properties of a class that we want to document -- since it doesnt correctly parse when we put the comment block in the class itself, we have to document it outside, and then we need to use @for to attach the docs to the right class.
| The `@requires` tag defines the required imported modules that the current module depends on. | ||
|
|
||
| ``` | ||
| <!-- TODO: clarify where this @requires info is made use of. What responsibilities does the author have to state these correctly and comprehensively? --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not sure we really need this, as we use import now rather than assuming other files will be loaded.
| The website won't be _fully_ functional when partially prepared in this way. Notably: | ||
|
|
||
| * links between pages may be broken | ||
| * You'll need to manually add a trailing slash '/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh we should probably fix that in the website code when we encounter it and not rely on auto adding of the / on deployments, so we can encourage people to file and fix these if they see them!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(we dont make non-trailing-slash urls work on dev because they dont exist on deploys, and it means relative links work differently than when there's a trailing slash, which means something can work locally but break on the live site.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm not clear on this. Do you mean all links in the reference doc comments should be changed to include a trailing slash (in the source code)? Like this:
* <a href="#/p5.Image/">p5.Image</a>
(So far, I think there are zero instances of that in the codebase.)
(low-priority - even if this is so, I'm guessing it doesn't have to make this first v2 overhaul of the guide.)
Update norender to use //META: norender. Remove notest and modernizr completely.
also, hard wrap applyMatrix example for readability correct anchor syntax
…n becomes foo/#section breaks them for browsing in source. fixes them for dev and prod.
Resolves #8454
WIP.
Changes in summary:
changes in more detail
regarding main document: /contributor_docs/contributing_to_the_p5js_reference,
comprehensive overhaul for v2.0 correctness, detail, and (hopefully) readability, as follows:
update first sections
update description section
update the params section
update return section
on code examples:
<div><code>wrapper instructions, removenotest, updatenorenderlabelling.on assets:
document case: instance and static methods have same name
on
@moduleand@submodule- clarified this is a documentation concept, gave examplesdocument
@betaand@deprecatedon how to generate and preview the reference:
add section on linting doc comments
on
@class: add dave's section on creating and documenting classes, from his "jsdoc best practices"on the formatting of the guide itself:
on the sin() example used throughout
add various hyperlinks
v1-v2 differences
regarding document: style guide
foo.md#sectionbecomesfoo/#section)regarding document: jsdoc best practices
PR Checklist
[x] checked for bad links
[x] build:contributor-docs runs
[x] spelling check - (american english)
[ ] grammar check