Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d36f1541cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private func background(for role: ButtonRole?) -> some View { | ||
| if type != .quaternary { | ||
| switch controlBorderShape { | ||
| case .capsule: | ||
| Capsule() | ||
| .fill(backgroundColor(for: role) | ||
| .opacity(backgroundOpacity)) | ||
| .overlay { | ||
| Capsule() | ||
| .strokeBorder(Color.onSurfacePrimary.opacity(0.15), lineWidth: 2) | ||
| .opacity(isBordered || theme.borderButtons ? 1 : 0) | ||
| } | ||
| if #available(iOS 26.0, macOS 26.0, tvOS 26.0, watchOS 26.0, *) { | ||
| Capsule() | ||
| .fill(backgroundColor(for: role).opacity(backgroundOpacity)) | ||
|
|
There was a problem hiding this comment.
Preserve border shape for iOS 26 buttons
On iOS 26+ this branch always returns a plain Capsule fill, so the controlBorderShape environment and the isBordered/theme.borderButtons stroke overlay used in the pre‑26 branch are ignored. The default rounded-rectangle shape (and any bordered style) will render as an unbordered capsule on iOS 26+, which is a visual regression for controls that rely on those settings.
Useful? React with 👍 / 👎.
| if let content { | ||
| Surface { | ||
| content | ||
| } |
There was a problem hiding this comment.
Avoid always showing empty content surface
This if let content guard is effectively always true because the initializer unconditionally assigns self.content = content() and the default content builder returns EmptyView(). On macOS that means an empty Surface panel is rendered even when callers don’t supply any content, leaving a blank card in the layout. If content is meant to be optional, the default should set it to nil (or the property should be non‑optional and the if let removed).
Useful? React with 👍 / 👎.
No description provided.