Perfect! Here's a clean, structured Dev Checklist for Day 4, Notion-style, that covers everything you've planned. It includes:
- ✅ Global refresh button logic
- ✅ Card menu: change URL & interval
- ✅ Input validation for refresh time
- ✅ Delete card functionality
🧠 Day 4 – Dev Checklist: Global Control & Per-Card Settings
🔁 Global Refresh Button
- [x] Add a "Refresh All" button at the top or in a utility bar.
- [x] On click:
- [x] Traverse the global card map (
Map<cardId, data>
).
- [x] Clear all existing intervals.
- [x] Fetch fresh data for each card.
- [x] Reinitialize
setInterval
for all.
⚙️ Card Settings Menu
- [x] Add a settings button (e.g., ⚙️ or 🛠) to each card.
- [x] On click, show a small modal or inline UI with:
- [x] Input field for custom API URL.
- [x] Input field for refresh interval.
- [x] Save/Apply button.
✔️ Input Validation for Refresh Interval
- [x] Minimum allowed interval: 10 seconds.
- [x] Maximum allowed interval: (optional, e.g., 5 min).
- [x] Show warning or disable save if:
- [x] Interval < 10.
- [x] Invalid number or negative value.