Skip to content

fix: 修复侧栏悬停态残留双高亮并补齐根元素明暗 color-scheme - #46

Merged
qqqqqf-q merged 1 commit into
felinics:mainfrom
qqqqqf-q:fix/memoh-306-sidebar-hover-color-scheme
Nov 19, 2026
Merged

qqqqqf-q merged 1 commit into
felinics:mainfrom
qqqqqf-q:fix/memoh-306-sidebar-hover-color-scheme

Conversation

@qqqqqf-q

@qqqqqf-q qqqqqf-q commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

UI 仓库:felinics/ui

Author

  • Agent

Type

  • bug

Summary

修复宿主设置侧栏双高亮残留以及根元素缺失明暗 color-scheme 声明两项 UX/UI 问题(对应 B-15、B-16 公共组件库部分):

  1. 清除侧栏悬停属性残留导致的双高亮(B-15):
    • 在 src/lib/scroll-hover.ts 中忽略非 mouse / pen 指针(如 touch)触发的悬停标记,避免触屏点击长期锁定悬停态。
    • 仅在存在 hovered 节点期间按需挂载 ownerDocument 级清理监听(一旦清除或 dispose 即刻解绑):覆盖跨出侧栏边界移动到内容区/弹窗遮罩的 pointermove / pointerdown、焦点离栏时的 focusin、窗口失焦/标签页隐藏(blur / visibilitychange),以及 Reka UI 弹窗/下拉菜单打开将 document.body.style.pointerEvents 设为 none 时的 MutationObserver 同步清除。
    • 在 src/components/settings/NavItem.vue 中将激活态的 font-medium 与默认态的 font-[430] 设为互斥分支,进一步拉开当前页签与非激活项的视觉层级。
  2. 补齐根级明暗 color-scheme 声明(B-16):
    • 在 src/style.css 的 :root, [data-color-scheme-preview="memoh"] 声明 color-scheme: light;,在 .dark, .dark [data-color-scheme-preview="memoh"] 声明 color-scheme: dark;,使原生表单控件与滚动条与当前亮暗主题保持一致。

Related Issues

Validation

  • @felinic/ui 构建与类型检查:mise exec -- pnpm run build(含 vue-tsc --build 与 vite build)通过。
  • 宿主设计契约守卫:将本分支提交检出到 felinics/Memoh 宿主 packages/ui 运行 mise run lint:contract,通过(0 新增违规)。
  • 宿主真实浏览器验证(127.0.0.1:8091 Vite 代理本地后端 18080/18081,ego-browser 登录 admin 实测,仅代表 Agent 自测,非真人 QA):
    • Root color-scheme:外观设置切至浅色时 getComputedStyle(document.documentElement).colorScheme === 'light',切回深色时为 'dark'(验证后已恢复深色模式)。
    • 侧栏悬停单高亮:分别实测“悬停侧栏项后移至右侧正文区”“悬停侧栏项后打开弹窗锁死 body pointer-events”“关闭弹窗后”“touch 指针点击”四种场景,[data-settings-nav-item][data-pointer-hover] 均立即归零,无双高亮残留。

Screenshots / Recordings

打开弹窗与移出侧栏后设置导航保持单高亮
根元素 color-scheme 跟随浅色与深色模式切换

Human QA

  • Human QA passed

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-18T08:48:38.025371Z
We couldn’t complete this review. Comment @codex review to try again.
a24b9ab PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@qqqqqf-q
qqqqqf-q merged commit fb2fd8e into felinics:main Nov 19, 2026
1 check passed
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