Skip to content

Accordion preview broken on rubyui.com/docs/accordion #489

Description

@djalmaaraujo

Bug

The Accordion live preview on https://www.rubyui.com/docs/accordion is broken: clicking a trigger does nothing — the content never reveals and the chevron icon never rotates.

Root cause

The ruby_ui gem's accordion Stimulus controller was fixed in 0897b2a ("[Bug Fix] Accordion: hide closed content properly instead of zero height", #168/#433) to toggle the hidden attribute alongside the height animation. The docs/ app keeps its own copy of Stimulus controllers (docs/app/javascript/controllers/ruby_ui/accordion_controller.js), and that copy was never updated after the gem fix — it's still on the pre-#168 version, which always leaves hidden set on the content element regardless of the height animation, so the panel never becomes visible.

The gem component itself (gem/lib/ruby_ui/accordion/accordion_controller.js) is correct and not affected.

Steps to reproduce

  1. Visit https://www.rubyui.com/docs/accordion
  2. Click "What is RubyUI?" in the Preview example
  3. Nothing happens — expected the panel to expand and the chevron to rotate

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