feat: Show pagination progress during PDF build#853
Open
u1f992 wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enriches the PDF build experience by reporting pagination progress (pages, percentage, ETA) during Vivliostyle typesetting, integrating viewer-side progress events into the CLI’s spinner logging.
Changes:
- Add an ETA estimator + formatter utility and unit tests.
- Wire
paginationprogressevents from the Vivliostyle viewer intobuildPDF()to update spinner text with pages/%/ETA. - Add
Logger.logUpdateProgress()for high-frequency in-place spinner text updates.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/progress-eta.test.ts | Adds unit tests for ETA estimation and formatting. |
| src/output/progress-eta.ts | Introduces ETA estimator (EMA-smoothed) and formatEta() helper. |
| src/output/pdf.ts | Hooks viewer paginationprogress into CLI logging and displays pages/%/ETA. |
| src/logger.ts | Adds logUpdateProgress() to update spinner text without checkpoint lines. |
| src/global-viewer.d.ts | Extends window/payload typings for pagination progress reporting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
確認しています。今のところyocto-spinnerとハイパーリンク表示の問題ではないかなとみています。 |
Member
Author
|
sindresorhus/yocto-spinner#18 に報告済みです。Vivliostyle CLI側ではハイパーリンクを無効にします。 |
a98613e to
b69f2fb
Compare
Member
Author
|
さっそく直していただけたので更新しました。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

refs: vivliostyle/vivliostyle.js#2039 vivliostyle/vivliostyle.js#2040 vivliostyle/vivliostyle.js#2041
PDFビルド時のログをリッチにするPRです。進行中のファイル、ページ数、割合、残り時間目安が表示されるようになります。