Calendar: an icon on each view button (Month, Week, Day, Agenda), icons only on small screens #904
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#904
Loading…
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?
Give each button of the calendar's view switcher (#861) a Lucide icon. On small screens, show the icons only.
calendar-dayscalendar-rangecalendar-clocklist-clockcalendar-1would be the obvious icon for Day, but it is already the middle button of the period group (Today / This month / This week, #858). Using it twice on one page would give one icon two meanings.Where
templates/applications/calendar.html:191-196: thedata-viewsbutton group. Each button is an<a class="btn …">{{ label }}</a>with text only, andmax-sm:min-w-0 max-sm:flex-1 max-sm:px-1squeezes the four of them into 320 px.applications/agenda.py:683-693:Page.switcheryields(view, label, url, current).VIEW_LABELSis at:757.assets/icons.txt:calendar-range,calendar-clockandlist-clockare not synced yet. lucide-static 1.41.0 has all three.What to do
iconto each entry (aVIEW_ICONSmap besideVIEW_LABELS, and a fifth element inswitcher). Sync the three missing icons.{% icon view_icon %}<span class="btn-label">{{ label }}</span>, the same shape as the period group's buttons. Give each linkaria-labelwith the view's name, so it keeps its accessible name when the label is hidden.aria-current="page"stays on the open view.sm(40rem), hide the labels visually and show the icons only. The rule already exists for button groups:@media (width < 40rem) { body:not([data-buttons="labels"]) [role="group"] .btn-label { …sr-only… } }. The switcher isrole="group", so it follows once the label sits in a.btn-labelspan. Drop themax-sm:px-1squeeze if the icons fit without it. The four buttons still share the full width.Done when
aria-current.Checked against
mainat75f31208b.Fixed in
560deb0a0.