Skip to content

feat(button): implement button styles and interactions - #1138

Merged
Kyle-Ye merged 33 commits into
mainfrom
feature/button-pr
Oct 12, 2026
Merged

Kyle-Ye merged 33 commits into
mainfrom
feature/button-pr

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Close #1024

  • Implement Button APIs, style configuration, roles, border shapes, and repeat behavior with public documentation.
  • Add standard and platform button styles, AppKit button handling, button toggles, and press gesture callbacks.
  • Render text with keyed foreground and custom styles, and connect the display list and accessibility support used by buttons.
  • Add a shared counter example and interaction snapshots for repeated presses and disabled buttons. Update the RenderBox dependencies and Compute fix used by these paths.

Dependency

@Kyle-Ye
Kyle-Ye requested a review from Mx-Iris as a code owner October 11, 2026 17:19
@github-actions github-actions Bot added the area: accessibility Accessibility APIs, settings, semantics, or behavior. label Oct 11, 2026
@github-actions github-actions Bot added area: event-gesture Events, gestures, tracing, or interaction plumbing. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: text Text, labels, line style, and text rendering APIs. area: view View APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior. type: feature New API, behavior, platform support, or user-facing capability. labels Oct 11, 2026
@Kyle-Ye

Kyle-Ye commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

/interactiontest update

@augmentcode

augmentcode Bot commented Oct 11, 2026

Copy link
Copy Markdown

PR Risk Analyzer Agent 🛡️

👀 Human review needed

Justification

This change falls outside automatic low-risk approval:

  • Touches protected CI configuration under .github/ (.github/workflows/stdout_renderer.yml, .github/workflows/ubuntu.yml), which is on the always-require-full-review list.
  • Modifies additional CI/build and dependency configuration: Scripts/CI/compute_setup.sh, Renderer/Stdout/configure-env.sh, mise.compute.toml, and Package.resolved.
  • Large, high-surface change: 58 files, +5547/-474 across 30 commits, adding new Button APIs, styles, gestures, AppKit integration, and rendering/text/accessibility paths.

Automatic classification fails closed to human review for protected-path and large-scope changes.

Reviewed commit dd033fe

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Deep Code Review Agent🐛

Review completed with 3 suggestions.

Reviewed commit: dd033fe

Comment thread Sources/OpenSwiftUI/View/Control/Button/ButtonBorderShape.swift
Comment thread Sources/OpenSwiftUI/Data/Environment/AppIntentAction.swift
@augmentcode

augmentcode Bot commented Oct 11, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary

  • Replaces placeholder Button rendering with functional controls and documented public initializers.
  • Adds ButtonStyle and PrimitiveButtonStyle configurations and dynamic style resolution.
  • Provides automatic, plain, borderless, bordered, prominent, and widget button styles.
  • Adds native AppKit buttons with layout, focus, keyboard, spring-loading, and repeat-timer support.
  • Implements legacy and improved press gestures with pressing and release callbacks.
  • Adds button roles, border shapes, and repeat-behavior environment APIs.
  • Introduces .button toggle styling with on/off state propagation.
  • Connects large-content accessibility preferences and platform selection metadata.
  • Renders keyed foreground and custom text-style layers through RenderBox display lists.
  • Adds a shared counter example and interaction snapshots for repeated taps and disabled buttons.
  • Updates DarwinPrivateFrameworks and OpenRenderBox dependencies and adopts the Compute bugfix.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread Sources/OpenSwiftUI/View/Control/Button/AppKitButton.swift
Comment thread Sources/OpenSwiftUI/Data/Environment/AppIntentAction.swift
Comment thread Sources/OpenSwiftUI/View/Control/Button/BorderedButtonStyle_Phone.swift Outdated
@Kyle-Ye

Kyle-Ye commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

/interactiontest update

@tuist

tuist Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
Unknown ⏳ 7 d8d81da55
OpenSwiftUI ✅ 7 d8d81da55

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 1m 8s d8d81da55

@github-actions github-actions Bot added the platform: macOS macOS-specific behavior or support. label Oct 11, 2026
@Kyle-Ye

Kyle-Ye commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

/interactiontest macos openswiftui-renderer-iag

@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1749 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.04%. Comparing base (5def810) to head (648dbf6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...OpenSwiftUI/View/Control/Button/AppKitButton.swift 0.00% 490 Missing ⚠️
...rces/OpenSwiftUI/Event/Gesture/ButtonGesture.swift 0.00% 227 Missing ⚠️
.../OpenSwiftUI/View/Control/Button/ButtonStyle.swift 0.00% 149 Missing ⚠️
...iew/Control/Button/WidgetBorderedButtonStyle.swift 0.00% 86 Missing ⚠️
...urces/OpenSwiftUI/View/Control/Button/Button.swift 0.00% 80 Missing ⚠️
...tUICore/Shape/ShapeStyle/ShapeStyleRendering.swift 0.00% 74 Missing ⚠️
...ew/Control/Button/BorderedButtonStyle_CarMac.swift 0.00% 73 Missing ⚠️
...tUI/View/Control/Button/PrimitiveButtonStyle.swift 0.00% 66 Missing ⚠️
...iftUI/View/Control/Button/DefaultButtonStyle.swift 0.00% 57 Missing ⚠️
...wiftUI/View/Control/Button/ButtonBorderShape.swift 0.00% 56 Missing ⚠️
... and 25 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1138      +/-   ##
==========================================
+ Coverage   26.41%   30.04%   +3.63%     
==========================================
  Files         830      921      +91     
  Lines       62143    73240   +11097     
==========================================
+ Hits        16416    22008    +5592     
- Misses      45727    51232    +5505     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye

Kyle-Ye commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

/interactiontest

@Kyle-Ye
Kyle-Ye merged commit 419664e into main Oct 12, 2026
8 of 10 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/button-pr branch October 12, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: accessibility Accessibility APIs, settings, semantics, or behavior. area: event-gesture Events, gestures, tracing, or interaction plumbing. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: text Text, labels, line style, and text rendering APIs. area: view View APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior. platform: macOS macOS-specific behavior or support. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Button support

1 participant