HistoryMap icon indicating copy to clipboard operation
HistoryMap copied to clipboard

Highlight text and images on a page and make annotations

Open kaidatavis opened this issue 2 years ago • 7 comments

kaidatavis avatar Jan 08 '24 18:01 kaidatavis

Update: c31b896c74797e98e960b15d3f1d8e2d1608a0e0 supports highlighting selected text on the tab page (reuse the implementation in old-historymap with a few apis migrated to manifest v3 features). The highlighted content is not sent to HistoryMap yet.

Yuu-Han avatar Jan 13 '24 07:01 Yuu-Han

I just had a look at the wiki page and found the comments on missing features.

Image highlighting * (what about multiple images?)

I think highlighting multiple images is a practical need. For example, when I searching for inspiring prompts and images on a web gallery, I would like to highlight all the images that might be desirable.

The original implementation allows only one representative image by removing any previously highlighted image when there is a new one (see the following code). It should be easy to push multiple images to highlights array, the main question is how to present the images in HistoryMap. The options can be: (1) gallery (like mac finder), (2) list.

https://github.com/Vis4Sense/HistoryMap/blob/c31b896c74797e98e960b15d3f1d8e2d1608a0e0/old-historymap/src/background/contentScriptData.js#L15-L30

Yuu-Han avatar Jan 14 '24 07:01 Yuu-Han

the main question is how to present the images in HistoryMap.

Indeed, and it needs to be compact so it would still work when there are many nodes and images. I don't have a strong preference between the two; maybe it also relates to the layout, i.e., how the node size/shape with images would better work with the layout.

kaidatavis avatar Jan 15 '24 12:01 kaidatavis

Implemented highlighting images and showing the highlighted text and images on historymap (902f4ab7e3790afea7810a841b9ac6bbf6690646).

  • Images are saved as base64 data stored in the highlights array in hmPages.

A preview figure:

image

Todo

  • Removing image and selecting representative image is not supported yet
  • Currently multiple images are shown as gallery, I might take the layout into consideration and investigate other options.
  • Better to save highlights in background

Yuu-Han avatar Jan 20 '24 18:01 Yuu-Han

Highlight text is back (252fce674811c6c612267ba66d4cc48459b553fc).

Take note on a webpage (6b14a0a6da4928f01ac9111aa6bcfe3e1ced9675):

hm-add-note

Loading highlights and note from historymap to a reopened webpage is not yet supported.

Yuu-Han avatar Jun 01 '24 09:06 Yuu-Han

Editing note on HistoryMap (5edec7e003eea3ff478bee58bc460c90f87310f4):

image

Yuu-Han avatar Jun 08 '24 03:06 Yuu-Han

Add annotation and tag in the same window/box. Adding a hashtag # marks it is a tag.

kaidatavis avatar Jul 08 '24 15:07 kaidatavis