refactor: eliminate all hardcoded strings in TSX components, enforce project rules in AGENTS.md, lock body scroll in cookie modal
This commit is contained in:
@@ -7,3 +7,26 @@ This version has breaking changes — APIs, conventions, and file structure may
|
||||
This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
|
||||
|
||||
<!-- END:nextjs-agent-rules -->
|
||||
|
||||
# POI Clean House - Project Rules & Guidelines
|
||||
|
||||
## 1. ABSOLUTELY NO HARDCODED STRINGS IN TSX/COMPONENT FILES
|
||||
- **Strict Rule:** Never hardcode text strings, button labels, contact details, headings, descriptions, footers, headers, badges, or placeholder texts in `.tsx` components or page files.
|
||||
- **Dynamic Source:** All content MUST come dynamically from Payload CMS (collections, globals like `Company` and `Navigation`, block fields, seed script, or `@intecion/ipal-kit`).
|
||||
- If a prop is optional, render it conditionally only when present (`{prop && <span>{prop}</span>}`), NEVER provide fallback hardcoded Polish or English text inside JSX.
|
||||
|
||||
## 2. BRANDING & UI GUIDELINES (KÄRCHER STYLE)
|
||||
- Colors:
|
||||
- Primary Yellow: `#FFED00` (Hover: `#FAE100`)
|
||||
- Dark Anthracite: `#1F1F1F`
|
||||
- Deep Black: `#141414`
|
||||
- Industrial Light Gray: `#F4F4F4`
|
||||
- Architecture:
|
||||
- Sharp, geometric corners (`rounded-none` / `0px radius`). No bubbly rounded-3xl or generic AI circles.
|
||||
- Checkboxes: Square with 2px black border, yellow `#FFED00` checked background, and thick black checkmark (`stroke-[3]`).
|
||||
- High contrast typography: Uppercase, bold/black weights with letter-spacing.
|
||||
|
||||
## 3. UX & ACCESSIBILITY
|
||||
- Modals & Overlays:
|
||||
- Must lock background scrolling (`document.body.style.overflow = 'hidden'`) when open to prevent background page scroll leakage.
|
||||
- Must support close on button, Escape key, or backdrop click.
|
||||
|
||||
Reference in New Issue
Block a user