Skip to content

Leaner chapter rows on desktop - #88

Closed
Squeaks72 wants to merge 1 commit into
AngeloSha:mainfrom
Squeaks72:pr/lean-desktop-chapter-rows
Closed

Squeaks72 wants to merge 1 commit into
AngeloSha:mainfrom
Squeaks72:pr/lean-desktop-chapter-rows

Conversation

@Squeaks72

Copy link
Copy Markdown
Contributor

Summary

A chapter list is hundreds of rows of one series, so anything repeated on each row is repeated hundreds of times. With a mouse, the per-chapter cover is the same picture on every row, the status dot repeats what the title colour and the accent "page x/y" line already say, and two round buttons per row are targets for rows you are not pointing at.

With a wide window (lg) and a fine pointer (pointer-fine):

  • the per-chapter cover and the status dot are hidden,
  • the row's buttons (⬇ save offline, ⋯) fade in for the row under the cursor (group-hover) or with keyboard focus inside it (group-focus-within), and stay visible while that row's menu is open, so the dropdown does not vanish when the pointer moves to it,
  • rows lose some vertical padding (py-2.5 → py-1.5).

The result is roughly three times as many chapters per screen. Select mode keeps the cover, because the selection tick sits on it.

Upstream v0.44.0 wraps the per-row save-offline button in {!isDesktop() && …} for Uchiyomi Desktop. That is kept exactly as is, inside the new hover-reveal wrapper.

Beyond the original patch:

  • Gated on pointer-fine, not on lg alone. A tablet in landscape is lg wide but has no hovering pointer. Tailwind v4's hover: variants only apply under @media (hover: hover), so buttons faded out with a bare lg:opacity-0 would be invisible targets there. Every lean rule is therefore lg:pointer-fine:*, and touch devices of any width keep today's row.
  • The grey "not on the server" rows (GhostRow) get the same treatment. They interleave with chapter rows, and left alone they would keep a 56-px dashed box and a dot while the rows around them do not. Their text would then sit on a different column, and the ☁ / ⋯ buttons would behave differently from the ⬇ / ⋯ one row up. Where the dashed box is hidden, its tick's aria-label ("Read · not on the server", an existing string) is added as sr-only text, so screen readers still hear it.

No new strings. docs/USAGE.md (section 4) has a short note on the denser desktop list.

Type

  • Fix
  • Feature
  • Docs
  • Refactor / chore

Testing

Re-run after rebasing onto v0.45.0 (91b41aa): bff 1857 tests, 1844 pass, 9 fail, 4 skipped — the same 9 embedded-Postgres entrypoint failures main has in this environment (main: 1857 / 1844 / 9 / 4), nothing new; web 431/431; both typechecks OK. The detail below is from the first run, on v0.44.0.
Run in node:24-alpine against a real postgres:16-alpine (TEST_DATABASE_URL set, so the SQL tests run instead of skipping), first on plain main (a8bc502) as the baseline and then on this branch:

main (baseline) this branch
bff tsc --noEmit OK OK
bff tests 1834 tests: 1821 pass, 9 fail, 4 skipped same: 1834 tests, 1821 pass, 9 fail, 4 skipped
web tsc --noEmit OK OK
web tests 421 / 421 421 / 421

The 9 bff failures are the same 9 on both runs, all in entrypointEmbedded.test.ts (the embedded-Postgres entrypoint, which cannot run in this sandbox). npm run test:i18n is the Puppeteer screenshot run (web/test/e2e/i18n.mjs). It needs Chrome and a running app, neither of which the container has, so it fails to launch on both main and this branch. This PR adds no UI strings.

Class-only change in web/app/series/page.tsx; no behaviour to unit-test. I checked the CSS specificity of the Tailwind v4 rules: lg:group-hover:opacity-100 and lg:group-focus-within:opacity-100 compile to .x:is(:where(.group):hover *), which is (0,2,0). That beats lg:pointer-fine:opacity-0 at (0,1,0), so hover and focus reveal the buttons whatever the class order in the stylesheet. I also checked that the pointer-fine variant exists in the installed Tailwind (4.3.3).

Checklist

  • Focused scope (one topic)
  • Matches the existing TypeScript style
  • Docs updated if user-facing (docs/USAGE.md)
  • No new default sources hardcoded to specific sites (the engine system reaches sites by URL)

🤖 Generated with Claude Code

A chapter list is hundreds of rows of one series, so anything repeated per row
is repeated hundreds of times. On a pointer the per-chapter cover is the same
picture every time, the status dot says what the title's colour and the accent
progress line already say, and two round buttons per row are targets only one
row at a time is ever the subject of.

So on lg and up with a fine pointer the cover and dot are hidden, the buttons
appear for the row under the cursor (group-focus-within for the keyboard, pinned
while its menu is open), and the row loses vertical padding -- roughly three
times as many chapters per screen. Touch is untouched, including a tablet wide
enough for lg: no hover there, and the cover is what you aim at. Selection mode
keeps the cover, because the tick sits on it. The grey "not on the server" rows
get the same treatment so the two kinds of row still line up where they
interleave. The per-row Save offline button stays hidden on Uchiyomi Desktop.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AngeloSha added a commit that referenced this pull request Sep 25, 2026
…oading

Read a chapter before adding a series (#91), a source order for new chapters
(#93, first half), swapping in a preferred group's copy once it exists (#93,
second half; closes #81), chapter names borrowed from a source that numbers the
work the same way (#85) and a compact chapter list (#88) -- @Squeaks72's ideas,
rebuilt where the originals could not be merged. Every running download,
including the server's own sweeps, repairs and bulk fetches, now shows with a
Cancel (#82).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AngeloSha added a commit to Squeaks72/uchiyomi that referenced this pull request Sep 25, 2026
@Squeaks72's AngeloSha#88 made a leaner chapter row the default on a computer: no thumbnail, no status dot, and the two
round buttons only when you point at the row. It is a good row for a long list -- and it took the default look
away from everyone: the thumbnail is each chapter's OWN first page, and it carries the read dimming, the accent
progress bar and a deleted chapter's dashed box. The default look stays (lib/effects.ts), so the lean row is a
choice: Profile -> Settings -> Compact chapter list, on this device, off by default.

Their classes, gated. Off, every class is the string that shipped before and no element is added -- an extra
wrapper around the buttons would take a flex gap even with no buttons in it -- and compactChapters.test.ts pins
both. On, only a hovering pointer (`lg:pointer-fine:`) gets it, so a landscape tablet never hides buttons it
cannot hover to reveal, and select mode keeps its box for the selection bubble.

Co-authored-by: Squeaks72 <Squeaks72@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit aa2b4339c7643d2b71c112b42c9c55f45005e76f)
@AngeloSha

Copy link
Copy Markdown
Owner

Thanks. I'm closing this one because it changes how the chapter list looks for every desktop user by default. It hides the chapter thumbnails (each one is that chapter's own first page, not the same picture), the dimming on read chapters, the accent progress bar and the status dot. I keep the default look deliberately, and anything that takes part of it away has to be opt-in, the way Reduce effects is.

I rebuilt it as Profile → Settings → Compact chapter list, off by default, which gives you the denser rows when you turn it on. It shipped in v0.47.0 with credit to you.

@AngeloSha AngeloSha closed this Sep 26, 2026
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.

2 participants