-
Notifications
You must be signed in to change notification settings - Fork 494
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
Bookshelf and cards refactoring #3037
Conversation
The last commit fixes #2774. If you don't want this now, I can remove it - I just wanted to demonstrate how it's quite easy now to make changes to a card that increase its height, by just adding the required html to the card template, and without needing to modify height calculations anywhere - all layout modification to the bookshelf or other card containers happen automatically! |
OK, please hold on with reviewing, I found some issues with tailwind font-size and line-height replacements. |
… with em-based variants
So, an update (sorry it took quite a bit, I've been on vacation for most of the last couple of weeks): it looks like fully migrating to em-based spacing and font-sizing tailwind classes as a default has all sorts of side-effects on components unrelated to this refactoring (mostly due to know shrinking font issues). I tried fixing some of these but it just seems like too much changes all over the place. I ended up reverting the the move to default em-based spacing and font-sizing. Instead:
Now everything within the various bookshelf pages scales well when the cover size changes, and many things that didn't scale properly before (spacing, divider sizes font-size, material icon sizes, etc.) now scale correctly. In addition, the authors page can now also be scaled according to sizeMultiplier. I think this is ready for review now. |
…arrow overlay height
This is working great in my testing. I don't think we should include the show subtitles in this PR. |
Sure, I'll revert that, and rework it in a different PR based on your comments. |
Great, thanks! |
@mikiher Fantastic work, thanks a lot! |
Thanks, will look at this when I get back home tomorrow.
…On Thu, Aug 22, 2024, 01:30 advplyr ***@***.***> wrote:
I just noticed that the LazyCollectionCard isn't updated for non-square
covers anymore.
image.png (view on web)
<https://github.com/user-attachments/assets/7ef91ef5-48e0-4e5f-979b-86db4d73aa27>
vs on the collection landing page
image.png (view on web)
<https://github.com/user-attachments/assets/2ebf3000-f18b-4388-862a-cd831ba663ad>
—
Reply to this email directly, view it on GitHub
<#3037 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFMDFVWCZ5CLO2RXXBBJTMLZSUIIHAVCNFSM6AAAAABIV2XLGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBTGE3DIMRVGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This refactoring addresses a number of issues I found while trying to add display of an optional subtitle line (which I left out at the moment):
sizeMultiplier
is used many times in each of the cards.sizeMultiplier
. This clutters the code quite a bit.sizeMultiplier
is computed differently in each of the cards, although the result should be the samebookCoverAspectRatio
is passed as propThe following bookshelf fixes and refactoring were implemented (with the intention of leaving functionality as-is, except for bug fixes):
This was due to booksPerFetch having static values. It was fixed to have a value depending on the the number of books per shelf and the number of shelfs per page.
I've tested this quite extensively in library, search, and home pages, in both stadard and detail view, while changing cover sizes back and forth. I believe all is working as intended now.