feat(authoring): allow list_item_multi_column on repeat-bound elements#142
Open
ty13r wants to merge 1 commit into
Open
feat(authoring): allow list_item_multi_column on repeat-bound elements#142ty13r wants to merge 1 commit into
ty13r wants to merge 1 commit into
Conversation
Adds `list_item_multi_column` to the `@list_widgets` MapSet in `AshUI.Resources.Validations.Authoring`. Repeat-bound Elements (those declaring `binding_type :list`) can now use this kind directly without the `custom:*` workaround. ## Context operator_v2 Phase 2 Wave B (map mode) and similar surfaces want to declare row Elements as `type "list_item_multi_column"` with a `ui_bindings :list` block. The validator currently rejects this with `ArgumentError`, forcing a `custom:map_*` indirection plus a `RepeatRowFlattening` type-rewrite-on-flatten clause that switches the kind back to `list_item_multi_column` before the canonical render. The renderer has full `list_item_multi_column` coverage; the validator allowlist was just narrower than the renderer support. This aligns the two. ## Effect on ariston-ui 3 ariston-local flatten clauses (`flatten_map_repo_row/1`, `flatten_map_activity_row/1`, `flatten_map_system_event/1`) become removable. The corresponding `custom:map_*` Elements can simplify to `type "list_item_multi_column"` once this lands. Cleanup tracked in ariston-ui `docs/operator-v2-phase-2-deferred-findings.md` under the substrate-items section. ## Test plan - [x] `mix format --check-formatted` passes - [x] `mix compile --warnings-as-errors` passes - [x] `mix test test/ash_ui/authoring test/ash_ui/phase_31_*` -> 15 tests, 0 failures Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
Cross-linking the three operator_v2 substrate-gap items (per project-ariston Update 8):
|
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
One-line widening: add
list_item_multi_columnto the@list_widgetsMapSet inAshUI.Resources.Validations.Authoring. The canonical renderer already supports this kind on repeat-bound Elements; the authoring validator just hadn't been widened to allow it.Why
Currently a repeat-bound Element that wants to render multi-column rows must either:
custom:*prefix on the type and add aRepeatRowFlatteningclause that rewrites the node type to"list_item_multi_column"before render, ORui_bindings :listblock (which then tripsInfo.destination_list_binding?at runtime)Neither is ideal. The renderer has full
list_item_multi_columncoverage inLiveUIAdapter.generate_heex/2; the validator just rejects the sametypedeclaration that the renderer is ready to handle.ariston-ui downstream cleanup once this lands
lib/ariston_ui_web/iur/repeat_row_flattening.exhas 3 flatten clauses that exist solely to bridge this gap:flatten_map_repo_row/1,flatten_map_activity_row/1,flatten_map_system_event/1. All three can be removed and the corresponding Elements declared astype "list_item_multi_column"directly. Documented in ariston-uidocs/operator-v2-phase-2-deferred-findings.md(substrate items section, item #2).Test plan
mix format --check-formattedpassesmix compile --warnings-as-errorspassesmix test test/ash_ui/authoring test/ash_ui/phase_31_canonical_conversion_test.exs test/ash_ui/phase_31_package_boundary_test.exs-> 15 tests, 0 failuresTier classification
Tier 1 mechanical fix per the substrate-gap co-maintain framing — single-line allowlist widening, no behavioral change to existing callers, no API design choice. Pinging @pcharbon70 for approval; happy to merge once blessed.
🤖 Generated with Claude Code