Commit 9efa13f
authored
feat(playground-ui): remove CombinedButtons in favor of ButtonsGroup (#16035)
## Summary
- Replace both `CombinedButtons` callers — observability
(`trace-timeline-tools.tsx`) and experiment
(`experiment-trace-timeline-tools.tsx`) trace timeline span-type filters
— with `ButtonsGroup spacing="close"`.
- Delete `packages/playground-ui/src/ds/components/CombinedButtons/` and
remove the export from the package index.
### Why
`CombinedButtons` and `ButtonsGroup` were near-duplicate primitives. The
segmented look from `CombinedButtons` is achievable with `ButtonsGroup
spacing="close"`, just with per-button borders + 2px gap rather than a
single outer shell with internal dividers. Consolidating to one
primitive removes API drift.
### Migration
```tsx
// Before
<CombinedButtons>
<Button>Agent</Button>
<Button>Model</Button>
</CombinedButtons>
// After
<ButtonsGroup spacing="close">
<Button>Agent</Button>
<Button>Model</Button>
</ButtonsGroup>
```
## Test plan
- [ ] Visit `/agents/<id>/traces?traceId=<id>` → trace timeline filter
(Agent / Model / etc.) renders as segmented cluster, click toggles fade,
X resets
- [ ] Visit `/experiments/<id>` → click a result row → trace panel
timeline filter behaves identically
- [ ] `pnpm exec tsc --noEmit` clean in `packages/playground` and
`packages/playground-ui`
- [ ] No remaining `CombinedButtons` references in repo (grep)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This PR removes a duplicate button component called `CombinedButtons`
that did the same thing as an existing `ButtonsGroup` component. Instead
of having two similar ways to display a group of buttons, the code now
uses `ButtonsGroup` everywhere, making the codebase simpler and less
confusing.
## Summary
Consolidates two near-duplicate button grouping primitives by removing
the `CombinedButtons` component in favor of using `ButtonsGroup` with
`spacing="close"` to achieve the same segmented button layout.
### Changes Made
**Component Removal:**
- Deleted `packages/playground-ui/src/ds/components/CombinedButtons/`
directory, including:
- `combined-buttons.tsx` (component implementation with
`CombinedButtonsProps` interface)
- `combined-buttons.stories.tsx` (Storybook stories: Default,
ThreeButtons, WithIcons, IconOnly, SplitButton)
- `index.ts` (barrel export)
- Removed `CombinedButtons` export from
`packages/playground-ui/src/index.ts`
**Migration:**
-
`packages/playground/src/domains/experiments/components/experiment-trace-timeline-tools.tsx`:
Replaced `<CombinedButtons>` wrapper with `<ButtonsGroup
spacing="close">`
-
`packages/playground/src/domains/observability/components/trace-timeline-tools.tsx`:
Replaced `<CombinedButtons>` wrapper with `<ButtonsGroup
spacing="close">`
**Documentation:**
- Added `.changeset/wise-ties-try.md` documenting the minor version bump
and breaking change removal, including before/after migration examples
### Impact
- Both affected components (trace timeline tools in observability and
experiments domains) now use the consolidated `ButtonsGroup` API with
`spacing="close"` to render segmented button clusters
- No functional or visual changes to end-user behavior; the segmented
appearance and interaction patterns remain identical
- API surface reduced by removing duplicate component
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 1c2dda8 commit 9efa13f
7 files changed
Lines changed: 25 additions & 107 deletions
File tree
- .changeset
- packages
- playground-ui/src
- ds/components/CombinedButtons
- playground/src/domains
- experiments/components
- observability/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 0 additions & 77 deletions
This file was deleted.
Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
0 commit comments