Skip to content

Commit 3f24ac5

Browse files
committed
docs: clarify headless ui guidance
1 parent 9f9beb4 commit 3f24ac5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
- Naming: prefix base components with `Base` (e.g., `BaseButton`), singletons with `The` (e.g., `TheHeader`). Component directories use **kebab-case** to avoid import-casing issues (e.g., `components/app-shell`).
4747
- Imports & aliases: use `@/` paths; avoid deeply relative imports. Do not wrap imports in try/catch.
4848
- State/routing: register Pinia and Vue Router in the app bootstrap (`src/main.ts`); place stores and routes in their respective directories; keep sample stores/routes minimal and non-domain-specific unless requirements dictate.
49-
- UI patterns: build interactive overlays/menus with Headless UI components (e.g., Menu/Popover) styled using Tailwind for accessibility and focus management; prefer Headless UI over bespoke or Vuetify menu implementations. Favor descriptive variable names; reserve single letters for simple loop indices only.
49+
- UI patterns: default to Headless UI components (Menu/Popover/Dialog/etc.) styled with Tailwind for interactive overlays, menus, and similar behaviors; reach for fully custom components only when no suitable Headless UI primitive exists or when Headless UI would not improve accessibility/UX.
50+
- Tooltips: do not use native `title` attributes for hover text; prefer an accessible, prebuilt tooltip/popover pattern (Headless UI equivalent where available) that can be styled with Tailwind.
51+
- Favor descriptive variable names; reserve single letters for simple loop indices only.
5052
- Testing: prefer data-cy selectors in Cypress; use Vue Test Utils with jsdom for units. Keep example tests lightweight.
5153
- Filesystem hygiene: avoid introducing new top-level folders without alignment to the existing structure; keep generated artifacts out of source control.
5254
- Commit messages: follow Conventional Commits (`feat:`, `fix:`, `chore:`, etc.).

0 commit comments

Comments
 (0)