feat(ui): select trigger 增加 data-hover-lighten 调用层开关 - #26
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: afa6ccba22
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| card ~RGB(24), so a black fill is an invisible 17→0 step on the app canvas | ||
| (observed: onboarding Select gave zero hover feedback). Lightening also | ||
| unifies with the segmented control, which already flips to white in dark. */ | ||
| --btn-secondary-overlay: oklch(1 0 0 / 0.08); |
There was a problem hiding this comment.
Document the dark secondary-hover contract
This changes the shared hover token used by outline/secondary Button and Select, establishing a new dark-mode interaction rule, but only the CSS comments were updated. Because AGENTS.md is the repository's cross-cutting source of truth, leaving the white-overlay behavior and its affected controls out makes future work likely to retune or undo it; add this decision to the contract as required.
AGENTS.md reference: AGENTS.md:L856-L861
Useful? React with 👍 / 👎.
dark 下 select trigger 的默认 hover 是纯黑压暗(#598 定下的设计),在 近黑画布(--background ≈ RGB 17)上没有向下行程,hover 完全无反馈 ——onboarding 的 Language select 即为此场景。 不改全局 token(压暗是既定美学,且波及 250+ 处 outline/secondary Button),改为新增 data-hover-lighten 属性:设置后该 trigger 的 hover 翻转为白色 8% overlay(--select-trigger-hover-lighten)。light 下该 token 与默认填充相同,属性为无操作。 这是临时调用层开关;surface 感知的 hover 极性归组件库重构统一裁决, 不要扩大此属性的使用范围。
afa6ccb to
1c30d52
Compare
felinics/ui#26(519a597e):新增 data-hover-lighten 调用层开关与新 token --select-trigger-hover-lighten,默认压黑 hover 不变。 为 #1256 的 onboarding 调用点提供规则来源。
三个位于近黑画布上的 select 调用点设置 ui 侧的 data-hover-lighten (依赖 felinics/ui#26,合并前需先 bump gitlink): - Step2 Language、Step3 Client Type:SelectTrigger 直接加属性 - Step4 Chat Model:ModelSelect 新增 hoverLighten prop 透传 dark 下这些 trigger 的 hover 由不可见的纯黑压暗翻转为白色 8% overlay; light 下该属性为无操作。其余调用点保持默认压黑不动——surface 感知 极性由组件库重构统一裁决。
问题
dark 主题下,位于近黑画布(
--background≈ RGB 17)上的 Select trigger hover 完全无反馈:默认 hover 是纯黑压暗填充(#598 定下的设计方向),而纯黑在 RGB 17 上没有向下行程——onboarding 的 Language select 除光标变化外零反馈。方案:调用层开关,不动全局 token
压暗是既定美学,全局翻转会波及 250+ 处 outline/secondary Button,且 surface 感知的 hover 极性属于组件库重构的系统设计议题。因此本 PR 只做增量:
data-hover-lighten属性:设置后仅该 trigger 的 hover 翻转为白色 8% overlay(新 token--select-trigger-hover-lighten)。配套:onboarding 的三个 select 调用点(Memoh 侧单独 PR)设置该属性。此属性不应扩大使用——surface 极性由组件库重构统一裁决。
验证