-
Notifications
You must be signed in to change notification settings - Fork 537
web: fix mobile changelog Other Releases section layout #3974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -324,7 +324,7 @@ function RelatedReleases({ | |||||||
| <p className="text-neutral-600">Explore more versions of Char</p> | ||||||||
| </div> | ||||||||
|
|
||||||||
| <div className="grid gap-4 grid-cols-5"> | ||||||||
| <div className="flex overflow-x-auto gap-4 sm:grid sm:grid-cols-5 sm:overflow-visible"> | ||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚩 Inconsistency with DownloadLinksHeroMobile scroll pattern — missing scrollbar-hide The Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||||
| {relatedChangelogs.map((release) => { | ||||||||
| const version = semver.parse(release.version); | ||||||||
| const isPrerelease = version && version.prerelease.length > 0; | ||||||||
|
|
@@ -346,7 +346,7 @@ function RelatedReleases({ | |||||||
| > | ||||||||
| <article | ||||||||
| className={cn([ | ||||||||
| "flex flex-col items-center gap-2 p-4 rounded-lg transition-all duration-300", | ||||||||
| "flex flex-col items-center gap-2 p-4 rounded-lg transition-all duration-300 shrink-0", | ||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 The Root CauseThe flex container is: <div class="flex overflow-x-auto gap-4 sm:grid sm:grid-cols-5 sm:overflow-visible">Its direct children are <Link
key={release.slug}
className={cn(["group block", isCurrent && "pointer-events-none"])}
>But <article className={cn(["... shrink-0", ...])}>Since Impact: On mobile viewports, the release cards will still be compressed/crowded instead of scrolling horizontally, which is the exact issue this PR is trying to fix.
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||||
| isCurrent ? "bg-stone-100" : "hover:bg-stone-50", | ||||||||
| ])} | ||||||||
| > | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚩 Overflow clipping risk: no negative margin trick means scrollable content may be clipped by parent padding
The parent container at
apps/web/src/routes/_view/changelog/$slug.tsx:186appliespx-6padding. ForDownloadLinksHeroMobile(line 261), this is compensated with-mx-6 px-6so the scroll area extends edge-to-edge. However, theRelatedReleasescomponent's flex container at line 327 sits inside that samepx-6parent without any negative margin compensation. This means the horizontal scroll area is constrained within the padded area — the first and last items won't be able to scroll flush to the screen edge, and depending on the number of items, the scroll area might be unnecessarily narrow. This isn't a bug per se (the scroll still works), but it's a different UX from the download links section and may look awkward on very narrow screens.(Refers to lines 186-191)
Was this helpful? React with 👍 or 👎 to provide feedback.