Myriad-Dreamin / shiroa

shiroa is a simple tool for creating modern online books in pure typst.
https://myriad-dreamin.github.io/shiroa/
Apache License 2.0
204 stars 17 forks source link

Some contents are rendered too late #50

Closed memeplex closed 1 month ago

memeplex commented 4 months ago

While reading https://myriad-dreamin.github.io/typst.ts/cookery/ I noticed that some contents (I believe in every case they were contents of raw blocks, but I cannot say for sure) were loaded after the initial page rendering, when they became exposed while I was scrolling through the page, but with noticeable lag so that I was able to see an empty box being filled with text a fraction of a second later.

memeplex commented 4 months ago

Here is an example:

https://github.com/Myriad-Dreamin/typst-book/assets/2845433/3c261f52-0b4d-4694-89f0-5e0fc6bf885c

Myriad-Dreamin commented 4 months ago

This (typst.ts cookery book) and the documentation of typst-book is the experimental deployment of the DOM export. The DOM export has much better performance and text selection support than previous pure SVG export, but is definitely more bug-prone.

I have fixed tons of bugs in the DOM export and this issue is also fixed. This issue is caused by incorrect calculation of bounding boxes of typst elements.

Myriad-Dreamin commented 4 months ago

My plan is to make a new publish on typst v0.11.0. And typst v0.11.0 will come in near future.

ice1000 commented 3 months ago

Here's a slightly longer document that you guys can test with: https://ice1000.org/lnl-modal/report.html

The source code is available here: https://github.com/ice1000/website

Myriad-Dreamin commented 3 months ago

Here's a slightly longer document that you guys can test with: https://ice1000.org/lnl-modal/report.html

The source code is available here: https://github.com/ice1000/website

It's very cursed to render a long page, but I'm working on it. To relieve it, you can break report into pages, as rendering are lazy across pages.

Myriad-Dreamin commented 1 month ago

It has rendered the typst.ts documentation and ice1000's website like a flash in v0.1.5!