docs
This commit is contained in:
51
docs/architecture/website/BLOCKERS.md
Normal file
51
docs/architecture/website/BLOCKERS.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# Blockers (Website UX)
|
||||
|
||||
This document defines **Blockers** as UX-only prevention mechanisms in the website.
|
||||
|
||||
Shared contract: [`docs/architecture/shared/BLOCKERS_AND_GUARDS.md`](docs/architecture/shared/BLOCKERS_AND_GUARDS.md:1)
|
||||
|
||||
## 1) Definition
|
||||
|
||||
A Blocker is a website mechanism that prevents an action from being executed.
|
||||
|
||||
Blockers exist solely to improve UX and reduce unnecessary requests.
|
||||
|
||||
Blockers are not security.
|
||||
|
||||
## 2) Responsibilities
|
||||
|
||||
Blockers MAY:
|
||||
|
||||
- prevent multiple submissions
|
||||
- disable actions temporarily
|
||||
- debounce or throttle interactions
|
||||
- hide or disable UI elements
|
||||
- prevent navigation under certain conditions
|
||||
|
||||
Blockers MUST:
|
||||
|
||||
- be reversible
|
||||
- be local to the website
|
||||
- be treated as best-effort helpers
|
||||
|
||||
## 3) Restrictions
|
||||
|
||||
Blockers MUST NOT:
|
||||
|
||||
- enforce security
|
||||
- claim authorization
|
||||
- block access permanently
|
||||
- replace API Guards
|
||||
- make assumptions about backend state
|
||||
|
||||
## 4) Common Blockers
|
||||
|
||||
- SubmitBlocker
|
||||
- ThrottleBlocker
|
||||
- NavigationBlocker
|
||||
- FeatureBlocker
|
||||
|
||||
## 5) Canonical placement
|
||||
|
||||
- `apps/website/lib/blockers/**`
|
||||
|
||||
Reference in New Issue
Block a user