client icon indicating copy to clipboard operation
client copied to clipboard

Also filter the highlights on the document, when the cards in the sidebar are filtered

Open seanh opened this issue 5 years ago • 3 comments

When you apply a search filter to the annotations in the sidebar that document continues to show the highlights for all annotations, not just the ones still being shown in the sidebar. This is confusing, especially if you click on some of the highlights.

The highlights in the document should be filtered along with the annotations in the sidebar.

seanh avatar Jul 11 '19 17:07 seanh

FYI - I have some code related to this on my laptop, which may be a useful starting point.

Edit: Umm, no I don't, but I did look at this at one point. I may be able to dig it up again somewhere from my fork.

robertknight avatar Aug 01 '19 16:08 robertknight

This came up in the context of the new search UI at https://hypothes-is.slack.com/archives/C07NXBDNW/p1706540405763019?thread_ts=1706110489.507859&cid=C07NXBDNW.

robertknight avatar Jan 29 '24 15:01 robertknight

One issue with this is that clicking on a highlight in the document itself has the effect of filtering the sidebar by creating a "selection". If we naively filtered highlights to match what was visible in the sidebar, then clicking a highlight would cause all other highlights to temporarily disappear, which would be weird.

Some possible solutions:

  • Only filter highlights based on the filters active in the sidebar, not counting the selection
  • Don't actually hide non-matching highlights completely, but change their appearance in some way

robertknight avatar Jan 31 '24 09:01 robertknight