BookLore
BookLore copied to clipboard
Allow sidebar count badge to auto-size for larger numbers
Based on issue #356 What’s changed?
Dropped the hard-coded 30px badge width so counts can grow.
Added min-width: 4ch to the count button so 1–4 digit numbers (or more) never get clipped.
Why? Some library counts were three-digit (or up to four-digit) and were getting cut off in the sidebar. This tweak lets the badge size itself to its content.
How to test?
Inspect the badge in DevTools and swap in a “1234” label to confirm it expands.
(Optional) Add a dummy library with bookCount$: of(1234) in initMenus() and refresh to see it live.
Thanks for the fix! Noticed that the badge content is expanding, but the numbers seem a bit misaligned vertically now. Might need a quick tweak to the padding or line-height. Appreciate all your PRs, really helpful stuff!
Good catch! I'll look at it again