Repository navigation
feat(Selector): show a truncated value's whole label in a tooltip - #175
Draft
lablup-quill[bot] wants to merge 1 commit into
Draft
lablup-quill[bot] wants to merge 1 commit into
lablup-quill[bot] wants to merge 1 commit into
Conversation
Add showSelectedOptionTooltip, an opt-in prop that reads the selected option's full label on hover or focus when the trigger ellipsizes it. It shows only while the label is actually clipped, and stays off while nothing is selected, while the control is disabled, or while the listbox is open. The trigger tooltip is now shared with MultiSelector so both follow the trigger's own state the same way.
Contributor
PR Analysis Report📚 Storybook PreviewGitHub Pages may take up to a minute to hydrate after the deploy. 🧩 Changed ComponentsNo files changed under 4 other changed file(s) in
|
| Group | Gzip | Δ Gzip vs base |
|---|---|---|
formControls |
16.6 kB | +0.7 kB |
Total gzip (JS + CSS): 214.4 kB (+0.7 kB vs origin/main)
Generated by the PR Preview workflow for 005114e · Storybook · CI run
Contributor
|
Preview published under the pnpm add @lablup/ui-common@0.2.0-alpha.21.pr-175-20261124104310-005114e87
pnpm add -D @lablup/ui-common-cli@0.2.0-alpha.21.pr-175-20261124104310-005114e87In backend.ai-webui: |
This branch was successfully deployed
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.
Resolves #174
Summary
Add
showSelectedOptionTooltip, an opt-in prop on the single-selectSelector(and soBAISelectsingle mode), that shows the selected option's full label in a tooltip on hover or keyboard focus when the trigger cuts it off with an ellipsis.aria-describedbybeside the caller's.MultiSelector'sshowSelectedOptionsTooltip(feat(MultiSelector): rename showTooltip to showSelectedOptionsTooltip and let it take the tooltip's content #169, consumed by feat(#10951): show the selected options in a tooltip on multi-select triggers backend.ai-webui#11309).Changes
src/formControls/Selector/Selector.tsx: resolves the selected option fromoptions(sections included) and mounts the trigger tooltip when the trigger clips the label.src/formControls/triggerTooltip.tsx: the trigger tooltipMultiSelectoralready had, moved out and shared, plus the clipping measurement.MultiSelectorbehaviour is unchanged; both now follow the trigger's own disabled and expanded state the same way.aria-describedbywiring, sections and a value-only option, and the caller's ref.ShowTruncatedValueTooltipstory and aCHANGELOG.md[Unreleased]entry.Verification
pnpm run typecheck,pnpm run lint,pnpm run format:check,pnpm run test(111 files, 2410 passed, 16 skipped) andpnpm run build: pass.Risk tier: Medium
Suggested human approvals: 1 (branch protection decides)