SmilyOrg / photofield

Experimental fast photo viewer.
MIT License
398 stars 7 forks source link

Tags MVP #60

Closed SmilyOrg closed 1 year ago

SmilyOrg commented 1 year ago

In their current form the tags can be a bit volatile, so consider them alpha-level and don't get too attached. 😊

Note: For this reason, you need to enable them explicitly first in the tags section of the configuration.

However, they have some cool features in their current form. The intention here is to form a foundation on top of which many other features can be built. See HQ's comment thread from a while ago for details and ideas.

  1. Selection. You can select photos now via Ctrl + Click or Ctrl + (Shift) + Drag. Selections are handled as "system tags" (tags with sys: prefix) and persist across refreshes, restarts, and across browsers (as long as you keep the link and don't delete the database). You cannot do anything else with the selection right now, so functionally they're more of a tech demo (i.e. useless). This will make it easier to implement #4 however.

  2. Tag picker. You can click the # button to show a photo's tags (excluding "system tags"). You can add and remove tags as you please using the multiselect with auto-complete. The ♥ button toggles a fav tag as a simple "liking" functionality. image

  3. Range tree tagging. This is an interesting implementation detail that makes it so that in some cases tags can be stored in a compressed "id range tree" manner, so that you can theoretically select/tag thousands of photos all at once. This should make it a lot more efficient to also add e.g. location tags to large subsets of photos for example as part of #59

https://user-images.githubusercontent.com/1451391/235796585-7459060d-cbf2-4ee7-9ea7-8cecb0eb9efa.mp4

I'm not 100% happy with the way tag IDs/revisions/etc. work right now, so that's something to look at in the future, but it's alright as a first draft.

Clearly the biggest missing part is search and/or filtering, which will actually make them a bit more useful than what is there. But let's see :)

Also bonus: fixes #21 in a hacky way (show the hand cursor for all canvas interaction regardless of photo or background)