Feat/reader go to page - #1294
Conversation
|
Can you rebase your changes to have |
…e for the changes. Current version is paged only and working on embedding into footer. This changes causes little risk to app because nothing imports the component yet however the unit tests have been done and can be found. Still yet to test the manual in-browser usage but debug logs seem good.
…l in the image-based reader so that you can get back to where you need easily
2c0ac1b to
da3a568
Compare
|
Hello! Thank you for your response. My apologies; I branched from the old v0.1.5 commit, which is 23 commits behind nightly. My c3468bd PDF commit already implements the exact fix that nightly already merged in [#1209] and therefore is a redundant commit. I believe I should have fixed these conflicts, but please feel free to let me know anything else that may be needed. |
|
Hello! I just wanted to check that and see if there are any changes you would like me to make to this request. |
|
Hey! Sorry I haven't had a moment to take a look yet, I needed to focus on some other project management tasks first to release 0.1.6 and clean up the PR queue. I'll give it a review sometime during the week |
No worries, thanks for the update! |
aaronleopold
left a comment
There was a problem hiding this comment.
The code itself looks good to me! I'll load this up locally to actually try it out before giving a final approval :)
…oToPage.tsx Dropping over-explanation. Co-authored-by: Aaron Leopold <36278431+aaronleopold@users.noreply.github.com>
Thank you for the suggestions, and that is totally fair, just committed the changes! |
|
Time permitting, I'll aim to load this up locally today |
aaronleopold
left a comment
There was a problem hiding this comment.
I had a couple of nit-picky comments, let me know what you think!
| autoFocus | ||
| /> | ||
| <Button size="sm" onClick={handleSubmit}> | ||
| <ChevronsRight className="mr-1 h-4 w-4" /> |
There was a problem hiding this comment.
Also, while looking at the screenshot, the button aligned to end looks a bit funky. We can't just set the Popover.Content to have items-center because the input has a label that throws off the alignment overall.
I'd say we should do the following:
- Add an inner div to wrap the input and button with the proper flex alignment
- Remove the
labelon theInputand add it, instead, to above the aforementioned group so it doesn't interfere with alignment
It's a pretty small thing though, so if you don't have the time to do it just let me know :)
There was a problem hiding this comment.
Hi! No worries at all, thanks for the comments, and please tell me if you want to change anything else. I believe it should have changed, and correct me if I didn't properly fix the alignment issue you see on the Go button.
I also didn't consider RTL reading, so thank you for pointing that out. I tried to implement the changes and think they should be correct, but let me know if they are not, including what I should specifically fix. Thanks! :D
| @@ -23,9 +18,7 @@ export type GoToPageProps = { | |||
| * localized as a whole. | |||
| */ | |||
| label?: string | |||
| /** | |||
| * Text for the submit button. See `label` re: localization. | |||
| */ | |||
| //Text for the submit button. See `label` re: localization // | |||
There was a problem hiding this comment.
Looks like a few of these comments were accidentally updated, they are no longer valid doc comments

Closes ISSUE #814
Description
Issue #814 - feat(reader): go-to-page control, and fix PDFium binding reuse & thread-safety
Summary
This PR contains two independent changes that came out of getting the reader working end-to-end during local setup:
They're bundled because the PDF fix was a prerequisite to exercising the reader locally. Happy to split into two PRs if preferred and any other changes are requested. I am in a class learning to contribute to open-source projects, while being AI-native and critical of the output; therefore, AI assistance from Claude was used in part for this contribution. This is my first contribution to any open-source project ever, so I appreciate any advice and constructive criticism. Thank you!
1. Feature: "Go to page" control
What & why??
This was already an open issue. In paged mode, the footer's position indicator (e.g., "4-5 of 42") is now a clickable trigger that opens a small popover with a number input, letting the reader jump directly to any page. This is a manual-recovery affordance: if the reading position is ever lost, the user can type the page they remember and return to it immediately.
Scope
How it works
Files
Testing
2. Fix: PDFium binding reuse + thread-safety ( Already fixed, can be ignored )
The Problem (three issues, surfaced in order)
Fix: core/src/filesystem/media/format/pdf.rs
Testing
Setup note for reviewers/testers
To exercise PDF rendering you need a PDFium binary and pdfium_path set to it (macOS: libpdfium.dylib). (Possible follow-up: document this in docs/.../installation/source.mdx.)
Screenshots
https://imgur.com/a/fg4fzLz
Ready?
Please read each item and check the boxes:
nightlyand notmainStump Contributor License Agreement
By contributing to Stump, you agree that your contributions will be licensed under the following licenses (where applicable):