discuit icon indicating copy to clipboard operation
discuit copied to clipboard

Proposal for bookmarking posts + comments

Open ttaylor-st opened this issue 1 year ago • 9 comments

Hello! I'm planning on adding bookmarks to Discuit, thought I'd give my plan here for review in case there's any concerns :)

Backend

  • Of course requires a new bookmarks table, which will contain a user ID, and either post or comment ID
  • 3 new API routes
    • POST /api/bookmarks for adding new bookmarks, requires userID and either postID or commentID
    • DELETE /api/bookmarks/{bookmarkID} deletes a bookmark
    • GET /api/users/{username}/bookmarks returns a list of the user's bookmarks, only available to that user

Frontend

Comments

New button alongside Reply, Edit and Delete. Would go into the "More" dropdown on mobile. Button would be blue like the upvote

A screenshot of a comment on a website called "Discuit". The message is from a user named "Lydia" and reads "Ah cool, thanks for that! I might actually have a go at implementing it myself". The comment has 5 upvotes, 0 downvotes, and can be replied to, edited, deleted, or saved.

Posts

In the feed

I've thought of two options:

  1. having a "Save" button besides the comments button, using fa-bookmark for an icon
    • Would adopt the same style of the up/downvote buttons if already saved
  2. Adding a new "Save post" item to the drop down

image

Post view

Save button besides the Share button, ~~I didn't want to change the icon, just imagine it's a bookmark icon :)~~

This may be a bit visually noisy

If the post has already been saved, the text would be "Saved", icon would be filled in, possibly with a different text colour of color-brand as well?

image

New /saved page

Pretty much the same as the profile page, but instead of your posts/comments, it's saved posts/comments. Only visible to you.

Would also require a new entry in the left sidebar, or possibly the dropdown that leads to the Settings, Profile and Logout? Sidebar makes a bit more sense to me though, personally.

ttaylor-st avatar Feb 12 '24 15:02 ttaylor-st

Love the well thought out proposal.

I had in my mind the idea of doing something like Youtube playlists for this. So, instead of just one bookmarks page, there would be multiple, so that users could organize their saved items by topic. One downside of this would be that it turns saving a post a two step process (click the save button, then choose which list to save to).

What do you think? And what do you prefer personally?

previnder avatar Feb 15 '24 03:02 previnder

Love the well thought out proposal.

I had in my mind the idea of doing something like Youtube playlists for this. So, instead of just one bookmarks page, there would be multiple, so that users could organize their saved items by topic. One downside of this would be that it turns saving a post a two step process (click the save button, then choose which list to save to).

What do you think? And what do you prefer personally?

I like the ability to categorize bookmarks and I think you can fix the whole two step process by having it default to the previously used category.

Then if you're like me and want to be meticulous, then you can be, if you want to be lazy and have them all in one bucket, you totally can cause it will default (making it essentially a one step process).

Edit: This is probably my most wanted feature <3

TylerCode avatar Feb 15 '24 15:02 TylerCode

Ooh, quite a fun way to do it, 100% prefer it to a single list!

One downside of this would be that it turns saving a post a two step process

There's two solutions that come to mind:

  1. Having two separate buttons:

    • A "Save" button that adds the item to a 'default list'
    • A "Save to..." button that let's the user manually pick what list they'd like to add to
  2. A single split button

    • The main part would add the item to the user's default list
    • When expanded, it would show the user's lists, possibly also an option to create a new list.
    • GitHub uses this method for starring repositories image

ttaylor-st avatar Feb 15 '24 15:02 ttaylor-st

Yep, I like staying a bit organized too.

I like the split button idea. And I also like @TylerCode's idea of the list defaulting to the previously used category. Also, for mobile, the split button idea may not be ideal. For mobile I think we could have a button that when you touch and hold, the list modal would show up; but if you just press it, it'd save to the last used category.

Next the question is, what are we going to call these lists? We need two terms here: 1) for the whole collection of saved items, and 2) a term for an individual list. Options include: "Bookmarks" and "Folder"; "Saved items" and "List".

previnder avatar Feb 16 '24 01:02 previnder

Sounds good! Just one concern with the holding, we'd need some way to tell the user that's how they can save to other lists, which could be a bit tricky

As for naming

  1. I think "Bookmarks" fits best, "Folder" makes it seem like it's just the one list.
  2. Out of those two, I'd pick "List", but I think "Folder" may more accurately describe it. also possibly something to ask the community about? See what they'd prefer and get a couple extra ideas

ttaylor-st avatar Feb 16 '24 14:02 ttaylor-st

Alright, we'll go with "Bookmarks" and "List" for the terms then (could always change them later, if we want to).

With that, I think this is ready to be worked on. Are you going to take a crack at this? If so, you have the green light!

previnder avatar Feb 21 '24 21:02 previnder

Yep, gonna give it a go. Thanks!

ttaylor-st avatar Feb 22 '24 17:02 ttaylor-st

@lydia-st wanted to see what your progress on this was? I was also thinking on hopping on and working on it.

Codycody31 avatar Apr 12 '24 02:04 Codycody31

@Codycody31 Just made a draft PR (3 months later heh)!

I'm not all that much a backend person, so that might need a look over, and error handling definitely needs improving. No work on UI yet, I'm planning to do that over the weekend

ttaylor-st avatar May 09 '24 10:05 ttaylor-st