Skip to content

Remove min-height from book title style - #298

Closed
Himura2la wants to merge 1 commit into
fabiodalez-dev:mainfrom
hackerembassy:book-title-min-height
Closed

Remove min-height from book title style#298
Himura2la wants to merge 1 commit into
fabiodalez-dev:mainfrom
hackerembassy:book-title-min-height

Conversation

@Himura2la

@Himura2la Himura2la commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Before
Screenshot 2026-07-27 184920

After
image

Summary by CodeRabbit

  • Correzioni
    • Migliorata la visualizzazione delle card dei libri su dispositivi mobili, mantenendo un’altezza minima coerente per i titoli anche su schermi più piccoli.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8133e7cd-7db6-4530-8935-65dfb55c11b0

📥 Commits

Reviewing files that changed from the base of the PR and between c5905bf and de1b045.

📒 Files selected for processing (1)
  • app/Views/frontend/catalog-grid.php
💤 Files with no reviewable changes (1)
  • app/Views/frontend/catalog-grid.php

📝 Walkthrough

Walkthrough

Nel template del catalogo è stata rimossa la regola CSS mobile che impostava min-height: 2.4em per .book-title, consentendo l’applicazione del valore definito nella regola generale.

Changes

Altezza titoli catalogo

Layer / File(s) Summary
Rimozione dell’override CSS mobile
app/Views/frontend/catalog-grid.php
Il media query non sovrascrive più min-height per .book-title.

Estimated code review effort: 1 (Trivial) | ~2 minuti

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Il titolo descrive correttamente la rimozione del min-height dal titolo del libro nel template catalog-grid.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Himura2la

Copy link
Copy Markdown
Contributor Author

Thanks to Custom CSS working on OPAC pages, I was able to test this xD

@fabiodalez-dev

Copy link
Copy Markdown
Owner

The alignment problem you're pointing at is real. Digging in, though, this specific change doesn't fix it: with .book-title { min-height: 2.8em } still global, removing the mobile 2.4em override just makes the mobile title inherit the taller base — and it doesn't touch what actually misaligns the rows (the optional subtitle, which unlike author/publisher didn't reserve its space).

I've opened #302, which keeps the intent — cards that line up — and makes it work: the subtitle stays conditional (no wasted space on the rows without one), and a per-row script equalises title and subtitle heights so any row that has a subtitle lines up across all its cards, while rows without one stay compact. Closing this in favour of #302.

fabiodalez-dev added a commit that referenced this pull request Jul 28, 2026
CodeRabbit: align() grouped every .book-card on the page by vertical position,
so if a page renders two .books-grid containers, cards from different grids at
the same top could be merged into one logical row and get wrong placeholders /
heights. Iterate over each .books-grid and group only its own cards.
fabiodalez-dev added a commit that referenced this pull request Jul 28, 2026
…ight

CodeRabbit: .book-author has height:1.3em + overflow:hidden but no explicit
line-height, so the default (~1.2) could clip the single line top/bottom. Set
line-height:1.3 to match the box height (.book-meta already pairs 1.5/1.5em).
fabiodalez-dev added a commit that referenced this pull request Jul 28, 2026
CodeRabbit: the spec only exercised a single grid, so a return to global row
grouping wouldn't be caught. Add a case that builds two side-by-side grids
sharing the same row top, and asserts a subtitle in grid A reserves space only
within grid A — grid B (no subtitle) is untouched.
fabiodalez-dev added a commit that referenced this pull request Jul 29, 2026
Release candidate bundling the reviewed catalogue + scraper + i18n work:
- #303 catalogue availability facets, source-derived language stats, Open
  Library 1.0.2 native Goodreads cover scraper, #304 email fixes, review fixes.
- #298 catalogue card row alignment (+ font-swap/thrashing/mobile review fixes).
- UI wording: "series number" → "number in series" (README + en_US); the CSV
  import header mapping is intentionally left unchanged for back-compatibility.

No database migration — availability is derived from circulation state and
language stats from the shipped locale files.
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