Skip to content

Commit cb16a24

Browse files
committed
feat: enhance admin frontend guidelines for consistent layout and modal usage
1 parent 363896e commit cb16a24

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/agents/frontend-implementer.agent.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ You are a frontend specialist for booking-calendar.
1818
- Avoid introducing inconsistent UI patterns.
1919
- Prefer existing API client patterns in `src/client/src/api.ts`.
2020
- Keep mobile and desktop behavior stable.
21+
- Keep admin list pages (`AppointmentsPage`, `LinksPage`, `EventsPage`) consistent in header/action placement and list-card structure.
22+
- Prefer modal-based create flows for admin pages when matching existing UX.
2123

2224
## Workflow
2325

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
- Respect route declaration order in `src/server/index.ts`; generic dynamic routes can shadow specific routes.
4545
- Read environment values through `src/server/config.ts` conventions. Do not assume `dotenv`; this project uses a custom `.env` loader.
4646
- Treat `VITE_*` variables as build-time client variables. Rebuild frontend when they change.
47+
- Keep admin frontend pages (`Appointments`, `Links`, `Events`) aligned in layout and interactions; prefer header-level primary actions and modal-based create forms.
4748
- No dedicated automated test suite is configured yet. Always run `bun run check` before finishing substantial code changes.
4849

4950
## Key References

.github/instructions/frontend.instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ applyTo: "src/client/src/**/*.ts, src/client/src/**/*.tsx, src/client/src/**/*.c
1010
- Keep user-facing copy in translation files (`src/client/src/i18n/*.json`) and use key-based lookups.
1111
- Keep API access centralized in `src/client/src/api.ts` unless there is an established exception.
1212
- Prefer extending existing page/component patterns before introducing new abstractions.
13+
- Keep admin list pages (`AppointmentsPage`, `LinksPage`, `EventsPage`) visually aligned: title/description on the left, primary action on the right.
14+
- For create actions on admin list pages, prefer opening forms in BaseUI modals instead of inline blocks unless the request explicitly asks otherwise.
15+
- Reuse existing card-list and empty-state patterns before inventing a new page-specific layout.
1316
- Preserve PWA behavior and service-worker assumptions when changing app bootstrapping.
1417
- Treat `VITE_*` values as build-time variables; if behavior depends on them, mention rebuild impact.
1518

.github/prompts/add-frontend-page.prompt.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Requirements:
1313
- Use centralized API helpers in `src/client/src/api.ts` where possible.
1414
- Keep desktop and mobile usability in mind.
1515
- Preserve existing visual language and avoid unrelated design-system drift.
16+
- For admin list pages, align header/action layout with existing `Appointments`, `Links`, and `Events` pages.
17+
- Prefer modal-based create/edit forms on admin pages unless an inline form is explicitly requested.
1618

1719
Expected output:
1820

0 commit comments

Comments
 (0)