Repository navigation
Make the whole iOS button group segment tappable - #126
Open
vmitchell85 wants to merge 1 commit into
Open
vmitchell85 wants to merge 1 commit into
vmitchell85 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <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.
On iOS, an unselected
native:button-groupsegment only responds to taps on its label text. Tapping the empty space either side of the label does nothing, so short labels likeS,M,Lhave a very small target. The selected segment works across its whole frame.Each segment is a
.plainstyleButtonwhose label hasColor.clearas its background when unselected. A plain button only hit-tests drawn content, so the clear background doesn't count and only the text receives the tap. The selected segment paintstheme.primary, which is why it behaves.This adds
.contentShape(Rectangle())to the segment label so the whole segment is the tap target. The tab row, chip, and accordion renderers already do the same. Nothing changes visually or on the PHP side, and Android is unaffected because it uses Material's segmented button row.#123 replaces this renderer with
UISegmentedControl, which would also fix the tap area. This is the minimal fix in case that change needs longer to land.To reproduce, tap just inside the left or right edge of an unselected segment:
🤖 Generated with Claude Code