docs: add frontend development guidelines

This commit is contained in:
2026-08-26 15:29:11 +08:00
parent f7601d554e
commit faaa33717f
8 changed files with 213 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
# Component Guidelines
Use typed React function components. `App.tsx` owns session/editor composition, while reusable map and UI concerns live in named components. Prefer the shared `ui/button.tsx` primitive for commands. Do not create business UI with `querySelector` or `innerHTML`.
Forms use controlled inputs and submit handlers. Keep map canvas DOM owned by OpenLayers and surrounding controls owned by React.