Skip to content

fix(tabs): stop baking trigger id/value; delegate highlight to root listener - #42

Open
elviskahoro wants to merge 2 commits into
LineIndent:mainfrom
elviskahoro:upstream-pr/tabs-stop-stacked
Open

elviskahoro wants to merge 2 commits into
LineIndent:mainfrom
elviskahoro:upstream-pr/tabs-stop-stacked

Conversation

@elviskahoro

Copy link
Copy Markdown

Summary

TabsTrigger.create baked a UUID id and the trigger value into per-trigger call_script JS, which breaks under rx.foreach. Highlighting is now handled by one delegated click listener plus a mount pass, reading data-value from the DOM. User on_click/on_mount handlers are preserved, and the nested-tabs scope guard from #30 is kept.

Stacked on #30: this branch includes #30's commit, so the diff here shows both until #30 merges. Review the last commit only.

Testing

New tests/test_tabs.py cases cover no baked id/JS, the delegated handler, handler preservation and nested scoping; the full suite passes (346). Docs regenerated.

🤖 Generated with Claude Code

elviskahoro and others added 2 commits October 24, 2026 13:06
…istener

Triggers no longer generate a build-time id or interpolate the value into
per-trigger JS (broken under rx.foreach). tabs.root attaches one delegated
click listener that reads data-value from the DOM. Adds regression tests and
regenerated docs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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