-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update Trending Now cards to display patron (if reading log public) #10241
Comments
Hi @mekarpeles, Such a nice idea Mek, I’d love to work on this! Here’s my approach: ->I’ll create a mockup to display the patron’s avatar, username as a link, and a Follow button. I’ll ensure the design matches the current style of the site, especially following the look of the My Books feed page, and I'll make sure to use existing CSS where possible. And then for the testing, This feature can help patrons discover more books through people they follow, and really could be the first step toward building social features on Open Library. Let me know if you have any feedback or suggestions! 😊 |
Hi @SharkyBytes! Thanks for these details.
It's possible this part is done already! Or, I think we should take the approach of leaving it anonymous (if their reading log is private) and otherwise showing the new design. In either case, these two modes / design should hopefully be fairly consistent with each other. Looking forward to seeing your designs and we can bring them for feedback to either our Tuesday or Friday community calls! |
@SharkyBytes are you still working on this? |
Yeah, @ananyakaligal, I’m working on this. It’s almost done. I just need to check it with Mek now. |
Happy to provide a review when it's ready, thanks for working on this. Thanks for the offer to help @ananyakaligal! I'll followup on slack and see if we can work together to find a themed set of high impact issues to tackle together. |
Hi @mekarpeles, I’m currently working on this issue and am excited to start my contribution journey. I wanted to share an update with you and seek your advice. Here’s what I’ve accomplished so far:
Let me know if you’d like any adjustments to these features! That said, I’m currently facing an issue with implementing the follow functionality (so the follow button works as expected). I’m actively working on resolving this, but if you have any suggestions, resources, or pointers that could save me from searching through the full codebase, it would be a huge help. Thanks in advance for your guidance! Current Implementation :- |
@SharkyBytes great work so far:
What to do if a patron is not logged in?This case is actually almost completely handled for us already by the If a visitor navigates to the And if they're not logged in, an The OpportunityOne caveat of this flow is, by logging in, we're not actually completing the I'm considering this a separate, followup issue tracked here (which has a volunteer: @ShilpThapak): |
Hey @mekarpeles, I'm encountering an issue with the local instance of Open Library. I’ve set all reading activity to private, as shown in the image below. However, when I add books to the "Want to Read" section from my personal account, the system still displays my name and the section I added the book to. While the "Want to Read" link itself is protected (I can't view the detailed logs), it still reveals who added the book and where. As we discussed earlier, the expected behavior should be to display something like "Someone added to Want to Read" instead of showing the user's name and activity details. Am I right? I’ve also tried debugging the entry, but I’m unsure which field determines whether the reading logs are private. In the entry, I noticed that both openlibrary and personal show None for the private field, which seems to indicate no restrictions. Could you clarify which field controls this behavior and if there's a potential issue with the logic handling privacy settings? |
Also, @mekarpeles, I noticed another issue regarding avatars. As shown in the image below, the avatar isn’t displaying because the I had a detailed discussion about this with @scottbarnes, who was incredibly helpful. However, we’re now uncertain whether we should display a default avatar when no profile picture is available or if we should simply leave the avatar blank. Would love your thoughts on this! |
You'll need to fetch the patrons privacy value from their account setting object (you should be able to perform a get_many on all the patrons in one page) and conditionally load their name / follow buttons, etc. there may also be a private book on the reading log entry We should use a default avatar if private We can do the following to get a mapping of patrons to their privacy:
|
Overview
We'd like to update the Now view, i.e. https://openlibrary.org/trending/now should be updated so instead of saying "someone" marked book as [state] it instead shows their avatar and username as a link, perhaps with a button next to it to follow them, similar to #9415.
Context
Designs
Before:
After? perhaps something closer to:
Instructions
Before asking to be assigned, you can help by proposing a 🎨 design for this feature or asking any clarifying questions you may have. Thank you! ❤️
Also, if you're a new contributor, please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
Justification
The trending page is interesting but misses an opportunity enable patrons to discover deeper insights by exploring other books the patron may recommend, or by allowing them to be followed.
This may be a good first step in making our Follow feature useful.
Research
Goodreads does something similar
Breakdown
Requirements Checklist
Related files
See Adding trending view #6014: https://github.com/internetarchive/openlibrary/pull/6014/files#diff-b352027e4688f5ef14e5e23f6a988bba495e769f8cecce80c404a23d82f5902a
See My Books Feed designs (e.g. https://openlibrary.org/people/mekBot/books/feed) Implemented by Adds follow (pubsub) feature #8607 in
https://github.com/internetarchive/openlibrary/pull/8607/files#diff-1c0a702d7b1bad810adce7c001416b5996968d117077f629ff52ddff4668f56fR45-R51
The text was updated successfully, but these errors were encountered: