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

WIP: Feat/book series info #3839

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

glorenzen
Copy link
Contributor

I've seen a number of requests for enhancements to Series pages, so I'm working on some simple changes, starting first with showing a Series description. I've added a new context menu item on the series pages, which displays a modal for editing the series, but so far it's just the UI.

Is there an API endpoint for updating a series? I've been looking, and have found the routes for getting all series in a library or a specific series in a library, but nothing for updating.

Related issues:
#711 #3806

@advplyr
Copy link
Owner

advplyr commented Jan 15, 2025

The main reason the series page doesn't already exist is because I couldn't think of a good UI for it.

Can you add some screenshots of what you are thinking it would look like?

@glorenzen
Copy link
Contributor Author

glorenzen commented Jan 15, 2025

I was thinking of just adding the information to the existing series pages. Is there a reason we can't do that? My thought was the description and other metadata can go above the items in the series as text blocks.

I don't have any screenshots of what that would look like, but I do have screenshots of the new Edit Series option and the modal.
image
image

@advplyr
Copy link
Owner

advplyr commented Jan 19, 2025

That was the part I couldn't get to look right. Just adding the description above the list of books. I tried it a while back and it looked strange and couldn't think of a good design for it.

@glorenzen
Copy link
Contributor Author

This layout is pretty simple, but I was just thinking it could look something like this:
series-info-mockup-v1
We could also add an option where users can choose whether the metadata is displayed or not.

@glorenzen
Copy link
Contributor Author

glorenzen commented Jan 23, 2025

@advplyr Also, not sure if you saw my note earlier, but are there API endpoints for Series? I couldn't find any endpoints for updating Series.

@advplyr
Copy link
Owner

advplyr commented Jan 25, 2025

There isn't series endpoints yet.

I think this should be built similar to the authors page but use the lazy bookshelf instead of the horizontal scrolling cards. I could have the sort/filter options above the bookshelf like is done for podcast episodes.
image

@glorenzen
Copy link
Contributor Author

Okay, sounds good. Do you think this should replace the existing template for individual series, or should this be a new page?

@glorenzen
Copy link
Contributor Author

There isn't series endpoints yet.

I saw there are two endpoints in the ApiRouter file, but they look like they are deprecated and I don't believe they are being used.
this.router.get('/series/:id', SeriesController.middleware.bind(this), SeriesController.findOne.bind(this)) this.router.patch('/series/:id', SeriesController.middleware.bind(this), SeriesController.update.bind(this))

Should I use that SeriesController for adding the new methods? Or should I add the logic to the LibraryController, similar to the "/api/libraries/:id/series/:seriesId" route?

@nichwall
Copy link
Contributor

nichwall commented Feb 6, 2025

There isn't series endpoints yet.

I saw there are two endpoints in the ApiRouter file, but they look like they are deprecated and I don't believe they are being used.
this.router.get('/series/:id', SeriesController.middleware.bind(this), SeriesController.findOne.bind(this)) this.router.patch('/series/:id', SeriesController.middleware.bind(this), SeriesController.update.bind(this))

Should I use that SeriesController for adding the new methods? Or should I add the logic to the LibraryController, similar to the "/api/libraries/:id/series/:seriesId" route?

The original method was using the /api/libraries/:id/series/:seriesId, but routes will be replaced by /api/series/:id and similar for everything else.

The library being part of the path is not necessary and will eventually be removed to help simplify things. From an old message on Discord for more context:

"""
The /api/libraries/{id}/series/{seriesId} should be removed now and /api/series/{seriesId} used.
The reason I deprecated /api/series/{seriesId} originally is because early version of series didn't store the libraryId with the series so books across multiple libraries could have had the same series id. When migrating to sqlite I put a libraryId with series and so now the series id is unique to each library.
I never switched the mobile app over to use the libraries/{id}/series endpoint so now I only have to switch the web client back to using /api/series/{seriesId}
"""

@glorenzen
Copy link
Contributor Author

glorenzen commented Feb 6, 2025

There isn't series endpoints yet.

I saw there are two endpoints in the ApiRouter file, but they look like they are deprecated and I don't believe they are being used.
this.router.get('/series/:id', SeriesController.middleware.bind(this), SeriesController.findOne.bind(this)) this.router.patch('/series/:id', SeriesController.middleware.bind(this), SeriesController.update.bind(this))

Should I use that SeriesController for adding the new methods? Or should I add the logic to the LibraryController, similar to the "/api/libraries/:id/series/:seriesId" route?

The original method was using the /api/libraries/:id/series/:seriesId, but routes will be replaced by /api/series/:id and similar for everything else.

The library being part of the path is not necessary and will eventually be removed to help simplify things. From an old message on Discord for more context:

"""
The /api/libraries/{id}/series/{seriesId} should be removed now and /api/series/{seriesId} used.
The reason I deprecated /api/series/{seriesId} originally is because early version of series didn't store the libraryId with the series so books across multiple libraries could have had the same series id. When migrating to sqlite I put a libraryId with series and so now the series id is unique to each library.
I never switched the mobile app over to use the libraries/{id}/series endpoint so now I only have to switch the web client back to using /api/series/{seriesId}
"""

Got it, that makes more sense. Thanks for the clarification! I'll use the /api/series/{seriesId} routes then.

@glorenzen
Copy link
Contributor Author

Here is what I have so far on the Series page:
image
Clicking the edit icon brings up the modal for editing metadata, similar to the Author pages.
image
Thoughts?

@shadowbq
Copy link

shadowbq commented Mar 6, 2025

I also like the author page layout. The Series could have a specific Image or default to the first book in the series as the icon or use "The stack" in the series selection.

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.

4 participants