Refactors reading status Shelf and ReadThrough logic#2170
Refactors reading status Shelf and ReadThrough logic#2170mouse-reeve wants to merge 5 commits intomainfrom
Conversation
Each readthrough should represent a unique instance of reading a book, and so it should have a single status that represents that status of that readthrough. This will be used to place the book on the appropriate "shelves", and should allow for there to be a single active readthrough if a book is in progress. That maeks the `is_active` field unnecessary. Since the status of the readthrough is unambiguous, defining "finished date" and "stopped date" separately is no longer necessary. I've sketched out some database constraints but haven't implemented them yet, because the conflicts might get gnarly and let's take this one step at a time. The migration logic is complex, so this is an untested draft and I'll write unit tests for it in a subsequent commit.
|
Sorry if I'm polluting the conversation, but I'm trying to wrap my head around the model since I would like to start contributing code in the future. For example, in #2058 the user complained that a book couldn't be in "To Read" and "Read" at the same time.
On another note, if we take away the field I apologize in advance if I sound aggresive or haven't expressed myself properly. Look forward to hearing some thoughts on these issues and clear any misunderstandings I may have. |
|
Thank you for reading and asking questions! You don't come across as rude or aggressive at all, I really appreciate the conversation. One thing that may not be obvious from how I wrote the proposal is that
Yes - a book can have an arbitrary number of
Yes, this is one of the issues this refactor will address. The book would show up on both their "Read" and "Currently Reading" shelves in the UI. Since recording reading dates with
Good question - each The one weirdness there is how it should behave if you resume a book after marking it as stopped. The simplest approach would be to create a new Does that answer your questions? |
|
Thank you for the thorough answer! It really did answer my doubts about how the model worked. Regarding your last paragraph, I wager that most people (based on my experience) use the "Stopped Reading" option as an explicit way of marking that they are no longer interested in continuing to read that particular book. (I doubt that someone would annotate the intervals of time where they started/stopped reading a particular book as a way of keeping track of their (PD: Piranesi does look really interesting, thanks for the book recommendation I guess). |
Good news: they run now
I wasn’t sure of what ReadThroughs would imply but the following conversation really helped getting rid of dark areas. in my understanding of it. It might be a good thing to document it properly for non‑native speakers.
From my perspective, they always have been special lists. ;)
Consistency calls for individual privacy settings (extensively used or not). Maybe those settings can be set globally in the user settings, applied by default, and changed occasionally if needed through the “More options” menu? |
|
I’m glad to see this discussion happening again, obviously. Thank you. :) |
|
Thanks for this @mouse-reeve - I think this is definitely the right move.
Seems as good as any, and it is already used throughout docs etc. Alternatively, we might want to call it
I'm not exactly sure what this question is asking, but it makes most sense to me that a readthrough would be an ActivityPub Event which is
Having somewhere to see your read, currently reading, completed, and stopped books is useful. But it's confusing for them to be displayed as "shelves". Perhaps a new tab called "Reading Activity"?
Readthrough privacy on a individual readthrough level is definitely the way to go. I'm thinking of the equivalent in a public library context - a user may be quite happy for the world to know about most of their reading history but maybe not that one book on [insert embarrassing-to-the-reader title here] |

Overview
The overlap between shelves and read-throughs has been a major source of bugs and confusion. I'm trying to figure out how to improve the situation without time travel to bestow my earlier self with the gift of retrospect, so these are my thoughts on moving forward. Various people, mostly notably as I recall, @arkhi, have been trying to tell me this for ages so I apologize for not hearing that earlier!
The functional shelves (to-read, currently reading, read, and stopped reading) should go away completely. The remaining, user-created shelves are left in a somewhat ambiguous state, especially given lists, but let's get back to that. Instead of shelves being involved at all,
ReadThroughs should be the gold standard. EachReadThroughshould have a status (to-read,currently-reading,read, orstopped-reading), and whatever dates the user has added. There are some logical constraints: a "to-read"ReadThroughcannot have started or finished dates, and a "currently-reading"ReadThroughcannot have finished dates. But a finishedReadThroughdoes not need to have any dates associated with it. The finished date and stopped reading date can be the same because aReadThroughcan either be finished or stopped, not both.I think the user interface itself should remain mostly the same. I'm not sure how the ActivityPub serialization needs to change, but it will -- it may be that
ReadThroughs will need to be a completely new object, which is a downside in terms of backwards compatibility, but we're also a pretty small and up-to-date network so I think that's a worthwhile cost if it's the best approach longer-term.This is much simpler and easier to understand. It removes a lot of janky code, like initializing shelves for all new users. But it's a big migration with the potential for data loss so I want to get thorough code review and testing before completing it.
Open Questions
ReadThroughthe best name for this model? Not the most pressing issue but if it's going to change, now would be the time.ReadThroughobjectsReadThroughobjects have individual privacy settings (which makes sense from an ActivityPub perspective)? Or should there be shelf settings somewhere that governs every object (a much weirder solution from a code perspective)?Steps
(Still working on this section)
ReadThroughmodel the better reflect what it needs to storeReadThroughs to the new formatShelfs intoReadThroughsReadThroughupdatesFixes #1737
Fixes #1754
Fixes #2058
Fixes #2075
Fixes #2161
Fixes #2165