Codify edit-where-you-see as a campaign staff UI principle.
Document the in-context editing default for /campanha staff surfaces in PRODUCT.md, a Cursor rule, the project notebook, and the roadmap plan template.
This commit is contained in:
parent
f3302d5dca
commit
a1167849ea
4 changed files with 34 additions and 3 deletions
28
.cursor/rules/campanha-edit-where-you-see.mdc
Normal file
28
.cursor/rules/campanha-edit-where-you-see.mdc
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
description: /campanha staff UIs — edit mutable data in context (not read-only by default)
|
||||
globs: src/app/(campaign)/**/*,src/components/campaign/**/*,src/utilities/campaign*/**,src/utilities/plaza*/**,src/utilities/votePledge*
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Edit where you see (`/campanha`)
|
||||
|
||||
Canonical principle: `PRODUCT.md` § Design Principles — **Edit where you see**. Precedente: B9 (`PlazaList*Control` + `plazaStaffFormActions`).
|
||||
|
||||
When adding or changing a **staff** (coordinator / advisor) view that displays mutable campaign data:
|
||||
|
||||
1. **Default to in-context edit** if the role can update that field — list cell, detail card, queue row — not a dead readout that only links to `/editar`.
|
||||
2. **Reuse existing server actions** and the **same access** as the full form. Thin route wrappers OK; do not invent a generic quick-edit service (<3 call sites → named controls).
|
||||
3. **UX pattern:** named Popover / select / short number input per affordance; touch `min-h-11`; save → server revalidate / RSC refresh. Prefer Enter + explicit save over accidental blur writes on mobile.
|
||||
4. **Keep `/editar` (or long Sheet)** for multi-field strategy forms, rare fields, and flows that need a note or confirmation.
|
||||
5. **Never** expose staff-only fields to `leader`. View models stay role-split.
|
||||
|
||||
## Anti-goals
|
||||
|
||||
- Full-row spreadsheet / data-grid mode
|
||||
- Always-mounted inputs on every list row
|
||||
- Generic `EditableCell` / contentEditable mass edit
|
||||
- Optimistic UI that skips server refresh when the list is source of truth
|
||||
|
||||
## Plan / Impeccable brief
|
||||
|
||||
For UI items (B/C/D): answer explicitly — _does this surface need in-context edit?_ Cite this principle and B9 when yes; name rabbit hole “spreadsheet mode” when scoping.
|
||||
|
|
@ -64,6 +64,7 @@ alwaysApply: false
|
|||
|
||||
## Decisões
|
||||
|
||||
- Em 2026-07-21, **decisão de produto (Field Desk):** em `/campanha`, superfícies staff de visualização que mostram dados mutáveis devem oferecer edição no contexto quando o access permitir (“edit where you see”) — princípio 3 de [`PRODUCT.md`](../../../PRODUCT.md); regra Cursor [`.cursor/rules/campanha-edit-where-you-see.mdc`](../campanha-edit-where-you-see.mdc). Precedente: **B9** ([`edicao-rapida-lista-pracas.md`](../../../docs/plans/edicao-rapida-lista-pracas.md) — `PlazaList*Control` + `plazaStaffFormActions`). **Rejeitado:** lista/detalhe só-leitura com toda mutação em `/editar`; data-grid / planilha full-row; service genérico de “quick edit”. `/editar` e Sheets longos ficam para formulários multi-campo, campos raros e fluxos com nota/confirmação. Liderança continua no escopo já definido (sem campos staff-only).
|
||||
- Núcleo Eleitoral é a unidade operacional; Zona TSE é uma referência oficial adicional.
|
||||
- Todo núcleo exige geografia; natureza organizativa e setor são dimensões complementares.
|
||||
- Exclusão no app é substituída por arquivamento.
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ Brief compacto (obrigatório em C; se B ambíguo):
|
|||
- **Persona / contexto:** <quem, onde, estado de espírito>
|
||||
- **Job principal:** <uma frase>
|
||||
- **Estratégia de cor:** Restrained (default) | <exceção justificada>
|
||||
- **Edit where you see** (só `/campanha` staff, UI B/C/D): <sim — affordance no contexto + actions existentes | não — só leitura / `/editar` justificado> — princípio 3 de `PRODUCT.md`; rabbit hole: spreadsheet mode
|
||||
- **Anti-goals:** <o que esta superfície não deve ser>
|
||||
|
||||
### Referência visual (UX Pilot)
|
||||
|
|
|
|||
|
|
@ -42,9 +42,10 @@ Not generic SaaS dashboards (purple gradients, hero-metric templates, identical
|
|||
|
||||
1. **Sovereignty as the horizon** — own audience, data, and ops over time; Big Tech shortcuts (WhatsApp kits, share links) are fine for now when they help mobilization, but design should keep the campaign’s own records and workflows as the source of truth and leave room to reduce platform dependency later.
|
||||
2. **Clarity under pressure** — every screen earns its keep for field use; prefer plain language and obvious next actions over decoration.
|
||||
3. **Depth and simplicity as peers** — staff workflows can be rich; leadership paths stay light and phone-first without becoming a second-class product.
|
||||
4. **Intelligence serves organization** — electoral baseline and insights exist to decide where to act, not to impress.
|
||||
5. **Inspire without kitsch** — socialist and mobilizing in spirit; never shouty campaign brochure aesthetics.
|
||||
3. **Edit where you see** — on `/campanha` staff surfaces (coordinator / advisor), mutable data that the role can update should be editable in context whenever it fits (list cell, detail card, queue row), so assessors and the general coordinator do not burn time navigating to a separate edit screen for every correction. Prefer named Popovers / selects / short inputs that reuse existing server actions and the same access rules as the full form. Keep dedicated `/editar` (or long Sheets) for multi-field strategy forms, rare fields, and anything that needs a note or confirmation flow. Leadership paths stay read-or-declare as already scoped — never expose staff-only fields. Anti-goals: full-row spreadsheet / data-grid mode; always-mounted inputs on every row; a second generic “editable cell” design system; optimistic writes that skip server refresh when the list is the source of truth.
|
||||
4. **Depth and simplicity as peers** — staff workflows can be rich; leadership paths stay light and phone-first without becoming a second-class product.
|
||||
5. **Intelligence serves organization** — electoral baseline and insights exist to decide where to act, not to impress.
|
||||
6. **Inspire without kitsch** — socialist and mobilizing in spirit; never shouty campaign brochure aesthetics.
|
||||
|
||||
## Accessibility & Inclusion
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue