Skip to content

fix: blog grid partial-row grey background and date off-by-one#16

Merged
ajbozarth merged 2 commits intogenerative-computing:mainfrom
ajbozarth:fix/blog-grid-and-date
Apr 20, 2026
Merged

fix: blog grid partial-row grey background and date off-by-one#16
ajbozarth merged 2 commits intogenerative-computing:mainfrom
ajbozarth:fix/blog-grid-and-date

Conversation

@ajbozarth
Copy link
Copy Markdown
Contributor

What

Two visual bugs on the blog listing page:

  • Grey background on partial grid row — the blog grid used a background: var(--border) + gap: 1px trick to draw separator lines between cards. When the last row isn't full (e.g. 4 posts in a 3-column grid), the empty cells expose that grey background as a large block. Replaced with border-top/border-left on the grid container and border-right/border-bottom on each card, so separators only appear where cards exist. Hover accent switches to outline to avoid layout shift.

  • Dates showing one day earlynew Date("2026-04-20") parses as UTC midnight, which shifts to the previous day in negative-UTC-offset timezones. Fixed by constructing the date in local time via new Date(year, month - 1, day).

Test

  • Blog listing with 4+ posts: last row has no grey fill in the empty columns
  • Blog card dates match the front matter date in your local timezone

Screenshots

Before:

Screenshot 2026-04-20 at 10 31 35 AM

After:

Screenshot 2026-04-20 at 10 27 24 AM

Replace grid background-color separator trick with card borders so empty
grid cells no longer show grey when the last row is partial. Fix date
parsing to use local time constructor instead of UTC string parsing which
caused dates to display one day early in negative UTC offset timezones.

Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
@ajbozarth ajbozarth self-assigned this Apr 20, 2026
@ajbozarth ajbozarth requested a review from a team as a code owner April 20, 2026 15:37
@ajbozarth ajbozarth requested review from markstur and nrfulton and removed request for a team April 20, 2026 15:37
@ajbozarth ajbozarth added the bug Something isn't working label Apr 20, 2026
Copy link
Copy Markdown
Contributor

@AngeloDanducci AngeloDanducci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ajbozarth ajbozarth added this pull request to the merge queue Apr 20, 2026
Without this event, required status checks never run when a PR enters
the merge queue, causing it to stall indefinitely.

Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
@ajbozarth ajbozarth removed this pull request from the merge queue due to a manual request Apr 20, 2026
@ajbozarth ajbozarth enabled auto-merge April 20, 2026 19:08
@ajbozarth ajbozarth added this pull request to the merge queue Apr 20, 2026
Merged via the queue into generative-computing:main with commit 11b8ef2 Apr 20, 2026
6 checks passed
@ajbozarth ajbozarth deleted the fix/blog-grid-and-date branch April 20, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants