Skip to content
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

Pages can shift slightly when using collapsed text in conjunction with a small image width limit #40

Open
james-xli opened this issue Dec 19, 2024 · 0 comments

Comments

@james-xli
Copy link
Contributor

While testing #39, I noticed a minor usability issue that can occur when using the "Collapse recognized text" feature in conjunction with a low (200 or 300 px) max image side length. Expanding the collapsed text can cause the other pages to be shifted rightwards slightly.

Here's an example; notice how when I expand the Page 1 text, pages 2 and 3 move position to the right a bit:

Screen.Recording.2024-12-18.at.11.28.45.PM.mov

It would be nicer if those pages did not shift at all. At worst, this could cause the rightmost page to reflow into the row below, which could be confusing.

This happens because I'm setting the max-width of the container to the max dimension of the page image, which for notes in portrait orientation is the height of the image and not the width. So the container is allowed to be as wide as the image is tall. Unfortunately I don't have a simple workaround for this because I want to preserve compatibility with horizontal notes (though I know they don't currently work correctly, per #27), and I haven't found a good way to have different behaviors for horizontal vs. vertical notes.

Maybe there's some easy way to grab the width of the note image and set the page container to that value (rather than just the max dimension)?

Fortunately when the image size limit is set higher, this stops being an issue because the width of the recognized text stops exceeds the width of the image.

I think this is a relatively minor issue but I did want to document it here for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant