feat(:top_strip): add search_event + settings_event + user_avatar_url attrs (Wave 3.7 Class C extension, DRAFT, Pascal-review REQUIRED)#136
Draft
ty13r wants to merge 1 commit into
Conversation
… trailing-region attrs (Wave 3.7 Class C extension) Extends the canonical :top_strip widget with three shell-affordance attrs identified in the Wave AshUI-3.7 comp-fidelity audit (findings TS-1, TS-2, TS-3). DRAFT pending Pascal design-call on trailing-region shape and ARIA label strategy (unified_ui #183). Stage 1 (IUR constructor): top_strip/2 accepts search_event, settings_event, user_avatar_url via maybe_put -- all optional, absent when nil. Stage 2 (catalog): widget_components.ex summary updated. Stage 4 (renderer): top_strip clause renders a live-ui-top-strip-trailing div with conditional search button (phx-click + aria-label="Open search"), settings button (phx-click + aria-label="Open settings"), and avatar img when attrs are present. Tests added: - unified_iur components_test: 1 new test (6 total) covering all attr combinations - live_ui renderer_test: 5 new tests (10 total) covering HTML output per combination Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the canonical
:top_stripwidget with three trailing-region shell-affordance attrs identified in the Wave AshUI-3.7 comp-fidelity audit (findings TS-1, TS-2, TS-3). Refs unified_ui #183.This is a DRAFT pending Pascal's design-call on open questions below. Do NOT merge without Pascal review.
The 3 attrs
search_eventatom or String.t or nilphx-click={search_event}andaria-label="Open search"settings_eventatom or String.t or nilphx-click={settings_event}andaria-label="Open settings"user_avatar_urlString.t or nil<img>in the trailing region witharia-label="User profile"Stage 1-4 files modified
packages/unified_iur/lib/unified_iur/widgets/components.ex—top_strip/2extended withmaybe_putfor 3 new attrspackages/unified_ui/lib/unified_ui/widget_components.ex— summary updatedpackages/live_ui/lib/live_ui/renderer.ex— top_strip render clause renders.live-ui-top-strip-trailingdiv with conditional search/settings buttons and avatar imgTest counts added
packages/unified_iur/test/unified_iur/widgets/components_test.exs: +1 test ("top_strip stores trailing-region affordance attrs in shell map") — covers no-trailing, search-only, settings-only, avatar-only, all-three combinations. Suite: 6 tests, 0 failures.packages/live_ui/test/live_ui/renderer_test.exs: +5 tests indescribe "top_strip trailing-region affordances"block — covers HTML output for each attr combination, nil-guard (no spurious elements when unset), all-three together. Suite: 10 tests, 0 failures.Open questions for Pascal (from unified_ui #183, verbatim)
trailingslot is more composable. Both have precedent (:command_palettehas slots;:buttonhas direct attrs). Your call.:top_stripreference an:avatarwidget composition (cleanest separation), or accept rawuser_avatar_url+me_actor_idand render an inline avatar (simplest consumer)?nil= "don't render the affordance" is the cleanest convention; we want to confirm that matches Pascal's preference for optional event attrs across other widgets.aria_labelattr, or should the widget hardcode "Search", "Settings", "User profile"? Consumers may want i18n.:top_stripstay in:layer_shell_and_calloutfamily, or should the trailing-region attrs need a richer family (e.g., new:shell_with_affordancesor similar)?Closest existing extension pattern
:sidebar_section(action_intent-> conditional button with{@interaction_attrs}) is the closest single-intent precedent. This PR extends the same conditional-render pattern to three distinct trailing affordances.For multi-event widget precedent with intent-atom attrs, see
:mode_navand:chat_composer.Audit cross-references:
Generated with Claude Code