[render preview] [Feature] Add Bubble component
Merged
DJ
5mo ago+627+627+012345678901234567890123456789-0-0-0123456789
Description
Ports the shadcn Bubble component to RubyUI — a chat bubble surface for conversational content.
Reference:
- Docs: https://ui.shadcn.com/docs/components/radix/bubble
- Source:
apps/v4/registry/bases/radix/ui/bubble.tsx
What's included
Bubble— root,variant:(default, secondary, muted, tinted, outline, ghost, destructive) andalign:(start/end)BubbleContent— content wrapper; polymorphic viaas:(:divdefault,:a,:button) for link/button bubbles — the idiomatic Phlex equivalent of shadcn'sasChildBubbleReactions— edge-anchored reactions pill,side:(top/bottom) +align:(start/end)BubbleGroup— stacks bubbles with tight spacing
Notes
- shadcn ships these styles as a custom
cn-bubble-*CSS layer. This port translates every rule to real Tailwind v4 utilities + RubyUI theme tokens, so no custom CSS is shipped. - No JS (no Stimulus controller).
- Composes with the existing Tooltip and Popover components — examples included in the docs page.
- No
dependencies.ymlentry (Bubble has no gem/JS/component deps, like Avatar/Card).
Testing
cd gem && bundle exec rake→ tests + StandardRB green.- Docs page rendered locally at
/docs/bubble: all 7 variants, alignment, reactions (top/bottom × start/end), group, link/button hover states, and Tooltip/Popover integration verified visually.
Screenshots
Add before/after screenshots of /docs/bubble.
Summary by cubic
Add a chat Bubble component to RubyUI for conversational UIs with 7 variants, alignment, grouping, reactions, docs, tests, and mcp registry entries. Built with Tailwind v4 utilities and RubyUI tokens—no custom CSS or JS.
-
New Features
RubyUI::Bubblewith variants: default, secondary, muted, tinted, outline, ghost, destructive;align: :start|:end.RubyUI::BubbleContentpolymorphic viaas: :div|:a|:buttonfor link/button bubbles.RubyUI::BubbleReactionspill anchored to the bubble edge;side: :top|:bottom,align: :start|:end.RubyUI::BubbleGroupto stack bubbles with tight spacing.- Docs at
/docs/bubblewith examples and Tooltip/Popover integration; routes, menu, sitemap, and LLMs maps updated. - Rebuilt
mcpregistry to include Bubble metadata and examples.
-
Bug Fixes
- Simplified
BubbleContentinteractive selectors to&:is(button,a)to match variant hover rules and reduce class noise without changing behavior.
- Simplified