Skip to content

refactor(hig): bind .defaultAction/.cancelAction and confirm Remove Provider#1275

Merged
datlechin merged 1 commit into
mainfrom
refactor/hig-batch-2
May 15, 2026
Merged

refactor(hig): bind .defaultAction/.cancelAction and confirm Remove Provider#1275
datlechin merged 1 commit into
mainfrom
refactor/hig-batch-2

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

Round 2 of macOS HIG cleanup, addressing remaining issues found while reviewing the broader codebase:

  • Cancel buttons in ConnectionTagEditor, ConnectionGroupPicker — added .keyboardShortcut(.cancelAction).
  • Primary buttons using .keyboardShortcut(.return) in ConnectionTagEditor, ConnectionGroupPicker, BackupResultSheet — changed to .keyboardShortcut(.defaultAction), which also auto-tints the button as the platform default action.
  • PairingApprovalSheet — added .buttonStyle(.borderedProminent) + .keyboardShortcut(.defaultAction) on the Approve button. Previously plain styled despite being the primary action.
  • AIProviderDetailSheet — "Remove Provider" no longer deletes immediately on click; now triggers a native .confirmationDialog with a typed message. Destructive actions should always confirm.
  • LicenseActivationSheet — removed a duplicate .keyboardShortcut(.cancelAction) modifier left over from a previous edit.

Test plan

  • ConnectionTagEditor: Esc dismisses, Return creates tag, primary button shows accent tint
  • ConnectionGroupPicker: Esc dismisses, Return creates group, primary button shows accent tint
  • BackupResultSheet: Return dismisses the Done button correctly
  • PairingApprovalSheet: Approve button visually prominent (blue), Return triggers it, Esc denies
  • AIProviderDetailSheet: clicking "Remove Provider" now shows a confirmation dialog before deleting; cancel keeps the provider intact
  • LicenseActivationSheet: Esc still dismisses the sheet (only one cancelAction binding now)

@datlechin datlechin merged commit fce09ae into main May 15, 2026
2 checks passed
@datlechin datlechin deleted the refactor/hig-batch-2 branch May 15, 2026 08:58
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