17 lines
1.5 KiB
Markdown
17 lines
1.5 KiB
Markdown
# Dashboard widget contract
|
|
|
|
- Render every widget inside the shared minimal base card using existing CSS tokens. Keep widget data and business logic outside the card.
|
|
- Register widgets with a stable type ID and validated title, description, icon, template, span, settings keys, permissions, and multi-instance policy.
|
|
- The dashboard layout engine alone owns add, drag, drop, order, size, and per-user, per-page persistence. Widget scripts must initialize and clean up within their own root, including after partial page updates.
|
|
- Provide keyboard and touch alternatives to dragging, clear focus, screen-reader status, reduced motion, and WCAG 2.2 AA interaction and contrast.
|
|
- Show loading, empty, error, and stale states honestly. Show visible provider attribution when required.
|
|
- Require Django authentication and CSRF for layout changes. Validate configuration on the server, enforce ownership, and keep upstream secrets out of browser code.
|
|
- Test registry validation, user and page isolation, reorder persistence, and widget lifecycle when adding widgets.
|
|
- The card's `data-widget-platform` and `data-instance-id` are passive geometry hooks for future integrations. Do not add companion behavior here.
|
|
|
|
# Project Manager MCP
|
|
|
|
When I give you a card to work on, you should:
|
|
1. Look in the dashboard project
|
|
2. Move the card to in-progress and add any pertinent findings at the end to the progress notes. This also applies to passes/phases that have a defined downtime for me to check and push things to git.
|
|
3. When you're done with the card you can move it to complete. |