From 1ec08b1dedff313e385767edb0c2b815b6dd56f3 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Sat, 22 Aug 2026 22:08:47 +0800
Subject: [PATCH] fix: improve app note placeholder contrast
---
C1.source/Apptag/Info.plist | 4 ++--
C1.source/Scripts/app_note_bubble_input_qa.sh | 12 ++++++++++++
C1.source/Apptag/AppGridSupport.swift | 13 +++++++++++--
C1.source/CHANGELOG.md | 6 ++++++
CODEGRAPH.md | 4 ++--
5 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/C1.source/Apptag/AppGridSupport.swift b/C1.source/Apptag/AppGridSupport.swift
index 397a995..f48aa04 100644
--- a/C1.source/Apptag/AppGridSupport.swift
+++ b/C1.source/Apptag/AppGridSupport.swift
@@ -122,6 +122,9 @@
var isFocused: FocusState<Bool>.Binding
let onCommit: () -> Void
let onCancel: () -> Void
+ private static let placeholderAttributes: [NSAttributedString.Key: Any] = [
+ .foregroundColor: NSColor.white.withAlphaComponent(0.48)
+ ]
func makeCoordinator() -> Coordinator {
Coordinator(
@@ -140,7 +143,10 @@
field.focusRingType = .none
field.font = NSFont.systemFont(ofSize: 15, weight: .medium)
field.textColor = .white
- field.placeholderString = placeholder
+ field.placeholderAttributedString = NSAttributedString(
+ string: placeholder,
+ attributes: Self.placeholderAttributes
+ )
field.delegate = context.coordinator
field.target = context.coordinator
field.action = #selector(Coordinator.submitAction(_:))
@@ -158,7 +164,10 @@
context.coordinator.onCommit = onCommit
context.coordinator.onCancel = onCancel
context.coordinator.field = field
- field.placeholderString = placeholder
+ field.placeholderAttributedString = NSAttributedString(
+ string: placeholder,
+ attributes: Self.placeholderAttributes
+ )
field.setAccessibilityLabel(placeholder)
if !field.hasMarkedTextInput, field.stringValue != text {
diff --git a/C1.source/Apptag/Info.plist b/C1.source/Apptag/Info.plist
index 993fd8b..7885d89 100644
--- a/C1.source/Apptag/Info.plist
+++ b/C1.source/Apptag/Info.plist
@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>8.3.6</string>
+ <string>8.3.7</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
@@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>20260707.1526</string>
+ <string>20260822.2207</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
diff --git a/C1.source/CHANGELOG.md b/C1.source/CHANGELOG.md
index 07fe469..2b922e5 100644
--- a/C1.source/CHANGELOG.md
+++ b/C1.source/CHANGELOG.md
@@ -2,6 +2,12 @@
## [Unreleased]
+## [8.3.7] — 2026-08-22
+
+- 优化 App Grid 备注气泡输入框的默认提示文字颜色,在深色浮层上保持次级提示感但不再近似不可见
+- 扩展备注气泡输入 QA,防止 placeholder 回退为系统默认暗色
+- 版本号更新为 `8.3.7`,Build 更新为 `20260822.2207`
+
## [8.3.6] — 2026-07-07
- 设置页顶部固定 Pro 状态 / 引导行移除外层圆角矩形背景和描边,保留原位置、身份文案、购买和恢复购买入口
diff --git a/C1.source/Scripts/app_note_bubble_input_qa.sh b/C1.source/Scripts/app_note_bubble_input_qa.sh
index 043552c..e070588 100755
--- a/C1.source/Scripts/app_note_bubble_input_qa.sh
+++ b/C1.source/Scripts/app_note_bubble_input_qa.sh
@@ -43,6 +43,18 @@
"App note bubble editor must use a native NSTextField subclass",
)
require(
+ r"placeholderAttributes\s*:\s*\[NSAttributedString\.Key\s*:\s*Any\](?P<body>.*?)NSColor\.white\.withAlphaComponent\s*\(\s*0\.48\s*\)",
+ support,
+ "App note bubble placeholder must use an explicit readable-but-secondary white alpha color",
+)
+require(
+ r"placeholderAttributedString\s*=\s*NSAttributedString\s*\((?P<body>.*?)attributes\s*:\s*Self\.placeholderAttributes",
+ support,
+ "App note bubble must apply the explicit placeholder color through placeholderAttributedString",
+)
+if "field.placeholderString = placeholder" in support:
+ fail("App note bubble must not rely on the system default placeholderString color")
+require(
r"AppBubbleNoteTextField\s*\((?P<body>.*?)text\s*:\s*\$draftNote(?P<body2>.*?)isFocused\s*:\s*noteFocused(?P<body3>.*?)onCommit\s*:\s*onCommit(?P<body4>.*?)onCancel\s*:\s*onCancel",
support,
"AppNameBubble must route draft text, focus, submit, and cancel through the native note editor",
diff --git a/CODEGRAPH.md b/CODEGRAPH.md
index 162e5de..2c01bc6 100644
--- a/CODEGRAPH.md
+++ b/CODEGRAPH.md
@@ -71,7 +71,7 @@
- `ProStatusPill`:高级功能入口的小型 Pro 胶囊;Pro / 已锁定高级功能使用金色皇冠体系,免费状态使用中性胶囊。
- `ProUpgradePromptView`:功能被锁时的统一解锁提示,购买 / 恢复动作由调用方闭包绑定。
- `C1.source/Apptag/AppGridSupport.swift`
- - 图标气泡、基础 metrics、气泡 placement 支撑。
+ - 图标气泡、基础 metrics、气泡 placement 支撑;备注编辑气泡使用原生 `NSTextField` 桥接,placeholder 需显式使用次级但可读的浅色 attributed string,避免系统默认 placeholder 在深色浮层上近似消失。
- `C1.source/Apptag/TagNavigationView.swift`
- AppKit 标签导航栏,支持标签 hover 滚动、选中、拖放、双击进入标签设置页;标签按钮颜色优先使用 `TagDef.customColor`。
- `C1.source/Apptag/AppDragCoordinator.swift`
@@ -189,7 +189,7 @@
- `C1.source/Scripts/windowserver_event_safety_qa.sh`
- WindowServer / TextInput 事件安全静态门禁;检查 Quick Search marked-text 输入保护、composition 期间不响应鼠标 / 背景关闭、面板置前去重,以及 TagNavigation 阻塞式事件循环兜底退出。
- `C1.source/Scripts/app_note_bubble_input_qa.sh`
- - App note 泡泡输入框 IME 安全门禁;检查备注泡泡使用原生 `NSTextField` 桥接、marked text 期间不覆盖/截断/提交,最终提交仍受备注长度上限约束。
+ - App note 泡泡输入框 IME / placeholder 可读性门禁;检查备注泡泡使用原生 `NSTextField` 桥接、placeholder 使用显式次级浅色 attributed string、marked text 期间不覆盖/截断/提交,最终提交仍受备注长度上限约束。
- `C1.source/Scripts/pro_custom_hotkeys_qa.sh`
- Pro 自定义快捷键静态与 Carbon 运行时门禁;检查 Pro gate、录制期间暂停/恢复全局快捷键、事务式注册保存、重复校验、禁用重权限键盘 API、设置页 Pro 按钮组合和 29 语种文案。
- `C1.source/Scripts/pro_tag_custom_color_qa.sh`
--
Gitblit v1.9.3