fix(ui): 浮窗内容区改为列方向 flex 契约,修复插件 tab 内容 0 宽白窗

.floatContent 原为行方向 flex——弹性子项主尺寸(宽)按内容收缩,内在宽度为
0 的插件宿主(如深迹 DeepTrace)塌成 0px 宽:DOM 在、内容画不出(可见白窗
但 DevTools 有内容)。对齐 pane 的内容契约:.floatContent 复制 .paneContent
的列方向 + overflow hidden,浮窗内再包一层 .paneTab(pane 的 per-tab 包装,
flex:1),子项宽度由 align-stretch 撑满——浮窗里的 tab 获得与 pane 内完全
一致的尺寸契约。e2e 增加内容绘制断言(浮动后内容子项实际宽度 > 200px),
真实浏览器回归。
This commit is contained in:
Menghuan1918
2026-08-24 00:35:58 +08:00
parent e20b95024b
commit f648b0c006
3 changed files with 26 additions and 1 deletions
+5 -1
View File
@@ -284,8 +284,12 @@ export function FreeWindow(props: {
anchor={<span />}
/>
</div>
{/* The tab cell reuses .paneTab (the pane's per-tab wrapper): the
column-flex chain (window → .floatContent → .paneTab) is what
gives the component a definite width via align-stretch — the exact
sizing contract a tab gets inside a pane. */}
<div className={css.floatContent}>
{renderTab(float.tab, true, float.id)}
<div className={css.paneTab}>{renderTab(float.tab, true, float.id)}</div>
</div>
<div
className={css.floatResize}
+7
View File
@@ -361,11 +361,18 @@ body[data-dsh-sidebar-dragging] .bottomPanel {
color: var(--dsw-alias-label-primary);
}
/* Mirrors .paneContent's column-flex contract: the tab cell must hand its
child a definite WIDTH via align-stretch. A row flex (the default) sizes
the main axis (width) from content — intrinsic-zero hosts (e.g. a plugin
tab UI) collapse to a 0px-wide sliver and paint nothing (the blank
whale-report window). */
.floatContent {
flex: 1;
min-height: 0;
min-width: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* The SE resize corner (mirror of .cornerHandle). */