Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix(translator): restore scrollIntoView for ver-JSON/ver-pipeline UX

diegosouzapw52d733946d29
diff --git a/src/app/(dashboard)/dashboard/translator/components/TranslateTab.tsx b/src/app/(dashboard)/dashboard/translator/components/TranslateTab.tsx
index b9253780b6..12e3c0b029 100644
--- a/src/app/(dashboard)/dashboard/translator/components/TranslateTab.tsx
+++ b/src/app/(dashboard)/dashboard/translator/components/TranslateTab.tsx
@@ -56,6 +56,16 @@ export default function TranslateTab({
if (onAdvancedSlugChange) {
onAdvancedSlugChange(slug);
}
+ // Restore scroll-into-view after URL change (UX polish — was lost in GAP-5 cleanup)
+ if (typeof document !== "undefined") {
+ const advancedEl = document.getElementById("translator-advanced-section");
+ if (advancedEl && typeof advancedEl.scrollIntoView === "function") {
+ // Defer to next tick so React commits the open state first
+ requestAnimationFrame(() => {
+ advancedEl.scrollIntoView({ behavior: "smooth", block: "start" });
+ });
+ }
+ }
};
const handleSeeTranslatedJson = () => {
diff --git a/src/app/(dashboard)/dashboard/translator/components/advanced/AdvancedSection.tsx b/src/app/(dashboard)/dashboard/translator/components/advanced/AdvancedSection.tsx
index 86da88edfe..f49c689a60 100644
--- a/src/app/(dashboard)/dashboard/translator/components/advanced/AdvancedSection.tsx
+++ b/src/app/(dashboard)/dashboard/translator/components/advanced/AdvancedSection.tsx
@@ -43,7 +43,7 @@ export default function AdvancedSection({
};
return (
- <Card className="border-amber-500/10 bg-amber-500/[0.02]">
+ <Card id="translator-advanced-section" className="border-amber-500/10 bg-amber-500/[0.02]">
<div className="p-4 space-y-3">
{/* Header */}
<div className="flex items-start gap-3">