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]: Favorite brews #834

Open
HeruAsatru opened this issue Jan 29, 2019 · 9 comments
Open

[FEATURE]: Favorite brews #834

HeruAsatru opened this issue Jan 29, 2019 · 9 comments
Labels

Comments

@HeruAsatru
Copy link

Original idea can be found HERE.

Posted here for your convenience:

One thing that has bothered me since ever is that every time someone shares a cool homebrew, people have to save the link and bookmark it somewhere else instead of in homebrewery.naturalcrit.com.

Therefore my request is that while you signed in and you access a shared homebrew, logged in users should be able to mark it as "favourite". hen on the users are, there should be a link that opens a page with the list of all homebrews marked as favorite.

I believe it's a very simple feature but some needed and useful.

Many thanks, and if you need UI direction for the feature, please let me know and I will help :)

@G-Ambatte
Copy link
Collaborator

As I see it, this needs to be is a array of shareIds stored against the user account (e.g. favorites: []), with a MongoDB query to return the query { shareId: { $in: ${favorites} }} to the User Page. Probably can give it it's own Route /favorites, /liked, etc.

@5e-Cleric 5e-Cleric changed the title [Suggestion]Favorites [FEATURE]: Favorites Jan 16, 2024
@dbolack-ab dbolack-ab self-assigned this Jan 17, 2024
@dbolack-ab
Copy link
Collaborator

Beginning backend work here, It is a pseudo-blocker for PR #3321

@ericscheid
Copy link
Collaborator

ericscheid commented Apr 3, 2024

This crosses paths with the folders idea too.

Considerable planning has gone in to that to be compatible with an extensible favouriting system. Like, being able to have more than one collection of faves, of being able to mark a fave as public (vs keeping that bookmarking a secret), etc.

See also issues #758 and #3390.

@5e-Cleric
Copy link
Member

We have also talked about the fact that faves and folders could share the same structure, with a difference in display.

@ericscheid
Copy link
Collaborator

ericscheid commented Apr 4, 2024

I believe basic favourites functionality can be implemented using the bones of folders functionality.

A simplified faves-only roadmap:

MVP:

  • create the folders mongoDB collection
  • add UI function to "add to faves", which creates a folders document keyed to the user, and inserts the sharedId of the viewed brew into the brewIds property
  • extend userpage functionality to check for saved faves and if so display in a new block on the user page (i.e. a 3rd group, alongside "published brews" and "unpublished brews". This should only appear when a user views their own /users/ page

Later:

  • add widget to the faves group on user page to allow for renaming the collection (renames the folder)
  • enable "remove from faves" option on the displayed fave brewcards — avoid confusion with "delete my access" function already on brewcards
  • toggle isPublished on the faves folder (and subsequent effect on visibility on userpage)
  • (more to come)

@5e-Cleric
Copy link
Member

5e-Cleric commented Aug 1, 2024

I am inclined on building this functionality on its own, as G-ambatte suggested, if only because it is an easy structure to follow, and the folder idea is still on diapers.

As I see it, this needs to be is a array of shareIds stored against the user account (e.g. favorites: []), with a MongoDB query to return the query { shareId: { $in: ${favorites} }} to the User Page. Probably can give it it's own Route /favorites, /liked, etc.

Following this, i'd say we create a favorites field in the user schema when a brew is first favorited, then add to that the share id of the favorited brew (should be straightforward). Once that is done, display them without edit or delete button for obvious reason, only to the own user.

How does that sound? And specially, if i did it this way would it really truncate the idea of folders? They would just be two separate functions, which could even avoid bugs breaking folders too.

@ericscheid
Copy link
Collaborator

How does that sound? And specially, if i did it this way would it really truncate the idea of folders? They would just be two separate functions, which could even avoid bugs breaking folders too.

If faves are built first, being simpler, then this does not block building folders later. Folders, once built, could wholly overlap the faves functionality, so the only (slight) risk is of duplicative/wasted effort, and any effort cost of refactoring faves into being simply members of a "Faves" folder.

The only intriguing aspect is the idea of displaying faves as a top-level category alongside "Published Brews" and "Unpublished Brews" (vs. displaying a card for the folder, and then click-thru to display the folder contents).

(It's also tempting to add a flag to folder meta data for a folder to be displayed in that way too, as yet-more-creeping-doom another feature).

@5e-Cleric
Copy link
Member

If faves are built first, being simpler, then this does not block building folders later. Folders, once built, could wholly overlap the faves functionality, so the only (slight) risk is of duplicative/wasted effort, and any effort cost of refactoring faves into being simply members of a "Faves" folder.

I was thinking that that way we could build the two features in two, medium sized PRs that could be worked on and merged independently.

The only intriguing aspect is the idea of displaying faves as a top-level category alongside "Published Brews" and "Unpublished Brews" (vs. displaying a card for the folder, and then click-thru to display the folder contents).

Would Only be displayed to the owner of the userpage, would it not?

(It's also tempting to add a flag to folder meta data for a folder to be displayed in that way too, as yet-more-creeping-doom another feature).

@ericscheid
Copy link
Collaborator

The only intriguing aspect is the idea of displaying faves as a top-level category alongside "Published Brews" and "Unpublished Brews" (vs. displaying a card for the folder, and then click-thru to display the folder contents).

Would only be displayed to the owner of the userpage, would it not?

Faves, sure.

In the Folders spec there is a flag for whether the existence and contents of a folder are revealed to visitors who are not the owner of the folder. For a Faves folder, that would be set to Unpublished (or whatever). A user might conceivably curate a collection of 3rd party brews that they want to be visible to others, like a folder of "Best brews of 2023".

This visibility attribute would be different from the how-it-is-displayed quality.

@dbolack-ab dbolack-ab removed their assignment Aug 23, 2024
@5e-Cleric 5e-Cleric changed the title [FEATURE]: Favorites [FEATURE]: Favorite brews Aug 28, 2024
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