Skip to content

feat(templates): improve highlight date and time in template list created/updated column#484

Merged
Kraci merged 3 commits into
mainfrom
smartly-highlight-date-and-time-in-template-list-en-1151
Jul 9, 2026
Merged

feat(templates): improve highlight date and time in template list created/updated column#484
Kraci merged 3 commits into
mainfrom
smartly-highlight-date-and-time-in-template-list-en-1151

Conversation

@Kraci

@Kraci Kraci commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Improve highlighting of the date and time in the Created/Updated columns of the
Templates list to better visually group rows by day.

Why?

Team behavior is split: most teams have only a few templates (dates alone
differentiate rows), while templates-heavy teams create dozens to thousands per
day (only times differentiate rows). For ~65% of active paying teams the first
page of the table mixes both regimes, so a fixed emphasis on either the date or
the time is wrong for part of the page. The highlight now adapts per row and
emphasizes the part that actually changed.

Highlight rules

For each row, its date is compared with the rows directly above and below
(per column):

  • New date (differs from the row above): the date is rendered using
    text/primary.
  • Start of a same-day group (new date + the row below shares it): both the
    date and the time are rendered using text/primary.
  • Continuation of a same-day group (the row above shares the date): only the
    time is rendered using text/primary; the date drops to text/tertiary.
  • Everything not promoted (including the timezone suffix) stays text/tertiary.

This applies to both the Created and Updated columns at all times, regardless of
which column the table is sorted by or the sort direction. (Previously the logic
only ran on the actively sorted column.)

Screenshot 2026-07-08 at 13 21 35

@Kraci Kraci self-assigned this Jun 30, 2026
@cla-bot cla-bot Bot added the cla-signed label Jun 30, 2026
@linear-code

linear-code Bot commented Jun 30, 2026

Copy link
Copy Markdown

EN-1151

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jul 8, 2026 2:06pm

Request Review

@Kraci Kraci force-pushed the smartly-highlight-date-and-time-in-template-list-en-1151 branch from 122e357 to dbd77cb Compare June 30, 2026 13:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 122e357cd4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/features/dashboard/templates/list/table-cells.tsx Outdated
@Kraci Kraci marked this pull request as ready for review July 8, 2026 14:07

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM — self-contained visual tweak to template list date/time highlighting.

Extended reasoning...

Overview

Single-file change in src/features/dashboard/templates/list/table-cells.tsx. Refactors the two near-identical CreatedAtCell / UpdatedAtCell renderers into a shared DateTimeCell that compares each row's date against its immediate neighbors to decide whether the date part, time part, or both get emphasized. Also removes the previous restriction that only ran the highlight logic on the actively sorted column.

Security risks

None. Pure presentation logic operating on already-rendered data — no auth, network, storage, or user input surfaces are touched.

Level of scrutiny

Low. This is a cosmetic/UX change: two className branches swap between text-fg and text-fg-tertiary based on neighbor comparisons. Worst case is a visual glitch that doesn't affect functionality or data. The 'use no memo' directive plus getRowModel().rows access is a reasonable pattern for reading sibling row state in TanStack Table.

Other factors

  • The prior Codex bot comment about isSortedColumn skipping the non-sorted column is explicitly addressed in this iteration (comment marked resolved) — the current code runs the same logic on both columns unconditionally.
  • Fallback behavior is preserved: when datePart is missing, both flags default to false, keeping tertiary styling.
  • Vercel preview build is green.

@Kraci Kraci merged commit 3ddb061 into main Jul 9, 2026
14 checks passed
@Kraci Kraci deleted the smartly-highlight-date-and-time-in-template-list-en-1151 branch July 9, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants