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

Suggestion - Make the item tree into a tree table #34

Open
icsy7867 opened this issue Dec 30, 2022 · 3 comments
Open

Suggestion - Make the item tree into a tree table #34

icsy7867 opened this issue Dec 30, 2022 · 3 comments

Comments

@icsy7867
Copy link

Sorry for all the posts. But i love how you handle different items/locations. I think it is simple, smart and a great way to keep it customizable! I have a rather large project i am about to tackle so I am doing a lot of testing.

I was thinking that making your "item" tree into an actual tree diagram might be useful. It could save on clicks and allow for an entire overview.

https://webix.com/widget/treetable/
https://www.jqueryscript.net/demo/Minimal-Tree-Table-jQuery-Plugin-For-Bootstrap-TreeTable/
https://www.jqueryscript.net/demo/jQuery-Plugin-For-Displaying-A-Tree-Of-Data-In-A-Table-treetable/

I also noticed that it doesnt seem to sort the items in a tree. Would be a bit better if all my "stacks" were together.
image

I hope you dont see all of these as negative critiques! As I said I love have you are handling your data. I think it makes a lot of sense and I am excited to keep building out your tool!

@FoxUSA
Copy link
Owner

FoxUSA commented Dec 31, 2022

I did this in opennote. It was kind of a mess style wise. handling N number of tree levels add a buch of view complexity.

I don't normally browse the tree. I normally just search and then look at the location field.

@icsy7867
Copy link
Author

icsy7867 commented Dec 31, 2022

Fair enough.

The use case I'm trying to solve would is being able to see items in a specific locations/sub-locations.

For example, if I have a storage unit with 50+ sub locations and my wife wants to see all of the items sorted by their locations in the storage unit, this would help.

However the item view might be more helpful here in this case with some sort of sorting.

I would also love a search filter for the item tree or general search. A small field that searches and selects from the main database. Getall method.

Might be more complicated but doing something like

location=garage tag=folders text=baby

Which would filter the results to where the item list would only show things that had the string "garage" in the location, has a tag with a string of folders, and contains "baby" in either the item name or description (we have way too many infant baby things, and a baby on the way, do this would be super helpful).

You could also add an "exact" boolean to the search. This would make it easier to search for a specific path I think. Currently all the words get searched as an OR it looks like. But being able to search for an exact string would make one able to find a specific location or sub-locations. There is an example here (granted I know very little about vuejs)
https://vueuse.org/integrations/usefuse/

Interestingly fuse has some advanced search features, but I couldn't get them to work.
https://fusejs.io/examples.html#extended-search

Might have to enable it as fuse.js option
https://fusejs.io/api/options.html#advanced-options

useExtendedSearch: true,

@icsy7867
Copy link
Author

icsy7867 commented Dec 31, 2022

I played around with this, and it is somewhat helpful!

I did a demo of this with your data. With the useExtendedSearch enabled, the search seems to function the same, except you can do (Using your test data):

="garage bin 1"

vs just:

garage bin 1

image

vs

image

Which seems to allow me to search for a specific location. The spaces act more like an AND instead of an OR. Some of the other advanced search features arent working though, like the "!" exclude. MIght be because these are converted into the htmlescaped characters, and not converted back. So !garage becomes %21garage

-- update

Doesn't appear to be an issue with URI decoding. I think the Fuse version used in the project is pretty old. Appears to be from 2017.

Latest version is 6.6.1. it appears the project is using 3.4.1

-- update
Actually it looks like the ="string" method works by default. I think the extended search might be a feature in a more recent version of fuse.

For fun, I added a search function to the item list page and added some JS vue functions that allows one to specify and choose to filter on name, location, tag, etc.... Pretty helpful, but I'll share it once I get it cleaned up a bit here or via a pull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants