Repository navigation
feat(ui): relative time display — timeAgo helper across lists (v1.17 B) - #42
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rant
2026-08-17T16:57:17(UI/UE 多角度深化优化), item B — 相对时间显示: replace absoluteMM-DD HH:mmtimestamps with relative time across all lists, with the full absolute time available on hover (titleattribute).Changes
ui/js/app.js:timeAgo(s)— formats刚刚 / N 分钟前 / N 小时前 / 昨天 / MM-DD; supportsMM-DD HH:mm(assumes current year) andYYYY-MM-DD[ HH:mm]; non-standard input returned as-is;timeCell(s)— outputs a.timeagocell withtitle= full absolute time (hover).timeCelltimeCelltimefield to SHARINGS mock data; header + empty-state row count updated)last) →timeCell(same absolute-time pattern, unified).timeago { white-space: nowrap; cursor: help; }docs/user-stories.mdv1.17 changelog adds item B;ui/README.md时间显示约定 section.Acceptance
Relative time visible in all three named lists; hover shows full time via
title.Tests
node --checkon app.js + data.js — syntax OKtimeAgo(刚刚/分钟/小时/昨天/MM-DD, both date formats, bad input) — all PASScargo test— 1 passedcargo fmt --check— clean