fix: don't render an empty selected-count badge in combobox - #3853
Open
GiantRobots wants to merge 2 commits into
Open
fix: don't render an empty selected-count badge in combobox#3853GiantRobots wants to merge 2 commits into
GiantRobots wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
In multiselect mode with displayChips off, the combobox always rendered a Badge for the selected count. When a consumer supplies a numberOfItemsSelectedLabel that returns an empty string, the badge has no content and collapses to a small light square, which shows up as a stray dot between the leading icon and the placeholder. Skip the badge when the label is empty. The default label is never empty, so existing consumers are unaffected. Generated with [Linear](https://linear.app/temporal/issue/UI-130/fix-the-weird-dot-next-to-select-a-namespace-in-the-async-combo-picker#agent-session-e4e193e9) Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
GiantRobots
force-pushed
the
alexthomsen/ui-130-fix-the-weird-dot-next-to-select-a-namespace-in-the-d12d
branch
from
August 20, 2026 21:00
b9d6322 to
8827f1c
Compare
Two stories for the multiselect count badge: one with a blank numberOfItemsSelectedLabel asserting no empty badge is rendered, and one with the default label asserting the count still shows. Generated with [Linear](https://linear.app/temporal/issue/UI-130/fix-the-weird-dot-next-to-select-a-namespace-in-the-async-combo-picker#agent-session-e4e193e9) Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
GiantRobots
marked this pull request as ready for review
August 21, 2026 21:11
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.
Description & motivation 💭
In multiselect mode with
displayChipsoff, the combobox always rendered aBadgefor the selected count:If a consumer supplies a
numberOfItemsSelectedLabelthat returns an empty string — reasonable when the count is already shown elsewhere on the page — the badge has no content.Badgeis adivwithp-1,rounded-smand a lightbg-slate-100fill, so with nothing inside it collapses to roughly an 8×8 light square. That is the stray dot reported between the leading search icon and the "Select a namespace" placeholder.This skips the badge when the label is empty. The default label is never empty, so existing consumers see no change.
Screenshots (if applicable) 📸
None — no browser was available in this environment. The artifact was confirmed from the rendered DOM instead.
Design Considerations 🎨
The guard lives in the shared Holocene component rather than at the call site, so any screen that opts out of the in-field count is protected.
Testing 🧪
How was this tested 👻
Two stories added under
Combobox:Verified locally by mounting the combobox and inspecting the DOM in those states. Before the fix the blank-label case emits
<div class="… rounded-sm p-1 … bg-slate-100"></div>— the artifact; after, that element is gone.Storybook builds and both stories register in the index. I could not execute the play functions here:
pnpm stories:testneeds a chromium binary and the Playwright CDN is unreachable from this environment, so the assertions are unverified by a real run — worth a glance when CI picks them up.pnpm lintandpnpm checkare clean; the existing unit suite passes unchanged (232 files, 3026 tests).Steps for others to test: 🚶🏽♂️🚶🏽♀️
Open Combobox → Multiselect Without Count Label. There should be no small light square between the search icon and the placeholder. Checking out
mainand reloading shows the dot.Checklists
Draft Checklist
numberOfItemsSelectedLabel. The Cloud UI repo wasn't reachable from this environment, so that last link is unverified — the emptyBadgeis the only element in this component that renders as a small featureless light box in that position (an emptyChipis ruled out, since it always draws a close X).