fix(web): Limits opens the usage limits popover directly #29222
Mergedflamboh(GitHub profile, opens in a new tab)merged 61 commits into
maria/redesign/2-composer-timeline fromrefs/pull/29222/headmerged by maria-rcks View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
- apps/web/src/components/design-system/scenes/ScenesPage.tsx lines 40 to 40OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +20,21 @@20+export function ScenesPage({ scriptId }: { scriptId: string | undefined }) {21+ const script = turnScripts.find((entry) => entry.id === scriptId) ?? turnScripts[0]!;22+ // A new script starts over: fresh steps, cursor and timeline.23+ return <TurnPlayer key={script.id} script={script} />;24+}25+26+function TurnPlayer({ script }: { script: TurnScript }) {27+ const { resolvedTheme } = useTheme();28+ const [steps, setSteps] = useState<ReadonlyArray<Step>>(script.steps);29+ const [cursor, setCursor] = useState(0);30+ const [playing, setPlaying] = useState(false);31+ const [added, setAdded] = useState(0);32+33+ // Playing is a derived flag: it stops by itself at the last step.34+ const autoplaying = playing && cursor < steps.length;35+ // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- Autoplay owns a timer only while playing and clears it on pause or unmount.36+ useEffect(() => {37+ if (!autoplaying) return;38+ const timer = setInterval(() => setCursor((value) => value + 1), PLAY_INTERVAL_MS);39+ return () => clearInterval(timer);40+ }, [autoplaying]);
maria-rcks merged this9646a4a
maria-rcks closed this
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:XXL
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Sign in to join this conversation.







macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed