Skip to content

bug: CEM reports hx-carousel event as hx-slide-change but actual component fires hx-slide#79

Merged
himerus merged 3 commits intodevfrom
feature/bug-cem-reports-hx-carousel-event-as-hx
Mar 18, 2026
Merged

bug: CEM reports hx-carousel event as hx-slide-change but actual component fires hx-slide#79
himerus merged 3 commits intodevfrom
feature/bug-cem-reports-hx-carousel-event-as-hx

Conversation

@himerus
Copy link
Copy Markdown
Contributor

@himerus himerus commented Mar 18, 2026

Summary

Problem

The Custom Elements Manifest (CEM) for hx-carousel documents the slide change event as hx-slide-change with detail type CustomEvent<{index: number, slide: HelixCarouselItem}>.

However, when consumed in trip-planner, we need to use onhx-slide (suggesting the actual event name is hx-slide). This discrepancy between the CEM and the actual runtime behavior causes confusion for consumers.

Expected

The CEM event name should match the actual event dispatched by the component.

#...


Recovered automatically by Automaker post-agent hook

Summary by CodeRabbit

  • Bug Fixes
    • Carousel event name corrected to "hx-slide".
  • New
    • Carousel component metadata added (fields, slot, event, styling hooks) so tooling and docs reflect carousel capabilities.
  • Tests
    • Added regression tests to verify carousel event naming and component metadata.
  • Chores
    • Added a changelog entry marking the event-name fix.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4127eb4c-8dcf-4c47-8f76-63671e589f8f

📥 Commits

Reviewing files that changed from the base of the PR and between 2d91a75 and 21a5835.

📒 Files selected for processing (1)
  • .changeset/carousel-event-fix.md

Walkthrough

Adds a JSON test fixture describing the HxCarousel custom element (attributes, events, slots, CSS parts/properties) and regression tests that validate the carousel's metadata and event naming (ensuring hx-slide is emitted). Also adds a changeset documenting the event-name fix.

Changes

Cohort / File(s) Summary
Test Fixture
tests/__fixtures__/helixui-custom-elements.json
New fixture adding HxCarousel custom-element metadata: class/module mapping, fields (currentIndex, autoplay, loop), hx-slide event, default slot, CSS parts (base, slides, navigation), and CSS property --hx-carousel-slide-gap.
Tests
tests/handlers/helixui.test.ts
New regression tests verifying hx-carousel presence, event-name correctness (hx-slide present, hx-slide-change absent), event type/description, listAllEvents filtering, and component field metadata.
Changelog
.changeset/carousel-event-fix.md
New changeset noting a patch release entry: rename carousel CEM event from hx-slide-change to hx-slide.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. It clearly identifies the problem and expected outcome but lacks structured sections: no type of change selection, missing related issue reference, incomplete problem/expected section, no tests added confirmation, and missing checklist items. Complete the PR description by filling all template sections: select bug fix type, add issue reference, complete summary, confirm tests added, and verify all checklist items are completed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the bug being fixed: a discrepancy between the CEM documentation (hx-slide-change) and the actual component behavior (hx-slide).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/bug-cem-reports-hx-carousel-event-as-hx
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant