You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: prompts/frameworks/cakephp.md
+96Lines changed: 96 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -506,6 +506,102 @@ Use these Claude Code capabilities at the right time to save effort and catch mi
506
506
507
507
---
508
508
509
+
## Mobile-First UI/UX Design Guidelines
510
+
511
+
> These guidelines are for building CakePHP template UIs used by **non-technical users on mobile phones with slow mobile networks**.
512
+
513
+
### Navigation
514
+
515
+
1.**Icon-only arrow buttons for prev/next** — Never use text like "Previous" or "Next". Use `<i class="bi bi-chevron-left"></i>` and `<i class="bi bi-chevron-right"></i>` inside `btn btn-sm btn-outline-secondary`. Saves horizontal space on mobile.
Month nav can include short month name next to the arrow (e.g., "Feb >") since there's more space than week labels.
533
+
534
+
4.**"This Week" / "Current Month" button** — Only show when user has navigated away from current period. Hide when already on current period.
535
+
536
+
5.**Preserve filters when navigating** — Carry forward active filters (e.g., category, user_id) via query parameters in prev/next links.
537
+
538
+
### Tables & Data Display
539
+
540
+
6.**No horizontal scrolling on mobile** — Show only essential columns (Name, ID, Total) in the main table. Put detailed/day-by-day data in a **modal popup** triggered by clicking the summary value.
541
+
542
+
7.**Clickable totals for detail drilldown** — Summary numbers (e.g., totals, counts) should be clickable links that open a modal. Style: `text-primary font-weight-bold` with underline.
543
+
544
+
8.**Modal for detail views** — Use `modal-dialog-centered modal-dialog-scrollable`. Layout:
-**Detail table** — Full breakdown (date, category, status)
548
+
-**Link to full page** — "View Full Report" button to the dedicated detail page
549
+
550
+
9.**Skip modal tables for auto-download** — When auto-detecting tables for Excel export, use `table:not(.modal table)` selector so hidden modal tables don't get download buttons.
551
+
552
+
10.**Fractional totals** — When items have partial values (e.g., Full = 1, Half = 0.5), display as integer when whole (e.g., "3"), decimal when not (e.g., "2.5").
553
+
554
+
### Mobile-First Patterns
555
+
556
+
11.**Card-based layouts over table rows** — For primary interaction screens (e.g., status marking, data entry), use cards with large touch targets. Colored left border indicates status (`border-left: 4px solid #28a745`).
557
+
558
+
12.**Sticky filters on mobile** — Filter bars should be `position: sticky; top: 70px; z-index: 100; background: white;` so they stay visible while scrolling.
- Blue (`text-primary`) = Totals / Neutral highlights
592
+
593
+
20. **Confirmation for destructive actions** — `confirm()` before remove/delete. Show spinner on the button during AJAX call.
594
+
595
+
### Component Patterns
596
+
597
+
21. **AJAX search with dropdown** — Textinput+ `position-absolute` `list-group` dropdown. Debounce 300ms. "No results" message. Close on outside click.
598
+
599
+
22. **Bulk action buttons** — Row of action buttons above a list for quick bulk operations. Use `flex-fill` so they share width equally.
600
+
601
+
23. **Date input constraints** — When date picker operates within a specific range (e.g., a week), set `min` and `max` attributes to constrain selection.
602
+
603
+
24. **Page heading element** — Use `ele_page_heading` element. Pass `downloadTableButton => true` for auto Excel download buttons.
0 commit comments