Repository navigation
Animate the sidebar and thread when switching to and from Threads in Top Tabs - #21
Merged
Merged
Conversation
The strip opens the sidebar instantly on a tab switch, so the page lays out once at its final width. Coming back to Threads, the sidebar and a freshly rendered thread therefore just appeared. Keep the instant layout and draw the motion on top with compositor-only properties: the sidebar slides in over the space it already holds, and the thread fades in. Reduced motion turns both off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Leaving Plugins or Skills, bb mounts a fresh sidebar and page shell for the thread after the old ones are on screen. The entrance was a class on <html>, so the new elements started the slide and fade over again. Play it with the Web Animations API on the elements there, and give anything bb mounts in their place the running start time, so it carries on. The Threads tab's thread title now opens and shuts by width, keyed on the route, so it moves with the sidebar and the page instead of snapping and pulling every tab after it left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coming back to Threads from Plugins, Skills or Settings, the first frame still shows that page's own sidebar and content while bb renders the thread, so the entrance slid Skills' sidebar in and then bb swapped the thread list in without one. Hold another page's sidebar and content at the entrance's first keyframe until that sidebar leaves, then start the entrance on what is there. bb marks each page's sidebar in its top row's test id; only non-thread-list marks count, so a rename falls back to the old behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The slide and fade started as the navigation began, then bb laid out the thread in long frames: the compositor's clock ran while nothing new was on screen, so the sidebar appeared most of the way in, or stalled partway. The Threads tab's title animates its width on the main thread and froze outright. Hold the entrance at its first keyframe until frames come steadily again (two quick frames, or 300ms at most), then start the slide, the fade and the title together. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Leaving Threads, the strip still collapses the sidebar instantly so the new page lays out once at full width, but the sidebar is now drawn over it where it was until bb has drawn that page, then slides away on the compositor. bb hides a collapsed sidebar and moves it a width left, so visibility is held and the slide translates back by that width. Opening Settings slides its sections in with the same entrance as the return to Threads, waiting for Settings' own sidebar rather than the thread list's. syncSidebar stopped running entrances every time it ran, including the second pass once bb has rendered the page, which cut the exit off before it started. It now stops them only on a real move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Leaving Threads, the destination appeared at once while the sidebar slid off it. It now fades in, as the thread does on the way back, and so does the page going to or from Settings, whose sidebar is its own. Switching between other tabs keeps the layout and stays instant. Both the fade and the sidebar's exit wait for the page being left to go (bb keeps its page shell and <main> and swaps what is inside), then for bb to finish drawing, so they start together and never fade the old page back in. Entrances now take that wait as a predicate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Going back to Threads was abrupt: the sidebar and a freshly rendered thread just appeared. The strip opens the sidebar instantly on a switch on purpose, so that a long thread lays out once at its final width. This keeps that and draws the motion on top.
What moves
translateonly.opacityonly.Getting it to play once, and play smoothly
<html>. bb swaps the sidebar and page elements during some navigations, and a class made every new element start the slide again.app-…vsskills-…). Only non-thread-list marks count, so a rename falls back to the plain behaviour.Testing
npm run checkpasses: typecheck, tests (77 for Top Tabs) and builds.🤖 Generated with Claude Code