Skip to content

[Feature] Message component (chat message layout: avatar + bubble + header/footer) #444

Description

@djalmaaraujo

Summary

Port the shadcn Message component to RubyUI. Message is the higher-level chat layout that wraps Bubble (see the Bubble component) inside an avatar + content + header/footer row. Built on top of the Bubble branch to reuse components.

Reference:

Parts

  • MessageGroup — stacks messages
  • Message — row container, align: start|end (flips with avatar via flex-row-reverse)
  • MessageAvatar — wraps the existing Avatar, anchors to bottom, lifts when a footer is present
  • MessageContent — column holding bubbles; drives bubble alignment via group-data-[align=end]/message
  • MessageHeader / MessageFooter — muted meta lines (name, timestamp, "Delivered")

Reuse (no new primitives)

  • Avatar (existing) inside MessageAvatar
  • Bubble / BubbleContent / BubbleGroup / BubbleReactions (Bubble branch) inside MessageContent

Alignment of bubbles is handled by Message — no changes to Bubble needed.

Out of scope

  • Marker (the "is typing…" indicator) is a separate shadcn component; not ported here. Demo will use plain text instead.

Tasks

  • gem/lib/ruby_ui/message/* (6 parts) + translate cn-message-* to Tailwind v4
  • gem/test/ruby_ui/message_test.rb
  • gem/lib/generators/ruby_ui/dependencies.ymlmessage depends on Avatar, Bubble
  • Docs view + route + controller + menu + site_files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions