Skip to content

Make Swift and Rust clickable in the landing page SDK animation - #6555

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785978439-sdk-swift-rust-tabs
Open

Make Swift and Rust clickable in the landing page SDK animation#6555
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785978439-sdk-swift-rust-tabs

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

The Swift and Rust tabs in the landing page SDK card render grey and do nothing on hover/click. They are static artwork inside the compiled sdk-rive.riv (hosted on the Webflow CDN): its state machine only defines TypeScript, Python, GO, Java, NET, PHP and Ruby, so there is nothing in this repo to enable. Fixing it properly requires re-authoring the Rive file.

Workaround: two real anchors are layered over those two tab positions in welcome.mdx, styled to be indistinguishable from the neighboring tabs (same icon size, JetBrains Mono label, matching #fcfcfd / #111113 panel background so the grey artwork underneath is fully covered) and pointing at /sdks/generators/{swift,rust}/quickstart.

Geometry is expressed as percentages of the 369x93 artboard, with container-type: inline-size on .rive-container so icon/label sizes scale in cqw and stay aligned at any width:

.rive-tab { position: absolute; top: 34.34%; height: 28.6%; width: 10.46%; }
.rive-tab-swift { left: 76.53%; }  /* tab pitch is 10.46% of the artboard */
.rive-tab-rust  { left: 86.99%; }

That only holds while the container box matches the artboard ratio. rive-animation.js set container.style.height = width / aspectRatio once at load and never again, so after a window resize the artwork letterboxed inside a stale-height container. The height computation is now a syncContainerHeight() closure called from the existing resize handler as well:

const windowResizeHandler = () => {
    syncContainerHeight();
    r.resizeDrawingSurfaceToCanvas();
};

Verified against the live page with the final CSS/markup injected, in light and dark mode and at a narrowed container width; the overlay tabs line up with the Rive-rendered ones and the existing hover interactions for the other languages are untouched.

Link to Devin session: https://app.devin.ai/sessions/3f1fa02d46d94431b1331d3d9ae97933

@devin-ai-integration
devin-ai-integration Bot requested a review from devalog as a code owner August 6, 2026 01:07
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🌿 Preview your docs: https://fern-preview-devin-1785978439-sdk-swift-rust-tabs.docs.buildwithfern.com/learn

Here are the markdown pages you've updated:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant