mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-03 08:07:21 +00:00
Nest Loading and Empty States under Design Standards in AGENTS.md
Moves the section below the design rules list and demotes it from ## to ### so it reads as a subsection rather than a standalone top-level topic.
This commit is contained in:
1 file changed
+14
-14
@@ -291,7 +291,20 @@ Routes live in `AppRouter.tsx`. To add one:
|
||||
|
||||
The router provides automatic scroll-to-top on navigation and a 404 `NotFound` page. The `/:nip19` route is already wired (see the `nip19-routing` skill).
|
||||
|
||||
## Loading and Empty States
|
||||
## Design Standards
|
||||
|
||||
Designs should be polished and production-ready. Concrete rules:
|
||||
|
||||
- **Responsive** down to ~360px; test mobile, tablet, desktop.
|
||||
- **WCAG 2.1 AA**: ≥ 4.5:1 contrast for body text, ≥ 3:1 for large text and UI elements. Full keyboard nav, ARIA labels, visible `focus-visible` rings.
|
||||
- **8px grid** for spacing (Tailwind's 4-based scale). Don't sprinkle `p-[13px]`-style one-offs.
|
||||
- **Typography hierarchy**: ≥ 18px body, ≥ 40px primary headlines. Prefer a modern sans (e.g. Inter) for UI and pair a display/serif for headings when personality is needed.
|
||||
- **Depth**: soft shadows, gentle gradients, rounded corners (`rounded-lg` / `rounded-xl`). Avoid heavy drop shadows.
|
||||
- **Motion**: lightweight, purposeful (hover, scroll reveals, transitions). Respect `prefers-reduced-motion` with Tailwind's `motion-safe:` / `motion-reduce:` variants.
|
||||
- **Reusable components**: consistent variants and feedback states (`hover`, `focus-visible`, `active`, `disabled`, `aria-invalid`). Use `cn()` for conditional classes and `class-variance-authority` for variants (copy an existing `ui/` component as a template).
|
||||
- **Custom over generic**: avoid template-looking headers — combine layered visuals, subtle motion, and brand colors. Generate custom images with available tools before reaching for stock.
|
||||
|
||||
### Loading and Empty States
|
||||
|
||||
**Use skeletons** for structured content (feeds, profiles, forms). **Use spinners** only for buttons or short operations.
|
||||
|
||||
@@ -327,19 +340,6 @@ For empty results, show a minimalist empty state in a `border-dashed` card:
|
||||
</Card>
|
||||
```
|
||||
|
||||
## Design Standards
|
||||
|
||||
Designs should be polished and production-ready. Concrete rules:
|
||||
|
||||
- **Responsive** down to ~360px; test mobile, tablet, desktop.
|
||||
- **WCAG 2.1 AA**: ≥ 4.5:1 contrast for body text, ≥ 3:1 for large text and UI elements. Full keyboard nav, ARIA labels, visible `focus-visible` rings.
|
||||
- **8px grid** for spacing (Tailwind's 4-based scale). Don't sprinkle `p-[13px]`-style one-offs.
|
||||
- **Typography hierarchy**: ≥ 18px body, ≥ 40px primary headlines. Prefer a modern sans (e.g. Inter) for UI and pair a display/serif for headings when personality is needed.
|
||||
- **Depth**: soft shadows, gentle gradients, rounded corners (`rounded-lg` / `rounded-xl`). Avoid heavy drop shadows.
|
||||
- **Motion**: lightweight, purposeful (hover, scroll reveals, transitions). Respect `prefers-reduced-motion` with Tailwind's `motion-safe:` / `motion-reduce:` variants.
|
||||
- **Reusable components**: consistent variants and feedback states (`hover`, `focus-visible`, `active`, `disabled`, `aria-invalid`). Use `cn()` for conditional classes and `class-variance-authority` for variants (copy an existing `ui/` component as a template).
|
||||
- **Custom over generic**: avoid template-looking headers — combine layered visuals, subtle motion, and brand colors. Generate custom images with available tools before reaching for stock.
|
||||
|
||||
For font installation, color-scheme changes, light/dark theming, or the `isolate` + negative-z-index gotcha, load the **`theming`** skill.
|
||||
|
||||
## Writing Tests vs. Running Tests
|
||||
|
||||
Reference in new issue
Block a user