Add frontend-only V3 Quick Hub across 360 core pages#40
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53cf2436fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const tick=()=>{ | ||
| const left=Math.max(0,Math.ceil((end-Date.now())/1000)); | ||
| fab.textContent=left>0?`⏱ ${Math.floor(left/60)}:${String(left%60).padStart(2,'0')}`:'Done ✅'; | ||
| if(left>0) requestAnimationFrame(tick); else setTimeout(()=>fab.textContent='V3 ⚡',4000); |
There was a problem hiding this comment.
Replace animation-frame loop with second-based Pomodoro ticks
v3PomodoroStart drives the countdown with requestAnimationFrame, which runs ~60 times/second for the full 5–120 minute session. In active tabs this causes unnecessary continuous repaint/work for a once-per-second UI update, so starting a long timer can waste CPU and battery for users. Using a 1s interval/timeout cadence would preserve behavior while avoiding the high-frequency loop.
Useful? React with 👍 / 👎.
|
|
||
| function applyWidgetStyles(card, header, body, w) { | ||
| const opacity = clamp(Number(w.opacity ?? 0.85), 0.2, 1); | ||
| card.style.background = w.bgColor || `rgba(15,23,42,${opacity})`; |
There was a problem hiding this comment.
Respect widget opacity when a background color is set
applyWidgetStyles only applies the opacity-controlled rgba(...) background when w.bgColor is empty, but the settings form always stores a color value (bgColor: fields.bgColor.value). That means newly created widgets ignore the opacity setting entirely in normal usage, so the opacity control in the UI is effectively non-functional.
Useful? React with 👍 / 👎.
Summary
Added major frontend-only platform features (no backend changes) for V3 momentum:
assets/js/platform-v3.jsindex.htmlandsettings.htmlNew capabilities
V3 Quick Hub floating button
Focus Mode (local)
360_focus_mode).Command Palette (Ctrl/Cmd+K)
Quick Notes (local)
360_quick_notes_v1)..txtwithout server usage.Pomodoro Timer (client-side)
360_pomodoro_minutes).Why this fits request
Validation
node --check assets/js/platform-v3.jsnode --check assets/js/widgets.jsCodex Task