-
Notifications
You must be signed in to change notification settings - Fork 0
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
doc: frontend doc rework #30
doc: frontend doc rework #30
Conversation
1801013
to
1254327
Compare
- Add documentation for templatetags in page so we have full control over formatting. The autofunction solution doesn't work well for templatetags as it can't properly extract any arguments - Add an overview page - Put all API style docs under the API section - Enhance the alliance_ui docs
1254327
to
a1632f1
Compare
this should make it work better with PR previews
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.
Couple typos and a question
- In production it is handled by ``production-ssr-server.ts`` which works with the production built files. | ||
|
||
Currently, the only thing that gets rendered on the server is React components. :class:`~alliance_platform.frontend.templatetags.react.ComponentSSRItem` | ||
is used to describe the component that needs to be rendered. See it's documentation for details on how each component |
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.
Typo: it's -> its
<!-- Named export --> | ||
{% component "components/Table" "Column" %}Header{% endcomponent %} | ||
<!-- Pass a comopnent as a prop to another component --> | ||
{% component "components/Icons" "Menu" as menu_icon %} |
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.
Does this need an endcomponent
tag?
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.
yep, added
|
||
Performs dev specific checks and may render some HTML to communicate messages to user | ||
|
||
Currently check if the dev server is running for this project, and if not displays an error. |
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.
Typo: check -> checks
prefixed with `ssr:` for server side rendering options, `component:` for general component options, or `container:` | ||
for options relating to the container the component is rendered into. | ||
|
||
- ``ssr:disabled=True`` - if specified, no server side rendering will occur for this component |
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.
If rendering on the client, will this automatically handle <Suspense>
and displaying some sort of loading icon? If not, is that something we want to support (perhaps as an additional ssr
argument), or should mention in the documentation?
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.
Suspense isn't applicable here as it's not loading it within a React tree. We could support an option for it, e.g. ssr:placeholder=...
to allow rendering something.
I'll add a note about it when SSR is disabled
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.
#31 tracks this
0709c28
into
fix/render-component-ssr-explicit-disable
Generated docs are here