:top_strip — add event-wiring attrs (theme_event, palette_event, pane_event)
Canonical-grep proof
$ git grep -n "kind: :top_strip" packages/live_ui/lib/live_ui/renderer.ex
packages/live_ui/lib/live_ui/renderer.ex:<line>: def render(%{element: %Element{kind: :top_strip}} = ...)
Renderer clause exists (added in PR #179 commit 2d7c2c76 + fix-up 65a08442); the constructor at packages/unified_iur/lib/unified_iur/widgets/components.ex for :top_strip accepts brand, context, theme, pane_open? opts + a children list — but does NOT accept event-wiring attrs for the theme button cluster, palette button, or pane toggle button.
Divergence (ariston consumer vs canonical)
Ariston's operator-surface top strip (ariston-ui/lib/ariston_ui_web/live/operator_surface_live.ex:812-829) passes 3 event-name attrs that canonical doesn't model:
| Aspect |
Ariston-side |
Canonical |
Impact |
| Theme button click |
"theme_event" => "set_theme" (phx event name) + "current_theme" for state |
theme attr (token only); no event hook |
Theme toggle click has no canonical wiring |
| Palette button click |
"palette_event" => "open_palette" (phx event name) |
no palette_event attr |
Palette button click has no canonical wiring |
| Pane toggle click |
"pane_event" => "toggle_pane" (phx event name) + pane_open? for state |
pane_open? attr (state only); no event hook |
Pane toggle click has no canonical wiring |
The state attrs (theme, pane_open?) are passed and consumed correctly. Only the EVENT names for the 3 control buttons have no canonical path.
Proposed extension
Add 3 optional event-name attrs to :top_strip:
@spec top_strip([child], opts) :: Element.t()
def top_strip(children \\ [], opts \\ [])
# Existing opts: brand, context, theme, pane_open?, id
# NEW opts: theme_event, palette_event, pane_event (each: optional event-name string)
In the renderer clause: pass each event-name through to the corresponding button's phx-click attribute (or pass them all via a controls_attrs adapter map if you prefer the adapter pattern used by :chat_composer's input_attrs/send_attrs).
Status
Ariston PR #351 (Wave AshUI-3.3 step 4 canonical migration) currently DROPS these 3 event attrs because they have no canonical path. The 3 control buttons in ariston's operator-surface lose their click wiring on the canonical render path. Filing this extension unblocks restoring those events.
ash_ui PR #108 (merged at a32fb5519fb9) added per-kind render clauses for the 7 shell primitives. Once :top_strip accepts these attrs, the render clauses in BOTH unified_ui and ash_ui need to pass them through to the rendered button elements.
Cross-references
Sibling issues this batch:
:sidebar_item visual+state primitives
:unread_badge a11y label
:top_strip— add event-wiring attrs (theme_event, palette_event, pane_event)Canonical-grep proof
Renderer clause exists (added in PR #179 commit
2d7c2c76+ fix-up65a08442); the constructor atpackages/unified_iur/lib/unified_iur/widgets/components.exfor:top_stripacceptsbrand,context,theme,pane_open?opts + a children list — but does NOT accept event-wiring attrs for the theme button cluster, palette button, or pane toggle button.Divergence (ariston consumer vs canonical)
Ariston's operator-surface top strip (
ariston-ui/lib/ariston_ui_web/live/operator_surface_live.ex:812-829) passes 3 event-name attrs that canonical doesn't model:"theme_event" => "set_theme"(phx event name) +"current_theme"for statethemeattr (token only); no event hook"palette_event" => "open_palette"(phx event name)palette_eventattr"pane_event" => "toggle_pane"(phx event name) +pane_open?for statepane_open?attr (state only); no event hookThe state attrs (
theme,pane_open?) are passed and consumed correctly. Only the EVENT names for the 3 control buttons have no canonical path.Proposed extension
Add 3 optional event-name attrs to
:top_strip:In the renderer clause: pass each event-name through to the corresponding button's
phx-clickattribute (or pass them all via acontrols_attrsadapter map if you prefer the adapter pattern used by:chat_composer'sinput_attrs/send_attrs).Status
Ariston PR #351 (Wave AshUI-3.3 step 4 canonical migration) currently DROPS these 3 event attrs because they have no canonical path. The 3 control buttons in ariston's operator-surface lose their click wiring on the canonical render path. Filing this extension unblocks restoring those events.
ash_ui PR #108 (merged at
a32fb5519fb9) added per-kind render clauses for the 7 shell primitives. Once:top_stripaccepts these attrs, the render clauses in BOTH unified_ui and ash_ui need to pass them through to the rendered button elements.Cross-references
101bae98)4bd82b8a)a32fb5519fb9)lib/ariston_ui_web/live/operator_surface_live.ex:812-829Sibling issues this batch:
:sidebar_itemvisual+state primitives:unread_badgea11y label