Repository navigation
fix(ui): 同步還原 Dwell 與 Latest 按鈕配色 - #94
Merged
Merged
Conversation
以共用 FeedbackButton 在回饋結束後清除原生舊色動畫,保留 Latest 外觀、HWND、焦點與版面。未啟用視窗也使用配對懸停色,並阻擋排入 UI 佇列的過期 Dwell 進度更新。 新增預設與一般按鈕、啟用與未啟用視窗的逐幀配色及對比回歸測試,同步工程規範與測試文件。淺色、深色及實際高對比各 27 項通過;完整非 UI 456 項、UI 42 項通過。停用快取重設的反例四項皆失敗,確認能偵測原問題。 Release 建置零警告、零錯誤,修改 C# 的資訊層級格式與分析器診斷皆為空。本次僅變更 InputBox 自家視覺回饋,不改變剪貼簿或第三方輸入/輸出行為。
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The fix depends on timing-sensitive .NET 11 native animation-cache behavior and active/inactive window rendering across Windows themes, requiring interactive human validation unavailable in this review environment.
No open issues 🎉
1 file not reviewed
src/InputBox/MainForm.Designer.cs: Generated file
What changed in this PR
此 PR 修正共用按鈕在 Dwell 回饋結束時,Latest 原生背景動畫與自訂文字還原不同步的問題,並維持未啟用視窗的懸停配色一致性。
Changes:
- 新增
FeedbackButton並套用至主視窗及各對話框,透過原生主題刷新路徑清除舊色彩動畫。 - 調整回饋還原流程,保留未啟用視窗的成對懸停配色,並阻擋過期 Dwell 進度寫入。
- 新增四組逐幀渲染測試,涵蓋預設/一般按鈕與視窗啟用狀態,同步更新測試及無障礙規範文件。
| File | Description |
|---|---|
| tests/InputBox.Tests/README.md | 更新測試數量、交接驗證方式及結果紀錄。 |
| tests/InputBox.Tests/ButtonFeedbackRenderingTests.cs | 新增四組逐幀配色、對比及控制項狀態測試。 |
| src/InputBox/MainForm.Designer.cs | 複製按鈕改用 FeedbackButton。 |
| src/InputBox/Core/Extensions/ButtonEyeTrackerExtensions.cs | 同步還原原生配色、支援未啟用懸停並攔截過期更新。 |
| src/InputBox/Core/Controls/PhraseManagerDialog.Layout.cs | 片語操作按鈕改用 FeedbackButton。 |
| src/InputBox/Core/Controls/PhraseManagerDialog.cs | 關閉按鈕改用 FeedbackButton。 |
| src/InputBox/Core/Controls/PhraseEditDialog.cs | 確認與取消按鈕改用 FeedbackButton。 |
| src/InputBox/Core/Controls/NumericInputDialog.cs | 共用回饋按鈕改用 FeedbackButton。 |
| src/InputBox/Core/Controls/HelpDialog.cs | 關閉按鈕改用 FeedbackButton。 |
| src/InputBox/Core/Controls/GamepadMessageBox.cs | 訊息框按鈕改用 FeedbackButton。 |
| src/InputBox/Core/Controls/GamepadCalibrationDialog.cs | 校準對話框按鈕改用 FeedbackButton。 |
| src/InputBox/Core/Controls/FeedbackButton.cs | 提供原生色彩動畫快取重設入口。 |
| docs/engineering/a11y-safety.md | 記錄 Dwell 交接、懸停配色及過渡測試要求。 |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dwell 結束時,原生 Latest 背景動畫與自訂文字還原不同步,造成預設按鈕短暫藍底黑字;視窗未啟用時也會略過自訂懸停配色。
所有共用回饋按鈕改用 FeedbackButton,在還原原生色後清除舊動畫快取,保留 Latest 外觀、HWND、尺寸與焦點;未啟用視窗仍使用成對的懸停背景與文字,並在 UI 寫入前攔下過期 Dwell 更新。
驗證:淺色、深色、實際 Windows 高對比各 27/27;完整非 UI 456/456、UI 42/42。新增四組測試涵蓋預設/一般與啟用/未啟用視窗,檢查過渡取樣的文字 ≥4.5:1、提示 ≥3:1 與首幀同步還原;暫停快取重設的反例四項均失敗。高對比設定已還原。Release 建置零警告、零錯誤,修改 C# 的資訊層級樣式及分析器診斷為空。
使用既有 GPG 簽章提交;本次只調整自家視覺回饋,不改變剪貼簿或第三方輸入/輸出行為。