[loggi-xzl] Harmonize history cards to consistent 1-row layout across all entry types #109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bead ID:
loggi-xzlType: task
Priority: P2
Status: closed
Close reason: Harmonized all three buildItem functions (timepoint, timerange, diary) to consistent 1-row 3-column layout: [type badge] [primary info — single truncated line] [actions]. Changes: (1) diary now uses flex items-center gap-3 like the others, (2) diary actions moved to separate rightmost column, (3) diary icon sizes fixed to h-5/w-5 sm:h-4/w-4, (4) all types show username inline as '· by username' only for other users via currentUsername comparison, (5) diary text shown as truncated single line instead of multi-line whitespace-pre-wrap, (6) timepoint note shown inline with date.
Why
The three entry types (timepoint, timerange, diary) each render history cards with different structures — different icon column styles, action button placement, icon sizes, alignment, and overall layout. This makes the UI feel inconsistent.
What
Unify all three
buildItemfunctions to share the same 3-column, single-row layout:[type badge] [primary info — single line] [actions]Per-type specifics
formatDateFull(dt)+ truncated note inline + username inlinestart → endinline + username inlineformatDateFull(dt)+ truncated text preview inline + username inline (full text visible on expand/edit only)Harmonization checklist
flex items-center gap-3(diary currently missingitems-center)h-5 w-5 sm:h-4 sm:w-4across all types (diary currently uses h-4/h-3.5)· by usernamerather than on its own linetruncateclassby <username>when the record was created by the current user — only show it for records from other users (shared entries). Usewindow.LOGGI_ENTRY_CONFIG.currentUsername(already available) to compare againstrecord.username.Where
app/static/js/timepoint.js—buildTimepointItem()app/static/js/timerange.js—buildHistoryItem()app/static/js/diary.js—buildDiaryItem()app/static/css/input.css—.record-itemif any shared tweaks neededConstraints
data-record-idon the card element)truncate/line-clamp-1) — no JS trimming