Skip to content

refactor(source-picker): glue kebab to Select as a split-button chip#2369

Closed
elizabetdev wants to merge 1 commit into
alex/source-chip-ux-prototypefrom
agent/source-chip-glued-kebab
Closed

refactor(source-picker): glue kebab to Select as a split-button chip#2369
elizabetdev wants to merge 1 commit into
alex/source-chip-ux-prototypefrom
agent/source-chip-glued-kebab

Conversation

@elizabetdev
Copy link
Copy Markdown
Contributor

@elizabetdev elizabetdev commented May 29, 2026

Summary

Restyles SourceSelect + SourceManagementMenu from "Select plus a floating icon button" into a single split-button chip.

Also normalizes the kebab Tooltip to the app-wide convention (withArrow, default color) so it reads the same as Filter Settings and other gray tooltips across the app — color=\"dark\" was an inconsistency, not an intentional variant.

When hasMenu is false (e.g. DBTableSelect callers that don't wire onEditCurrentSource / onCreateSource), the [data-with-menu] attribute is omitted and the original side-by-side layout is preserved, so this is a
zero-risk change for non-source callers.

Screenshot 2026-05-29 at 13 16 35

Why

The kebab being its own visually detached ActionIcon makes it ambiguous whether the menu acts on the selected source or on something more global (e.g. the page). Treating Select + kebab as a unified chip makes "actions on
this source" the obvious read at a glance, mirroring the split-button pattern in the Mantine docs.

Test plan

  • SourceSelect in search / dashboard tile editor / alert editor renders as a single chip with no visible gap or double border between input and kebab.
  • Hover on the kebab tints only the kebab; hover on the input tints only the input (no shared hover state — they're still independent triggers).
  • Tooltip on the kebab matches Filter Settings / other gray tooltips (with arrow, default color).
  • DBTableSelect (no menu wired) renders the input alone with its original rounded corners and no orphaned styles.
  • Theme switch (HyperDX ↔ ClickStack) keeps the seam at 1px on both themes (kebab border uses var(--input-bd, var(--color-border))).

Made with Cursor

…utton chip

The kebab `SourceManagementMenu` was rendered as a separate sibling of the
Select with a 4px gap, so it read as "Select plus an unrelated icon button"
rather than "actions on this source." Restyle the pair as a single
split-button chip: the input's right corners are squared, the kebab's left
corners are squared, the kebab stretches to match the input's height, and
its left border overlaps the input's right border by 1px so the two share a
single seam. Override Mantine v7 corners via `--input-radius` /
`--ai-radius` (the canonical override path) instead of fighting class-level
`border-radius` against `@layer mantine`.

Also normalize the kebab tooltip to the app-wide convention (`withArrow`,
default color) so it matches `Filter Settings` and other gray-tinted tooltips
across the app.

When `hasMenu` is false (no handlers wired, e.g. `DBTableSelect` callers),
the `[data-with-menu]` attribute is omitted and the original side-by-side
layout is preserved.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 29, 2026

⚠️ No Changeset found

Latest commit: 35f9fa6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment May 29, 2026 12:16pm
hyperdx-storybook Error Error May 29, 2026 12:16pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

Deep Review

✅ No critical issues found.

This diff is a pure visual/CSS refactor restyling the source Select + kebab ActionIcon into a single split-button chip. The two non-style changes are a Group gap={4} → gap={0} (required by the new shared-seam layout) and a Tooltip normalization (drop color="dark", add withArrow) that matches the convention used elsewhere in the app. No logic, contracts, data handling, or component APIs change. Existing SourceManagementMenu tests still pass without modification because they assert on data-testid, menu items, and click behavior — none of which the diff touches.

The [data-with-menu] gate cleanly preserves the prior layout for callers that don't wire any menu handlers, and DBTableSelect (which renders SourceManagementMenu inside its own <Flex> rather than inside .sourceSelectGroup) is unaffected by the new chip styling — it only inherits the Tooltip normalization, as the PR intends. Both themes define the referenced CSS tokens (--color-bg-field-addon), and var(--input-bd, var(--color-border)) has a sane fallback for surfaces where Mantine's input variable doesn't cascade to the kebab sibling.

🔵 P3 nitpicks (1)
  • packages/app/styles/SourceSelectControlled.module.scss:55 — the kebab is hardcoded to 30px × 30px, which matches size="xs" callers but will mismatch the input height for callers that don't pass a size; DashboardFiltersModal.tsx is the one menu-wired caller using the default sm size and will show a small height delta on the chip.
    • Fix: Either thread the size prop into the kebab so its height tracks the input, or rely on align-items: stretch with height: auto; min-height: 30px to let the kebab match whichever input size is active.

Reviewers (1): synthesis (small-diff direct review; multi-agent fan-out not warranted for a ~30-line CSS-only change).

@alex-fedotyev
Copy link
Copy Markdown
Contributor

Thanks Elizabet! I cherry-picked 35f9fa6e onto alex/source-chip-ux-prototype as bcee4847 (your authorship preserved on the commit) so the chip styling lands as part of #2365 rather than as a stacked follow-up. Closing this one since the change is in #2365 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants