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

Show note icon if the highlight contains note #1094

Open
azzamsa opened this issue Oct 13, 2023 · 1 comment
Open

Show note icon if the highlight contains note #1094

azzamsa opened this issue Oct 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@azzamsa
Copy link

azzamsa commented Oct 13, 2023

Is your feature request related to a problem? Please describe.

I can't tell if a highlight contains a note or not.

Describe the solution you'd like

Show a note icon around the highlight. The image below is from Lithium android app.
image

Describe alternatives you've considered

Additional context

@azzamsa azzamsa added the enhancement New feature or request label Oct 13, 2023
@johnfactotum
Copy link
Owner

johnfactotum commented Dec 6, 2023

Ideally it should be displayed in the margins to avoid obstructing the text.

Another issue is that it probably needs to be aware of the visible viewport so that in paginated mode, highlights that span multiple pages would have the icon on all pages. Edit: on second thought, maybe it'd be enough to show it at either the start or end of the highlight; showing it on each page is a bit weird as it would seem like there are multiple notes for the highlight.

So considering these two points, I think it'd probably make sense to have the renderer export a list of rects for the pages. Then it should be relatively straight forward to calculate the desired positions for the icons.

There are a couple remaining issues with this. The first is whether or how to handle collisions when you have multiple highlights on the same line. The second is whether or how to handle pointer events. Currently events are only handled if you click inside the rects of the highlighted text, rather than the hightlights themselves.

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

No branches or pull requests

2 participants