UI: Add Padding to Images Grid in ChronologicalGallery#588
Conversation
for improved spacing and visual appearance.
WalkthroughA padding class (p-2) is added to the Images Grid container in the ChronologicalGallery component. This is a purely cosmetic layout adjustment with no impact on data handling, state management, or control flow. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
|
|
1 similar comment
|
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
frontend/src/components/Media/ChronologicalGallery.tsx (1)
151-165: Padding fixes hover clipping; align header text and sanity‑check narrow widths.
- Looks good;
p-2provides the needed buffer for scale‑on‑hover.- To keep header text aligned with the grid’s new inner edge, add horizontal padding to the header text:
- <h3 className="flex items-center text-xl font-semibold text-gray-800 dark:text-gray-200"> + <h3 className="flex items-center text-xl font-semibold text-gray-800 dark:text-gray-200 px-2">
- Optional: on ultra‑narrow panes (<240px),
p-2shrinks the grid’s content box and could induce horizontal scroll withminmax(224px, 1fr). If you observe this, either reduce the min to 208px or gate padding by breakpoint (e.g.,p-2 sm:p-2 px-2).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
frontend/src/components/Media/ChronologicalGallery.tsx(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Backend Tests
- GitHub Check: Tauri Build Check (macos-latest, --target aarch64-apple-darwin)
- GitHub Check: Tauri Build Check (windows-latest)
- GitHub Check: Tauri Build Check (ubuntu-22.04)
This PR includes a small UI enhancement that complements the visual update implemented in #552
Previously, the gallery’s image grid lacked adequate padding, causing images on the top, leftmost, and bottom edges to get partially cut off when hovered (due to the scale effect).
A padding layer has now been added to ensure proper spacing and consistent hover behavior.
20251021-1359-33.0365095.mp4
All images in Image Grid now scale equally👇
Recording.2025-10-21.204707.mp4
Summary by CodeRabbit