Skip to content

[Feature] Add Empty component#448

Merged
cirdes merged 1 commit into
mainfrom
feat/empty-component
Jun 30, 2026
Merged

[Feature] Add Empty component#448
cirdes merged 1 commit into
mainfrom
feat/empty-component

Conversation

@djalmaaraujo

@djalmaaraujo djalmaaraujo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Ports the shadcn Empty component to RubyUI — a centered empty-state surface for when there is no data or content (no results, no messages, first-run states).

Reference:

Parts

  • Empty — dashed-border centered container
  • EmptyHeader — stacks media + title + description
  • EmptyMediavariant: default (bare) or icon (muted rounded media box)
  • EmptyTitle / EmptyDescription — heading + muted supporting copy
  • EmptyContent — slot for actions (buttons, inputs)

Notes

  • shadcn ships these styles as a cn-empty-* CSS layer; this port translates every rule to Tailwind v4 utilities. No custom CSS, no JS.
  • No dependencies.yml entry (Empty has no required component/gem/JS deps).
  • Motivation: the Message Scroller chat-window demo (stacked PR) uses Empty for its no-messages state — this lands it as a first-class component.

Testing

  • cd gem && bundle exec rake → tests + StandardRB green.
  • Rendered at /docs/empty: default icon state, with-action state, and default (avatar) media verified.

Screenshots

Add /docs/empty screenshot.


Summary by cubic

Adds the Empty component suite for empty states in RubyUI. Ported from shadcn and built with Tailwind v4 utilities—no JS and no new dependencies.

  • New Features
    • Components: Empty, EmptyHeader, EmptyMedia (variants: default, icon), EmptyTitle, EmptyDescription, EmptyContent with data-slot attributes.
    • Docs: new /docs/empty page, route/controller, and menu entry with examples (default, with action, default media).
    • Registry/SEO: updated MCP registry, sitemap, and LLM docs.
    • Tests: verify structure and EmptyMedia variants.

Written for commit 66b0f37. Summary will update on new commits.

Review in cubic

Port the shadcn Empty component: a centered empty-state surface for when
there is no data or content. Parts: Empty, EmptyHeader, EmptyMedia
(default/icon variants), EmptyTitle, EmptyDescription, EmptyContent.

Translates shadcn's cn-empty-* CSS layer to Tailwind v4 utilities. No JS.

Docs page, route, controller, menu, site_files and MCP registry updated.
@djalmaaraujo djalmaaraujo requested a review from cirdes as a code owner June 30, 2026 20:41

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 17 files

Re-trigger cubic

@cirdes cirdes merged commit 1ca080d into main Jun 30, 2026
8 checks passed
@cirdes cirdes deleted the feat/empty-component branch June 30, 2026 20:58
@djalmaaraujo djalmaaraujo mentioned this pull request Jul 1, 2026
3 tasks
djalmaaraujo added a commit that referenced this pull request Jul 1, 2026
Bump RubyUI to 1.5.0 (minor: new components since v1.4.0).

- gem/lib/ruby_ui.rb → 1.5.0; regenerate gem/ and docs/ Gemfile.lock
- docs home hero badge → headline features (Bubble, Message, Empty)
- rebuild mcp/data/registry.json

Highlights since v1.4.0:
- New components: Bubble (#445), Message (#446), Message Scroller (#447), Empty (#448)
- Port hover_card & context_menu to Floating UI, drop Popper.js (#438)
- Bug fixes: Dialog closed-state + docs controller (#458), DropdownMenu z-index (#440)
djalmaaraujo added a commit that referenced this pull request Jul 1, 2026
Bump RubyUI to 1.5.0 (minor: new components since v1.4.0).

- gem/lib/ruby_ui.rb → 1.5.0; regenerate gem/ and docs/ Gemfile.lock
- docs home hero badge → headline features (Bubble, Message, Empty)
- rebuild mcp/data/registry.json

Highlights since v1.4.0:
- New components: Bubble (#445), Message (#446), Message Scroller (#447), Empty (#448)
- Port hover_card & context_menu to Floating UI, drop Popper.js (#438)
- Bug fixes: Dialog closed-state + docs controller (#458), DropdownMenu z-index (#440)
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