fix(#274): make full 44pt toolbar button circle tappable#319
Merged
Conversation
The frame/contentShape in minimumTouchTarget was applied outside the Button, so only the small icon label was hit-testable while the interactive glass circle gave press feedback for the whole 44pt area. Taps landing off the icon animated but never fired the action (FB22155477). Moving the frame/contentShape into a ButtonStyle places the 44pt circle inside the button's hit-test region for Button and ShareLink alike. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
Fixes #274 — intermittent unresponsive liquid glass toolbar buttons (favorite, share, filter) on the home page and on posts: the button animated the touch but the action (share sheet, filter, favorite) sometimes never fired.
Root cause
MinimumTouchTarget.swiftapplied.frame(width: 44, height: 44)+.contentShape(Circle())outside theButton/ShareLink. An ancestor's frame/content shape does not extend a descendant button's hit-test region, so the actual tappable area was only the small SF Symbol icon — while.glassEffect(…).interactive()covered the full 44pt circle and animated on every touch inside it.Only toolbar buttons were affected because
.minimumTouchTarget()is used exclusively on toolbar items. Matching Apple report: Button in ToolbarItem is not completely tappable on iOS 26 (FB22155477).Fix
Moved the 44pt frame + circular content shape into a custom
ButtonStyle— a style's body is the button's label, so the full circle now sits inside the button's hit-test region. Works for bothButton(favorite/filter) andShareLink(share). Pressed-state opacity preserves the.plainstyle feedback; glass effect unchanged. One file; all 6 call sites inherit the fix.Verification
-testPlan MacMagazine)🤖 Generated with Claude Code