Skip to content

fix(ui): unify settings entry and align route edit sheets#16

Merged
jdjingdian merged 2 commits intomainfrom
dev
Mar 24, 2026
Merged

fix(ui): unify settings entry and align route edit sheets#16
jdjingdian merged 2 commits intomainfrom
dev

Conversation

@jdjingdian
Copy link
Copy Markdown
Owner

背景

在 macOS 13 上,侧边栏设置按钮和 Banner 的“前往设置”存在点击无响应问题,用户只能通过系统状态栏进入设置。
同时,添加/编辑路由弹窗在 12–13 与 14+ 分支上的视觉和交互不一致,和 design/STYLE_GUIDE.md 存在偏差。

改动内容

  1. 统一设置入口导航(跨版本)
  • 新增 SettingsNavigator 作为唯一对外入口。
  • SettingsNavigator 内部封装:
    • macOS 14+:通过 SettingsLink 打开 Settings scene。
    • macOS 12–13:使用 showSettingsWindow:,失败后回退 showPreferencesWindow:
  • 增加最小日志,便于定位设置打开失败问题。
  1. 收敛设置入口调用点
  • Sidebar 设置按钮改为统一走 SettingsNavigator
  • MainWindow 中 Banner 的“前往设置”统一走 SettingsNavigator
  • 移除分散在视图层的直接 selector 调用,避免跨版本行为分叉。
  1. 路由添加/编辑弹窗样式对齐
  • RouteEditSheetLegacyRouteEditSheet 统一为卡片化分区结构(目标网络 / 路由方式与网关 / 分组)。
  • legacy 网关类型选择由 radioGroup 调整为 segmented
  • 统一错误态表现(语义红边框 + 文案)与底部操作区层级、间距和控件尺寸。
  • 保持原有字段语义、校验规则与保存逻辑不变。
  1. 工程与规范同步
  • 新增文件已加入 target(含 project.pbxproj 调整)。
  • OpenSpec 变更已完成任务勾选、主规范同步并归档。

影响范围

  • StaticRouter/Services/SettingsNavigator.swift
  • StaticRouter/View/MainWindow.swift
  • StaticRouter/View/SidebarView.swift
  • StaticRouter/View/Customized/StatusBanner.swift
  • StaticRouter/View/RouteEditSheet.swift
  • StaticRouter/View/LegacyRouteListView.swift
  • StaticRouteHelper.xcodeproj/project.pbxproj
  • openspec/specs/*(main-navigation / status-banner / route-crud)

验证结果

  • macOS 13:侧边栏设置按钮与 Banner“前往设置”可正常打开设置窗口。
  • macOS 14+:设置入口行为一致,未影响现有设置打开体验。
  • 路由添加/编辑流程回归通过:
    • IP 网关、接口网关
    • 无效输入错误提示
    • 已激活路由编辑后的重激活流程

风险与回滚

  • 风险较低:本次主要为导航入口收敛与表现层样式调整,不涉及数据模型变更。
  • 如需回滚,可按文件级回退 SettingsNavigator 接入及弹窗样式改动,不影响存量数据。

unify settings entry behind SettingsNavigator so views rely on one
interface across macOS versions.
use SettingsLink for macOS 14+ settings scene while keeping legacy
selector fallback for macOS 12-13.
align RouteEditSheet and LegacyRouteEditSheet visual hierarchy with
the style guide to improve consistency and readability.
add openspec change artifacts for the macOS 13 settings issue and
route config UI alignment.
mark all tasks done for settings nav and route ui polish
sync delta specs into main-navigation, status-banner, route-crud
archive change to 2026-03-24-fix-macos13-settings-navigation-and-route-config-ui
@jdjingdian jdjingdian merged commit 0766ca4 into main Mar 24, 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