From e9d0eb226d34636d778b7f77c0bb204d7f89cbf6 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Sat, 3 Oct 2026 22:06:28 +0300 Subject: [PATCH] feat(ui): rating block placeholder shows while the selected scene has a render Co-Authored-By: Claude Sonnet 5.5 --- app/ui/features/placeholders/early.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/ui/features/placeholders/early.js b/app/ui/features/placeholders/early.js index 3eed2146..22005886 100644 --- a/app/ui/features/placeholders/early.js +++ b/app/ui/features/placeholders/early.js @@ -1,5 +1,21 @@ // Stand-ins that sit BEFORE a real feature in the same row (see index.js). import { composer as c } from "../../composer/composer.js"; -export default [{ id: "placeholder:sampler", mount: "timeline.status", +// v4's rating block: "Scene N · Rate…", shown only while the selected scene has a render. Inert until ratings land. +const rating = { id: "placeholder:rating", mount: "timeline.actions", needs: ["project"], + setup({ host, app }) { + const p = app.project; + const label = c.text.sm({ text: "" }), rate = c.button.sm({ label: "Rate…", tone: "ghost", disabled: true }); + const box = c.toolbar.default({ items: [label, rate] }); + host.append(box.node); + const draw = () => { + const sc = p.selected, has = sc && p.project && (p.project.scene_renders || {})[sc.id]; + box.node.hidden = !has; + if (has) label.setText ? label.setText(`Scene ${p.scenes.indexOf(sc) + 1}`) : (label.node.textContent = `Scene ${p.scenes.indexOf(sc) + 1}`); + }; + draw(); + return app.on(draw); + } }; + +export default [rating, { id: "placeholder:sampler", mount: "timeline.status", setup: ({ host }) => host.append(c.button.sm({ label: "⏱ Sampler", tone: "neutral", disabled: true }).node) }];