braxtonhall / library-thing

A browser extension to improve the LibraryThing cataloguing experience
https://betterlibrarything.com
6 stars 1 forks source link

Insert new tags into tag index #212

Open themaskedtaquito opened 1 year ago

themaskedtaquito commented 1 year ago

When the extension notifies a user that they are adding a tag that is not in the tag index, if they decide to keep it, insert the new tag into the tag index.

braxtonhall commented 1 year ago

I think this is possible, but not super trivial

First, the extension must ask the librarianette which category they want to add it to, or if they want to create a new category Then, if the category contains nested tags, the extension must ask which parent tag it should go under, or if it should be its own parent tag. You can repeat the step if the parent tag has parent tags as children (like nonfiction->science->ecology)

braxtonhall commented 1 year ago

We can easily find the categories and the nesting depth using the Tag Index Index, however we would need to restructure our parsing of the tags, as right now they only point to parents, and for new insertion we would want the tree pointing in the other direction too.

braxtonhall commented 1 year ago

OK I think I am starting to get some kind of idea of what the flow of this thing will look like

Kapture 2023-01-12 at 21 08 59

braxtonhall commented 1 year ago

I'm trying to imagine what a perfect UI for this thing looks like.

When you hover over a tag or sheet that you wish to insert the new tag under, it would be great if it gave you a description.

The description could either go in a tooltip (maybe yuck) or in the subText on the confirmation screen.

To support this, the Tag Index Index would also need to tell Better LibraryThing where the descriptions even are. And it would probably be nice if the whole sheet had a description

braxtonhall commented 1 year ago

Kapture 2023-01-14 at 23 09 10