[loggi-d7a] Improve stats grid layout & reduce default-visible charts #112
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-d7aType: task
Priority: P2
Status: closed
Close reason: Implemented responsive 2-column grid layout (sm:grid-cols-2) with full-width (sm:col-span-2) for summary/heatmap/trend charts and half-width for hourly/weekday. Reduced default-visible charts: Daily Activity, Time of Day, Day of Week now hidden by default. Added size property to PLOT_REGISTRY for card sizing. Fixed Dockerfile to include JS files in Tailwind content scan.
Why
The stats grid is single-column (
grid-cols-1), wasting space on tablet/desktop. All 9 charts default to visible, which overwhelms users on first visit.What
Layout changes
#statsGridfromgrid-cols-1to responsive:grid grid-cols-1 sm:grid-cols-2 gap-4sm:col-span-2) since they need the horizontal spacemaintainAspectRatio: false+responsive: truealready setDefault visibility changes
Update
PLOT_REGISTRYinstats.js:defaultVisible: true— Summary, Calendar Heatmap, Duration (timerange), Session Trend (timerange), Frequency Trend (timepoint), Writing Activity (diary)defaultVisible: false— Daily Activity, Time of Day, Day of WeekCard sizing
data-plot-sizeattribute or a size map sorenderStatsGrid()can assignsm:col-span-2to full-width cardsWhere
app/templates/entry.html— grid classes on#statsGridapp/static/js/stats.js—PLOT_REGISTRYdefaults,renderStatsGrid()card sizing logicAcceptance criteria
sm:+ screenslocalStorageprefs still respected (only new users get new defaults)