BookLore icon indicating copy to clipboard operation
BookLore copied to clipboard

Allow sidebar count badge to auto-size for larger numbers

Open afairgiant opened this issue 6 months ago • 2 comments

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.

afairgiant avatar May 25 '25 13:05 afairgiant

Screenshot 2025-05-26 at 11 36 59 PM

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!

acx10 avatar May 27 '25 05:05 acx10

Good catch! I'll look at it again

afairgiant avatar May 27 '25 16:05 afairgiant