Skip to content

fix(ui): pointer cursor on toolbar buttons, larger notification close target, inset macOS title bar controls - #502

Open
WilliamWang1721 wants to merge 21 commits into
Kuddev:mainfrom
WilliamWang1721:claude/pebble-ui-macos-pointer-buttons-ecf15c
Open

WilliamWang1721 wants to merge 21 commits into
Kuddev:mainfrom
WilliamWang1721:claude/pebble-ui-macos-pointer-buttons-ecf15c

Conversation

@WilliamWang1721

@WilliamWang1721 WilliamWang1721 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Advertising, commercial promotion, and traffic solicitation are prohibited in PRs
and Issues. Business requests must go through the email in the
contribution policy.
PRs or Issues containing unauthorized promotion will be closed directly.
严禁利用 PR 或 Issue 推广、引流,未经授权的推广将直接关闭;商业需求请通过贡献指南中的邮箱沟通,已获批准的赞助按批准范围处理。

Result / 用户结果

  • 标题栏/侧栏的四个工具按钮(侧栏折叠展开、设置、命令列表、右侧栏展开收起)在可用时悬浮显示手型指针;disabled 状态保持箭头。原因:组件库 Ghost 按钮默认 cursor_default,toolbar_button 现在显式接收 disabled 决定指针。
  • toast 与消息栏一致:整张卡片点击即关闭并显示手型指针。组件库的关闭按钮固定 20px 且不可配置,复用组件自带的 on_click 关闭路径,命中区即卡片本身,随进入/退出位移动画移动。
  • 标题栏右侧两个按钮(命令列表、右侧栏)在 macOS 上整体左移 12px,不再贴着窗口右缘;其他平台不变。该间距由 platform::window_chrome::trailing_inset 提供。

Design / 设计边界

  • Responsibility and affected modules: widgets::toolbar_button、toast::note/toast、window_titlebar::title_bar_right_controls、platform::window_chrome。
  • Why this belongs here; interfaces that remain unchanged: 平台差异留在 platform/;通知生命周期与动画仍由组件库负责。
  • Dependency, data-format, threading, or lifetime changes: 无;未修改 gpui-component 固定版本。
  • Compatibility and migration/fallback behavior: toast 本就是“没有待办动作的已结束事实”;带按钮的确认卡片由内部按钮 stop_propagation 处理,行为不变。

Evidence / 验证依据

  • Commands and actual results (include unrun checks): 本地未运行构建或测试,验证由 GitHub Actions 完成;CI 结果以本 PR 的检查为准。
  • Regression tests: 新增 clicking_a_toast_card_dismisses_only_that_card,两条 toast 并存时点击最新卡片只关闭它。
  • UI changes: 手型指针与 macOS 右侧间距尚无真机视觉证据(测试平台无法读取光标样式);macOS 间距是独立的布局调整,如需拆分可单独提交。
  • Hot-path changes: 无。

Required Review / 必须确认

  • I followed CONTRIBUTING.md, docs/architecture.md, and docs/project-constraints.md.
  • I split responsibilities, not arbitrary line ranges; no duplicate behavior authority was added.
  • python3 scripts/check_architecture.py --base <PR-base-commit> passes; budgets were not inflated to fit the change.
  • Tests cover success and failure; platform/feature coverage limitations are stated.
  • New messages use typed i18n IDs and matching placeholders; untranslated content has an explicit fallback. (无新增文案)
  • Governance changes include a counterexample, corrected contract, tests, and a maintainer-reviewed decision.

Checkboxes explain the review; they do not replace CI or maintainer approval.

… target, inset right title bar controls on macOS
@WilliamWang1721
WilliamWang1721 marked this pull request as ready for review October 6, 2026 14:12

@Kuddev Kuddev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

当前 head 43586a5 的两个问题需要调整后合并:

  1. toast.rs::with_close_target 将热区固定在外层容器 top/right=0,但被包装的 Notification 自身有进入/退出位移动画。锁定依赖的 notification.rs:374 起通过相对 left 位移移动卡片,而外层热区不跟随,动画期间图标与命中位置会分离。关闭范围扩大应与实际卡片几何及生命周期保持一致;请补进入/退出过程、卡片自身 on_click 不触发、多个通知分别关闭的交互覆盖,不能只测静止后的单张卡片角落。
  2. widgets::toolbar_button 无条件 cursor_pointer,现有 sidebar.rs 的 disabled(settings_active) 和 details_panel.rs 的 disabled(reader_focus) 仍会显示可操作手型。请保留禁用状态的指针语义。

macOS 留白属于独立布局调整,手型及动画热区也还缺实际视觉证据。这里不更改依赖版本或复制另一套通知动画来凑合修复;请按上述边界调整后复审。

@Kuddev Kuddev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已复核新 head 90bd138。前一轮两个实现问题已有实质修正:

  • 去掉固定关闭覆盖层,改用锁定版本 Notification 自己的 on_click → dismiss 路径,点击区域与卡片共享位移动画;关闭按钮内部 stop_propagation,dismiss 本身也处理重复关闭。
  • toolbar_button 显式接收 disabled,仅启用时加手型;侧栏、设置、命令列表和右侧栏调用点已对应调整。没有新增依赖或复制动画状态机。

当前 macOS ARM64 失败日志不是这些产品修改导致的:test_isolated_launch_discards_parent_routing_and_config_overrides 将 /var 临时目录与启动器规范化后的 /private/var 路径直接作字符串比较。主线夹具问题由 #508 修复,请勿通过改通知代码、放宽原生检查或反复重跑掩盖它。#508 合入后我会继续核查当前 PR 的原生结果。

仍待验证:新增整卡关闭回归的实际执行结果;macOS 12px 内缩与两种标签布局的真实外观/命中证据。原改名测试的共享设置分组也请随最新 main 保留。本次记录不代表已经完成真实平台视觉验收。

WilliamWang1721 and others added 18 commits October 7, 2026 08:01
# Conflicts:
#	nebula_app/src/gpui_shell/workspace/sidebar.rs
#	nebula_app/src/gpui_shell/workspace/top_tabs.rs
# Conflicts:
#	nebula_app/src/gpui_shell/workspace/details_panel.rs
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.

3 participants