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

[FEATURE]: Add folders/tags to organize brews... #758

Closed
ctgilley opened this issue Sep 17, 2018 · 13 comments
Closed

[FEATURE]: Add folders/tags to organize brews... #758

ctgilley opened this issue Sep 17, 2018 · 13 comments
Labels

Comments

@ctgilley
Copy link

Description

I've got a lot of brews, and I imagine others do as well. It would be great to be able to organize these into folders that I can drill into for specific brews. For example, I might want to have one folder for each campaign that I'm running, or one to hold my custom magic items, or another to hold my custom races and classes.

@ericscheid
Copy link
Collaborator

I would suggest tags instead of folders.

@ctgilley
Copy link
Author

ctgilley commented Nov 6, 2020

Sure, tags would be fine -- any way to structure/filter/organize.

@jeddai
Copy link
Collaborator

jeddai commented Nov 12, 2021

Discussion from #697:

Side note: the homebrew data model and UI does include a "tags" field, but it is commented out and undeveloped.
There is interest in tags for organising reasons too. #758

I was just thinking about that; I have about a dozen brews that I made to help out someone in the subreddit; I've taken to giving them a title that starts with "Example:" so that they appear in one place in the list, but it'd be even better if I could dump them in an "Examples" folder where I don't actually have to look at them.

@G-Ambatte what if we handled the document filtering via tags, but also addressed the visibility concern by making the user page a dashboard of sorts?

  1. Set up documents to allow for tags,
  2. Add a section to the user page that allows users to filter their documents based on the tags they have on their documents.
    • This would contain a unique list of all the tags present on a user's documents
  3. When you click a tag, it filters the user's documents so only documents with that tag are showing
  4. When you change which tags/sort method are being used, that gets stored in local storage
  5. When you visit that page, it defaults to whatever is in local storage

jeddai added a commit to jeddai/homebrewery that referenced this issue Nov 18, 2021
jeddai added a commit to jeddai/homebrewery that referenced this issue Nov 18, 2021
jeddai added a commit to jeddai/homebrewery that referenced this issue Nov 18, 2021
@jeddai
Copy link
Collaborator

jeddai commented Nov 24, 2021

Smart folders would be easily doable using the tag system, thanks to NASA from the Discord of Many Things for this idea.

@ericscheid
Copy link
Collaborator

A question on "folders" (aka views) .. would authors want a folder where some of the brews are for everyone to view, and other brews only for the author to view (e.g. DM only, vs all players). And of these player-viewable brews, can some of them not be marked as "Published" (i.e. discoverable via the homebrewery public content search facilities).

I would want to a) create a container for a purpose (e.g. Friday Game Group), b) toss in all the relevant brews, c) mark some as me-only brews, d) have a link I can send to all my players. And maybe have sub-folders there too.

This can kinda be done via tags, there are definite overlaps. But also not. Food for thought.

@ericscheid
Copy link
Collaborator

Smart folders would be easily doable using the tag system, thanks to NASA from the Discord of Many Things for this idea.

See also #1858

@jeddai jeddai mentioned this issue Jun 25, 2022
@calculuschild
Copy link
Member

Tags are now able to be added to brews! Still need to make the searchable on the My Brews page but that should be trivial.

@ericscheid
Copy link
Collaborator

Free text searching undifferentiated from title/description would be trivial, just add an extra test here (noting yes, would be a search of an array of strings, not just a string — don't simply `array.join() though, as you'd get false matches).

brews = _.filter(brews, (brew)=>{
return (_.deburr(brew.title).toLowerCase().includes(testString)) ||
(_.deburr(brew.description).toLowerCase().includes(testString));
});

Next step would be a search syntax like tag:tag-keyword1 words to find in description/title tag:tag-keyword2. The syntax would be slightly complicated by the fact that spaces are allowed in tags.

@G-Ambatte
Copy link
Collaborator

G-Ambatte commented Aug 29, 2022

I've added this issue to the current UserPage modifications checklist (#2295) - expanding filtering to the tags was already in the list, but not linked to any specific issue.

I was anticipating adding it to the filter in exactly the same way we did the Brew Titles and Descriptions, but now that it's a larger list of items for the filter to check, some slight refactoring might be necessary to keep things elegant.

@ericscheid
Copy link
Collaborator

ericscheid commented Aug 29, 2022

Maybe this, but with better names.

	getSortedBrews : function(brews){
		const testString = _.deburr(this.state.filterString).toLowerCase();
		const searchTestString = (string) => _.deburr(string).toLowerCase().includes(testString);
		brews = _.filter(brews, (brew)=>{
			return searchTestString(brew.title) || 
				searchTestString(brew.description) || 
				brew.tags.findIndex(tag => searchTestString(tag))+1;
		});
		return _.orderBy(brews, (brew)=>{ return this.sortBrewOrder(brew); }, this.state.sortDir);
	},

array.findIndex() returns the index of the first array element that matches or -1 if none match .. so we add 1 to make the -1 be zero (which is false), and (importantly) make the index of 0 be 1 (which is true, instead of false).


NOTE: we should likely raise a separate issue for #758, as tags ≠ folders, and repoint #2295.

@G-Ambatte
Copy link
Collaborator

When you click a tag, it filters the user's documents so only documents with that tag are showing

Reading back through the history on this, we never actually created this functionality. I believe we can probably do so by making the tags automatically link to the current URL with a ?filter=${URL.encode(tag content)}.

@5e-Cleric 5e-Cleric changed the title Feature: Add folders to organize brews... [FEATURE]: Add folders to organize brews... Jan 16, 2024
@ericscheid ericscheid changed the title [FEATURE]: Add folders to organize brews... [FEATURE]: Add folders/tags to organize brews... Apr 3, 2024
@ericscheid
Copy link
Collaborator

The name of this issue started being about folders, but quickly morphed to being about tags, and much very good work was done on the tags front, with an end result of being able to filter the user-brews by tags (by clicking them there).

Discussion in multiple places show that folders is still an important and useful concept, and one which cannot be entirely solved via tags. A lot of the discussion has been collated onto a wiki page.

For clarity,, creating a new issue for the original issue (rebooting it essentially).

This was referenced Apr 3, 2024
@ericscheid
Copy link
Collaborator

With that new issue to handle actual folders, closing this issue (using tags) as completed.

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

No branches or pull requests

5 participants