Skip to content

feat(authoring): allow list_item_multi_column on repeat-bound elements#142

Open
ty13r wants to merge 1 commit into
mainfrom
claude/list-widgets-allow-list-item-multi-column
Open

feat(authoring): allow list_item_multi_column on repeat-bound elements#142
ty13r wants to merge 1 commit into
mainfrom
claude/list-widgets-allow-list-item-multi-column

Conversation

@ty13r
Copy link
Copy Markdown
Member

@ty13r ty13r commented May 20, 2026

Summary

One-line widening: add list_item_multi_column to the @list_widgets MapSet in AshUI.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:

  1. Use a custom:* prefix on the type and add a RepeatRowFlattening clause that rewrites the node type to "list_item_multi_column" before render, OR
  2. Drop the ui_bindings :list block (which then trips Info.destination_list_binding? at runtime)

Neither is ideal. The renderer has full list_item_multi_column coverage in LiveUIAdapter.generate_heex/2; the validator just rejects the same type declaration that the renderer is ready to handle.

ariston-ui downstream cleanup once this lands

lib/ariston_ui_web/iur/repeat_row_flattening.ex has 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 as type "list_item_multi_column" directly. Documented in ariston-ui docs/operator-v2-phase-2-deferred-findings.md (substrate items section, item #2).

Test plan

  • mix format --check-formatted passes
  • mix compile --warnings-as-errors passes
  • mix 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 failures

Tier 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

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>
@ty13r
Copy link
Copy Markdown
Member Author

ty13r commented May 20, 2026

Cross-linking the three operator_v2 substrate-gap items (per project-ariston Update 8):

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