fix: 面板开关注入 session header utilities,与 Session log 同行对齐 - #89
Open
fchange wants to merge 1 commit into
Open
Conversation
fixed 的 toggle cluster(top: 3px)和 DSH 会话页头 title 行不在同一基线。 改为通过 slots.inject 挂到 conversation.session.header.utilities(Session log 同座),有会话时走文档流对齐;空白 hero 仍用右上角 fixed 兜底。
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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.
问题
会话页头(标题 / 标准模式 / Session log / 对话·轨迹)和插件
toggleCluster不在同一水平线上。根因:cluster 是
position: fixed; top: 3px(中心约 y=17),DSH header title 行是padding-top: 12px+min-height: 32px(Session log 中心 y=28),差 11px。折叠时再靠padding-right: 78px给 header 让位,header 一改版就会再次错位。变更
走 DSH 官方加法座,不替换整条 header:
slots.inject('conversation.session.header.utilities')把面板开关挂到 Session log 同一行(id: better-sidebar-toggle,order: 100,坐在 Session log 右侧)。ToggleCluster:header 内联一份;空白 hero / 无会话时 header 隐藏,仍用右上角 fixed 兜底。data-dsh-sidebar-in-header,CSS 藏掉 floating 副本,并撤掉侧栏 tab 条为角落按钮预留的padding-right。data-dsh-sidebar-collapsed的 header 右 padding hack。与 #82(桌面标题带避让)、#88(位置兼容模式)正交:本 PR 修的是 Web 会话页头基线,用的是
conversation.session.header.utilities,不改桌面 inset。测试
tests/header-toggle.spec.ts:slots.inject等到声明再注册;挂载写/卸载清 body 属性;按钮写 store;无会话时禁用。pnpm test(502 全绿)、pnpm typecheck。早上好问候):header 打开/折叠后,Session log 与两个开关中心都在 y=28;空白首页 header 隐藏时仍是右上角 floating 兜底。