mirror of
https://github.com/alphaXiv/OpenResearch.git
synced 2026-11-12 10:05:24 +08:00
Reset settings scroll when switching rail tabs (#714)
The settings/skills branch of ChatPanel had the same shape as the chat branch, so React reused the chat thread's scroller node for .settings-view-scroll. Compute, Customize and the other rail tabs opened at the chat's scroll offset, often showing blank space. Keying the scroller by view gives each tab a fresh scroller at the top. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0bdbabdcdf
commit
eefc4be194
+1
-1
@@ -1,4 +1,4 @@
|
||||
var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-FxOZ5k4D.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جستوجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",S1=()=>"Znajdź w dokumencie",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():t==="pl"?S1():m1()}),T1=()=>"Fit to width",C1=()=>"适应宽度",P1=()=>"متناسب با عرض",I1=()=>"ملاءمة العرض",R1=()=>"Ajustar al ancho",O1=()=>"चौड़ाई में फ़िट करें",M1=()=>"너비에 맞추기",D1=()=>"幅に合わせる",L1=()=>"Dopasuj do szerokości",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?C1():t==="fa"?P1():t==="ar"?I1():t==="es"?R1():t==="hi"?O1():t==="ko"?M1():t==="ja"?D1():t==="pl"?L1():T1()}),N1=()=>"Next match",F1=()=>"下一个匹配项",k1=()=>"مورد بعدی",B1=()=>"التطابق التالي",j1=()=>"Coincidencia siguiente",U1=()=>"अगला मिलान",$1=()=>"다음 일치 항목",H1=()=>"次の一致",V1=()=>"Następne dopasowanie",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():t==="ko"?$1():t==="ja"?H1():t==="pl"?V1():N1()}),z1=()=>"Previous match",W1=()=>"上一个匹配项",G1=()=>"مورد قبلی",_1=()=>"التطابق السابق",X1=()=>"Coincidencia anterior",Y1=()=>"पिछला मिलान",K1=()=>"이전 일치 항목",J1=()=>"前の一致",Z1=()=>"Poprzednie dopasowanie",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?W1():t==="fa"?G1():t==="ar"?_1():t==="es"?X1():t==="hi"?Y1():t==="ko"?K1():t==="ja"?J1():t==="pl"?Z1():z1()});/**
|
||||
var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-nILKpF0z.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جستوجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",S1=()=>"Znajdź w dokumencie",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():t==="pl"?S1():m1()}),T1=()=>"Fit to width",C1=()=>"适应宽度",P1=()=>"متناسب با عرض",I1=()=>"ملاءمة العرض",R1=()=>"Ajustar al ancho",O1=()=>"चौड़ाई में फ़िट करें",M1=()=>"너비에 맞추기",D1=()=>"幅に合わせる",L1=()=>"Dopasuj do szerokości",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?C1():t==="fa"?P1():t==="ar"?I1():t==="es"?R1():t==="hi"?O1():t==="ko"?M1():t==="ja"?D1():t==="pl"?L1():T1()}),N1=()=>"Next match",F1=()=>"下一个匹配项",k1=()=>"مورد بعدی",B1=()=>"التطابق التالي",j1=()=>"Coincidencia siguiente",U1=()=>"अगला मिलान",$1=()=>"다음 일치 항목",H1=()=>"次の一致",V1=()=>"Następne dopasowanie",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():t==="ko"?$1():t==="ja"?H1():t==="pl"?V1():N1()}),z1=()=>"Previous match",W1=()=>"上一个匹配项",G1=()=>"مورد قبلی",_1=()=>"التطابق السابق",X1=()=>"Coincidencia anterior",Y1=()=>"पिछला मिलान",K1=()=>"이전 일치 항목",J1=()=>"前の一致",Z1=()=>"Poprzednie dopasowanie",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?W1():t==="fa"?G1():t==="ar"?_1():t==="es"?X1():t==="hi"?Y1():t==="ko"?K1():t==="ja"?J1():t==="pl"?Z1():z1()});/**
|
||||
* @license lucide-react v1.23.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -49,7 +49,7 @@
|
||||
html { background: #ffffff; }
|
||||
html[data-theme="dark"] { background: #0e0c0c; }
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/index-FxOZ5k4D.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-nILKpF0z.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CcyD7olD.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -6487,7 +6487,8 @@ export function ChatPanel({
|
||||
{railOpen && rail}
|
||||
<section className="chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0">
|
||||
{!railOpen && <div className="flex h-12 shrink-0 items-center">{railReopen}</div>}
|
||||
<div className="settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]">
|
||||
{/* Keyed per view so no tab inherits the chat thread's or another tab's scroll offset. */}
|
||||
<div key={mainView} className="settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]">
|
||||
{contentError ? <div role="alert" className="p-6 text-subtext">{contentError}<Button onClick={onRetryContent}>{m.app_retry()}</Button></div>
|
||||
: contentLoading ? <LoadingRow className="p-6"><Spinner />{m.chat_panel_loading_conversation()}</LoadingRow> : children}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user