Skip to content

fix(edit-content): show exact date/time in History cards, remove relative time and tooltip - #36450

Merged
oidacra merged 3 commits into
mainfrom
issue-36374-history-cards-exact-date-time
Jul 9, 2026
Merged

fix(edit-content): show exact date/time in History cards, remove relative time and tooltip#36450
oidacra merged 3 commits into
mainfrom
issue-36374-history-cards-exact-date-time

Conversation

@jcastro-dotcms

@jcastro-dotcms jcastro-dotcms commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

Closes #36374.

The History side panel's Version cards always showed relative time (now, two days ago), with the exact date/time only revealed via a hover tooltip — and the current/working version showed a static Current label instead of any date at all. Per the ticket, cards now always display the exact date/time (e.g. May 16, 2026 - 1:10 PM), for every version including the current one.

  • dot-history-timeline-item: time display now always renders {{ modDate | date: 'MMM d, yyyy - h:mm a' }} — the working"Current" special case and the dotRelativeDate pipe usage are removed.
  • The separate hover-to-reveal ellipsis menu + inode display (Side Panel — History: ellipsis menu by version status, active card state, and layout updates #35888) is untouched.
  • Cleaned up dead code found while in this file: an unused inject(DatePipe) field/providers entry, and the now-unused DotRelativeDatePipe import.

Scope extension (flagging for reviewers): the sibling Push Publish cards, in the same History panel (dot-pushpublish-timeline-item), had the identical relative-time + tooltip pattern. This wasn't explicitly called out in #36374, but we fixed it too for UI consistency within the same panel — same treatment: exact date/time always shown.

Update: the hover tooltip was initially kept (with just its redundant date line dropped) but Product decided afterward to remove the tooltip entirely on both card types. Flagging for reviewers: this means some fields that only ever lived in the tooltip are no longer shown anywhere in the UI:

  • Versions cards: content title and languageFlag are no longer displayed (the experiment variant is still indicated via the existing "Variant" tag chip, just not its actual value).
  • Push Publish cards: environment name and the full bundleId text are no longer displayed (the bundle ID remains copyable via the existing copy button, just not shown as text).

Test plan

  • Updated/added unit tests (Jest/Spectator) for dot-history-timeline-item: exact-format assertions for both working and non-working versions, AM/PM boundary cases (12:00 AM, 12:00 PM, 1:10 PM), a guard that no version ever renders "now"/"ago"/"current", and a guard that no tooltip is rendered
  • Added unit tests for dot-pushpublish-timeline-item asserting exact-format output with no relative string and no tooltip
  • pnpm nx test edit-content — all 40 relevant tests passing
  • pnpm nx lint edit-content — clean (only pre-existing, unrelated warnings)
  • Manually verified live against a fresh local Docker build (dotcms/dotcms-test:1.0.0-SNAPSHOT): History → Versions panel shows exact date/time for all versions including the currently published one, no tooltip on hover

🤖 Generated with Claude Code

This PR fixes: #36374

The History side panel's Version cards always showed relative time
(now, two days ago) with the exact date/time only revealed via a
hover tooltip. Per #36374, cards now always display the exact
date/time (e.g. May 16, 2026 - 1:10 PM) so users don't have to hover
to know when a version was created, including for the current/working
version which previously showed a static "Current" label instead of
any date. The tooltip is kept but no longer duplicates the date since
it's now always visible; title/language/variant info in it is
unchanged.

Applied the same fix to the sibling Push Publish cards in the same
panel for UI consistency, since they had the identical relative-time
+ tooltip pattern (not explicitly part of #36374, called out
separately for reviewers).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Claude finished @jcastro-dotcms's task in 3m 31s —— View job


Code Review

Reviewed the full diff (fa8d8c96..HEAD, 3 commits) covering the History and Push Publish timeline items.

  • Analyzed context & PR diff
  • Verified no leftover/unused imports after tooltip + relative-date removal
  • Checked template ↔ component import consistency
  • Reviewed test coverage and timezone safety

New Issues

No issues found.

Notes

  • Clean removal. TooltipModule, DotRelativeDatePipe, DotFormatDateService, the inject(DatePipe) field, and the providers: [DatePipe] entries are all fully removed with no dangling references in either .html, .ts, or .spec.ts. DatePipe correctly remains in the imports array of both standalone components since the date: pipe is still used in the templates.
  • Timezone-safe tests. The specs build dates with new Date(2026, 4, 16, 13, 10) (local time) and DatePipe formats in local time by default, so wall-clock assertions like "1:10 PM" hold regardless of the CI timezone — no flakiness introduced.
  • Prior review comments resolved:
  • Good guard tests: the "never renders now/ago/current" loop and the tooltipPosition / overlay-title absence assertions lock in the intended behavior well.

One non-blocking product/UX consideration (already flagged by the author in the PR description, not a code defect): removing the tooltips drops title / languageFlag from Version cards and environment / bundleId text from Push Publish cards from the UI entirely. That's a deliberate Product decision per the PR description — worth confirming AC-4 on #36374 is updated so QA doesn't fail against the old text.

LGTM. ✅
issue-36374-history-cards-exact-date-time

Product decided to drop the date/time hover tooltip entirely rather
than keep it for the remaining title/language/variant (Versions) or
environment/bundle (Push Publish) info, now that #36374 makes cards
always show the exact date/time up front.

Note: this removes the only place some fields were visible in the UI
- Versions cards no longer show content title or language flag
  anywhere (the experiment variant is still indicated via its tag
  chip, just not the variant name/value).
- Push Publish cards no longer show the environment name or full
  bundle ID as text (the bundle ID is still copyable via the existing
  copy button).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The third it.each case (13:10 -> 1:10 PM) exactly duplicated the two
it() tests directly above it, adding no new coverage. Swapped for
23:59 -> 11:59 PM to actually exercise a distinct boundary.

Addresses PR review feedback from @oidacra.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@oidacra
oidacra enabled auto-merge July 9, 2026 17:53
@oidacra
oidacra added this pull request to the merge queue Jul 9, 2026
@mergify

mergify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Merged via the queue into main with commit d42bcec Jul 9, 2026
56 checks passed
@oidacra
oidacra deleted the issue-36374-history-cards-exact-date-time branch July 9, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

History cards: show full date & time, remove relative time and date tooltip (Edit Contentlet)

3 participants