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

Suggestion list #2560

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

joachimesque
Copy link
Contributor

@joachimesque joachimesque commented Jan 1, 2023

Books now can have a list of suggestions at the bottom of the page.

A List of suggestions has:

  • a one-to-one relationship with a book
  • name: ""
  • description: ""
  • curation: open
  • privacy: public
  • group: None

In this PR

  • Lists are displayed at the bottom of the Book page
  • You can create a list if it doesn't exist
  • You can search for books to add to the list from the Book page (in the same manner as on the list page)
  • You can add books from suggestion search results
  • You can view the list in the List view, but some settings are disabled
  • TODO : display the right info about lists in the Book page column

Next steps

  • Use endorsement field in ListItem to allow upvotes on books in lists, and ordering by upvote
  • Restrict curation to admins (the author of a list is irrelevant for Book suggestions)
  • Allow anyone to add comments on list items?

Problems

  • I hesitated between "suggestion" and "recommendation". what do you all prefer?
  • what if two users from different servers create lists for the same book? Should they merge?

@mouse-reeve
Copy link
Member

I think I successfully fixed the merge conflict logic-wise, even though I did not succeed in making Black happy. If you run black and make a merge migration things should be back in order

@mouse-reeve
Copy link
Member

I tried it out and this is so cool! There are a few UI things I ran into, but I'm guessing you're not at the point where that would be helpful yet.

  • I hesitated between "suggestion" and "recommendation". what do you all prefer?

I think "recommendation" is more standard, so I'd default to that

  • what if two users from different servers create lists for the same book? Should they merge?

Oh good question! I think having the lists merge makes the most sense as a user, but it might be weird to handle from a technical perspective 🤔

@joachimesque
Copy link
Contributor Author

joachimesque commented Jan 12, 2023

  • what if two users from different servers create lists for the same book? Should they merge?

Oh good question! I think having the lists merge makes the most sense as a user, but it might be weird to handle from a technical perspective 🤔

Right now I've set the List with a one-to-one relationship to the Book. With the problem of federation, multiple lists should be associated with the Book (is it a ForeignKey relationship?). What do you think of the idea of creating a new ProxyList list type, that's not really a list, but a merge of multiple lists? The interface displays the ProxyList, and whenever the user adds a book to the list, it gets added to the instance's own list for that book (that gets shown in the ProxyList)

There should also be a mechanism for asking other instances for their List for a book. Is there a way to have the list of all instances that have the same book? If not, do you think it would be hard to implement? (that would be on another PR, but it's vital for the feature IMO)

@joachimesque
Copy link
Contributor Author

@mouse-reeve I'm open to a re-read of this PR. There are still questions about federation and all that, it's a domain I don't know much about :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants