Conversation
Wraps the buttons, cards, pills and segmented radio variants in flux:with-tooltip so a tooltip can be set via the tooltip, tooltip:position and tooltip:kbd props, matching flux:button and flux:toggle. The whole radio becomes the hover trigger instead of only its label, and the segmented and cards groups let the tooltip wrapper stretch as the flex item so the layout stays identical with or without a tooltip.
kachelle
marked this pull request as draft
September 17, 2026 08:39
kachelle
marked this pull request as ready for review
September 17, 2026 08:43
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.
The scenario
A segmented radio where one option needs a tooltip, for example a "-" segment meaning "Not applicable". The obvious way is to put a
flux:tooltipinside the radio slot, but then only the label text triggers the tooltip.ui-tooltipisinline-flexand shrink-wraps its slot, so hovering the padding of the segment shows nothing, while the whole segment is clickable.The workaround today is
class="h-full w-full items-center justify-center"on the tooltip, which every consumer has to rediscover.The proposal
A
tooltipprop onflux:radio, likeflux:buttonandflux:togglealready have, so the tooltip wraps the radio itself and the hover zone equals the click zone:tooltip:positionandtooltip:kbdcome along for free.The solution
The
buttons,cards,pillsandsegmentedvariants add the three tooltip keys to their@blaze(unsafe: [...])list and wrap<ui-radio>in the existingflux:with-tooltiphelper, exactly astoggle.blade.phpdoes:One layout decision. The
segmentedandcardsgroups are flex rows whose radios carryflex-1. With a tooltip, theui-tooltipwrapper becomes the flex item instead, so both groups add[&>ui-tooltip]:flex-1to keep segment widths identical with or without a tooltip.buttonsandpillswrap freely and need nothing. The alternative was lettingwith-tooltipaccept a class, but a group-level selector keeps the helper untouched and scoped to the two variants that stretch.The
defaultvariant is left alone, since it is an inline-label control rather than a button-like one.The
ui-radio-groupwalker skips through non-radio descendants, so keyboard navigation andwire:modelare unaffected by the extra wrapper. Verified in a Livewire app against the 2.18.0 tag, which has identical radio stubs to main.