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

Feature Request: Add highlighting support for text #620

Closed
1 task done
flintstones-fred opened this issue Nov 6, 2024 · 17 comments
Closed
1 task done

Feature Request: Add highlighting support for text #620

flintstones-fred opened this issue Nov 6, 2024 · 17 comments
Labels
feature request New feature or request

Comments

@flintstones-fred
Copy link

Describe the feature you'd like

Users are able to highlight certain snippets of text.

Describe the benefits this would bring to existing Hoarder users

Many articles are saved because they have some relevant/useful information. But more times than not, you want to recollect specific important piece of information from that article (e.g. key takeaways, a specific issue that author had faced from a list of issues). Highlight support in hoarder will really be a very useful feature for users to retrieve the most useful information very quickly. Especially useful for long-form text articles. Many Read it later apps make their living on this. Hoarder has the ability to take it to the next stage as it also captions text.

Can the goal of this request already be achieved via other means?

No. The closest feature is the powerful search that hoarder already has implemented. However, searching something still requires you to remember the correct words. I think the two features (search and highlight) will best work hand in hand. Let's say the search gets you to a couple of useful articles you have saved. And then the user has highlighted the most relevant text to them that they are now able to quickly retrieve.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

Additional context

No response

@flintstones-fred flintstones-fred changed the title Add highlighting support for text Feature Request: Add highlighting support for text Nov 6, 2024
@MohamedBassem MohamedBassem added the feature request New feature or request label Nov 7, 2024
@npnpatidar
Copy link

Would love this.

@thiswillbeyourgithub
Copy link

I desperately need to hoard AND highlight too.

I'm thinking a good part of the code could be directly taken from the omnivore self hosted fork no?

@flintstones-fred
Copy link
Author

Omnivore has(had) the best UI for the reader view in my opinion. If it's easy to implement something like this for the hoarder cachee content, that would be super awesome

@MohamedBassem
Copy link
Collaborator

I'm working on this right now :)

Screenshot 2024-12-26 at 10 06 44 PM

though, to be honest, it's not very easy, so let's see how far I'll be able to go.

@flintstones-fred
Copy link
Author

Oh, that's great! Is there some things that I can help with? I am not a programmer but happy to take something simpler on so that you can focus on the harder part

@thiswillbeyourgithub
Copy link

Oh wow, this is so nice to hear!

If I may, when a while back I was developing something for Omnivore's API, I ran into a weird issue that if I recall correctly were due to them storing only a processed string of the text content. Like you can choose to either store the raw mathjax formulas inline a text string or first turn them into Unicode symbols. But if the highlight text you store is not strictly a part of the parsing because you interpreted the mathjax to unicode then other devs might run into issues writing API tools. So yeah if you can store the unprocessed highlight content that'll be swell :))) That would help me avoid having to code weird parsers

Do you accept bounties? I'm ready to give you $50 if you pull off an omnivore highight importer in the future :)

@MohamedBassem
Copy link
Collaborator

Screen.Recording.2024-12-27.at.3.19.38.PM.mov

I think I might have something that works!

@github-project-automation github-project-automation bot moved this from Backlog to Done in Hoarder's Roadmap Dec 27, 2024
@MohamedBassem
Copy link
Collaborator

Ok folks, I've just merged support for this in 86d74e3 and it'll be coming as an experimental feature in the next release (expect bugs, it wasn't a trivial feature). Give it 15mins and it'll be available in the nightly build. I'd appreciate if you folks can give it a try and report bugs before the next release (in around a week from now)!

Notable missing features:

  1. A highlights page that shows all highlights across bookmarks.
  2. API support for manipulating highlights.
  3. Attaching notes to the highlights.

1 & 2 will be implemented before the release. 3 will depend on how important it is for you.

@thiswillbeyourgithub
Copy link

What a beast! What a feat!

What are the supported filetypes for annotation? Omnivore allowed annotating both webpages and pdfs.

And can we expect an omnivore highlight import? I offered $50 for it :)

Thanks a lot!

@MohamedBassem
Copy link
Collaborator

@thiswillbeyourgithub Currently, I've only added support for annotating webpages. To do pdfs, I'll need to change the pdf viewer used by hoarder which is a bigger change.

As for the omnivore highlights import, I probably won't have the bandwidth for it. So let's keep the bounty for someone else to claim it :)

@thiswillbeyourgithub
Copy link

Alright thank you so much!

@MohamedBassem
Copy link
Collaborator

Both the API and the "All highlights" page are now available in the nightly build.

@flintstones-fred
Copy link
Author

@MohamedBassem I was able to spin up a new container to try out the latest build. I am not using the API for hoarder as much, so, I will stick to my feedback on the web version (I am assuming the cached content will eventually come to the mobile app).

  1. Highlighting works great! Very intuitive. Consider adding a few more colors.
  2. I like how the highlights show up on the right pane of the article you are viewing.
  3. A couple of requests on the highlights page: First, is it possible to show highlights grouped by the article in which they were made? This will help visualize all highlights from an article no matter the time order in which they were created.
  4. A second potential request (this might be useful once thousands of articles have been hoarded) is to implement a search just within the highlights.

Thank you again for your work on this.

@flintstones-fred
Copy link
Author

Ok folks, I've just merged support for this in 86d74e3 and it'll be coming as an experimental feature in the next release (expect bugs, it wasn't a trivial feature). Give it 15mins and it'll be available in the nightly build. I'd appreciate if you folks can give it a try and report bugs before the next release (in around a week from now)!

Notable missing features:

  1. A highlights page that shows all highlights across bookmarks.
  2. API support for manipulating highlights.
  3. Attaching notes to the highlights.

1 & 2 will be implemented before the release. 3 will depend on how important it is for you.

3 is important. This way, we keep the cached content, and the user thoughts separate. It would be great if those "notes" can also become part of the search

@MohamedBassem
Copy link
Collaborator

Thanks for giving it a try and for the feedback @flintstones-fred! Glad that the feature works well!
1. Regarding the few colors, I'm curious, what functionality do you usually get out of those colors. Because so far, I implemented them to be just a visual thing and nothing more.
3. Regarding grouping by article, I feel like this will make the ordering (and pagination very weird). How do you sort the groupped highlights in that case?
4. Yeah, search is something that I anticipate will be needed, but will probably ship the feature without it as a start. It seems that omnivore survived for long without it?

@flintstones-fred
Copy link
Author

  1. Colors: mainly just preference. More is better. Honestly, 99% of the time, I just use yellow and red.

  2. I was thinking that the structure of the highlights page could look something like below -

  • Article 1
    -- Highlight 1
    -- Highlight 2
  • Article 2
    -- Highlight 1
    -- Highlight 2
    -- Highlight 3
    And so on!
  1. That's fair.

@thiswillbeyourgithub
Copy link

By the way, I know this is still experimental, but I think it would be worth adding it to the repository description

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

No branches or pull requests

4 participants