Skip to content

Suggestion list#3420

Open
mouse-reeve wants to merge 62 commits intomainfrom
suggestion-list
Open

Suggestion list#3420
mouse-reeve wants to merge 62 commits intomainfrom
suggestion-list

Conversation

@mouse-reeve
Copy link
Copy Markdown
Member

@mouse-reeve mouse-reeve commented Aug 26, 2024

Description

This PR is meant to complete @joachimesque's work in #2560 -- it lets users suggest "if you like that, try this" suggestions for books using the existing lists functionality.

What type of Pull Request is this?

  • Bug Fix
  • Enhancement
  • Plumbing / Internals / Dependencies
  • Refactor

Does this PR change settings or dependencies, or break something?

  • This PR changes or adds default settings, configuration, or .env values
  • This PR changes or adds dependencies
  • This PR introduces other breaking changes

Details of breaking or configuration changes (if any of above checked)

I'm hoping this won't be breaking per se, but the federation of these lists is going to be a change and that will impact how instances that have the feature interact with those that don't. But I haven't written that part yet so tbd.

Documentation

  • New or amended documentation will be required if this PR is merged
  • I have created a matching pull request in the Documentation repository
  • I intend to create a matching pull request in the Documentation repository after this PR is merged

Tests

  • My changes do not need new tests
  • All tests I have added are passing
  • I have written tests but need help to make them pass
  • I have not written tests and need help to write them

Screenshots

This is what the suggestions panel looks like:
Screenshot 2024-08-27 at 7 52 01 AM

@mouse-reeve mouse-reeve mentioned this pull request Aug 26, 2024
@joachimesque
Copy link
Copy Markdown
Contributor

joachimesque commented Aug 27, 2024

(reading that after a night out, so I might not be as sprightly as I could)

I don't know if I understood the third option—it sounded complicated even before I read that it could be very complicated.

Using Work could be the best solution, I hadn’t thought about the restrictions around Edition when I wrote the basis of this PR. My point of view is: even if the suggestions are in another language, I would welcome it. BUT, I’m saying that as a French guy who reads a LOT of English books, so I understand my experience is not most people’s experience.

If Work is used, would it be possible to select the Edition that’s in the language of the person/interface (if it exists)? (Or is this proposal the third option?)

@mouse-reeve
Copy link
Copy Markdown
Member Author

I had a similar thought, and yes it would be possible to filter or prioritize editions based on language. Outside the scope of this PR, but it gives me some confidence that the potential downsides to using Work could be mitigated in the future.

@mouse-reeve mouse-reeve added the enhancement New feature or request label Oct 15, 2025
@mouse-reeve mouse-reeve marked this pull request as ready for review October 15, 2025 21:08
@mouse-reeve
Copy link
Copy Markdown
Member Author

@bookwyrm-social/code-review This is ready for testing

Copy link
Copy Markdown
Member

@hughrun hughrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a quick look at this and have some initial thoughts:

  1. This is cool! I love the concept, especially that this is real human recommendations rather than an algorithm.
  2. I'm a bit confused by the test in test_inbox_add.py. Are followers supposed to get some kind of notification when someone adds an item to a suggestion list? If so, this doesn't seem to work.
  3. Is there a way to see all of my own suggestion lists? This doesn't seem obvious and it took me a while to realise how to get to my own suggestions in order to remove one
  4. Could we consider adding a third tab to /list so that it's "All lists | Saved lists | Suggestion lists"?
  5. We should definitely update the guided tour once this is implemented – I figured out how to "endorse" a recommendation but it's not necessarily obvious.
  6. Consider adding a button to add each suggested book to your To Read shelf immediately
  7. If I'm understanding correctly, we're suggesting Editions for a given Work. This seems surprising - this basically means if I'm looking at an edition I'll get a bunch of editions recommended based on the parent work? I think Work is the right level, so I'd expect to see recommendations of Work for another Work – am I missing something?

@mouse-reeve
Copy link
Copy Markdown
Member Author

mouse-reeve commented Oct 17, 2025

2. I'm a bit confused by the test in `test_inbox_add.py`. Are followers supposed to get some kind of notification when someone adds an item to a suggestion list? If so, this doesn't seem to work.

That is testing recommendations federating between instances -- so if a recommendation is added to a book on one instance, it would also appear as a recommendation on the linked instances. Right now there are no notification related to any suggestions. It might make sense to notify people when their suggestions are endorsed? And being able to follow a suggestion list would be cool but out of scope for this.

  • It also occurs to me that "Create suggestion list" button implies that the user who clicks it has ownership over the suggestion list, which isn't the case. I think I'll re-work that UI so that creating the list happens in the background.
3. Is there a way to see all of my own suggestion lists? This doesn't seem obvious and it took me a while to realise how to get to my own suggestions in order to remove one
  • There isn't, and this is a good idea. Right now (as I'm sure you figured out) you have to click through to "View all" to see the list page version of the suggestion list, where the delete button is shown, and you would have to do that for every book you've made a recommendation on. A page that aggregates all the suggestions you made on any book would be very sensible.
5. We should definitely update the guided tour once this is implemented – I figured out how to "endorse" a recommendation but it's not necessarily obvious.
  • 👍
6. Consider adding a button to add each suggested book to your `To Read` shelf immediately
  • Love this
7. If I'm understanding correctly, we're suggesting `Editions` for a given `Work`. This seems surprising - this basically means if I'm looking at an edition I'll get a bunch of editions recommended based on the parent work? I think `Work` is the right level, so I'd expect to see recommendations of `Work` for another `Work` – am I missing something?

This is a weird one and I'm not 100% sure it's the right design choice, but I'll walk you through how I got there.

I used work so that, for example, a paperback edition vs a hardcover one don't have separate suggestion lists. The main downside I foresee to that is that different language editions may have suggestions for other language editions.

I went with edition for the suggestion because it gives the user who makes the suggestion more control of what they are recommending (you can choose a translation, for example, or the cover art you prefer), and it works with the existing List code, which allows it to be a subclass of the List model, and also use the same templates.

I feel pretty confident that it doesn't make sense to use Edition for both, but there would be advantages to using Work for both (the main one I can see is that you could show a user an edition in a particular language (in theory, in practice we're not there and there're barriers to knowing what language a book is in))

@hughrun
Copy link
Copy Markdown
Member

hughrun commented Oct 17, 2025

Makes sense.

My 2c is that it should match Work to Work. My thinking:

  1. It would make possible future discovery options where we can link together chains of recommendations (A is recommended for people who like B; C is recommended for people who like A; therefore C might also be a good match for people who like B) - we could do this at Edition level but it would be cleaner and stronger to do it at Work level
  2. It would prevent us having recommendation lists with e.g. 24 different editions of LotR
  3. Whilst it's complex, we need to do the work of making languages more tightly structured/controlled anyway. In future we would ideally be able to default to the user's chosen language if an Edition exists in that language in all situations, including recommendation lists
  4. If I'm recommending a book to people who like some other book, I'm not convinced that the format (paperback, audiobook) is all that important - it's the content I'm recommending

@joachimesque
Copy link
Copy Markdown
Contributor

(I haven’t followed this PR much because of life stuff, but I love you all for keeping working on it, it means a lot and I’m happy to see the little spark I sent to the world being made into real fire by you all, thanks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants