Conversation
|
For the 'Resource preloading' doc. I've reworded a large chunk of content to make the flow better and to have different sections. As for the 'Library mode' doc, I've added subsection and a few more lines of content to make the flow better. |
sites/cheerpj/src/content/docs/11-guides/Startup-time-optimization.md
Outdated
Show resolved
Hide resolved
epanholz
left a comment
There was a problem hiding this comment.
Please also review if the example of the standard Java library works well, same for the itext example. I remember vaguely that one of the examples needed some adjustments but I am unsure.
sites/cheerpj/src/content/docs/11-guides/Startup-time-optimization.md
Outdated
Show resolved
Hide resolved
sites/cheerpj/src/content/docs/11-guides/Startup-time-optimization.md
Outdated
Show resolved
Hide resolved
sites/cheerpj/src/content/docs/11-guides/Startup-time-optimization.md
Outdated
Show resolved
Hide resolved
I’ve double-checked both examples, and they work as expected. However, since we currently only provide the JavaScript snippets, I think including a minimal HTML wrapper for each example would make it easier for readers to follow along. Especially for the iText example. |
|
Hey Rijul, let me know over DM when you want me to review and merge this PR |
|
Hey @GabrielaReyna, I still needed to review some things and will also merge the PR once done. I did not get notification for the re-review that's why it's open for a few days now, by bad. |
I think that makes a lot of sense. Please add that too. |
epanholz
left a comment
There was a problem hiding this comment.
The guides look really good now. I requested one round of small changes, after that it should be ready for merging.
|
|
||
| > [!note] Important | ||
| > Please note that this has to be done in two steps, so the resources are loaded in a separate session from the full workflow. | ||
| This must be done in two steps,so the resources are loaded in a separate session from the full workflow. See [here](/docs/reference/cheerpjInit#preloadresources) for more information. |
There was a problem hiding this comment.
This now makes it seem that the preloadResources initOption must be added in two steps, it's a bit confusing. We should make it clear that users need to call cjGetRuntimeResources in one session and then add preloadResources to another session.
| ``` | ||
|
|
||
| The JavaScript console may enclose the string between quotes (`"`), which you should ignore. See [here](/docs/reference/cjGetRuntimeResources) for more information. | ||
| The console may wrap the output in quotes (`"`). If it does, ignore the quotes. See [here](/docs/reference/cjGetRuntimeResources) for more information. |
There was a problem hiding this comment.
Please rewrite this a bit to include what reference we are pointing to, something like this:
You can read more about the
cjGetRuntimeResourceshere [link]
|
|
||
| > [!note] Important | ||
| > Please note that this has to be done in two steps, so the resources are loaded in a separate session from the full workflow. | ||
| This must be done in two steps,so the resources are loaded in a separate session from the full workflow. See [here](/docs/reference/cheerpjInit#preloadresources) for more information. |
There was a problem hiding this comment.
Please also rewrite the last bit to include what reference we are pointing to, something like this:
You can read more about the
preloadresourcesinit option here [link]
| }); | ||
| ``` | ||
|
|
||
| Next, in `index.html`, we include CheerpJ and `script.js`, provide a “Generate PDF” button, and display the resulting PDF directly in the page using an `<iframe>`. |
There was a problem hiding this comment.
This looks great already. I would just quickly point out that the HTML page needs to include the public loader.js script. Please add this above both the new HTML page examples.
|
I've added blockquotes for both doc references and while pointing out that they need to reference |
sites/cheerpj/src/content/docs/11-guides/Startup-time-optimization.md
Outdated
Show resolved
Hide resolved
epanholz
left a comment
There was a problem hiding this comment.
This looks good to me now, thanks a lot Rijul.
Updated 'Library mode' and 'Resource preloading' docs.