Skip to content

feat: member injection covers the ChipSet shapes - #134

Merged
pinetops merged 1 commit into
mainfrom
fix/member-prop-refs
Aug 22, 2026
Merged

pinetops merged 1 commit into
mainfrom
fix/member-prop-refs

Conversation

@pinetops

Copy link
Copy Markdown
Member

Closes #129 — the last mechanical audit item.

Pattern 6 (class membership) only matched literal member values, bare @field lists, and string-literal class branches — so lavash's own ChipSet hand-wrote its directive. Now also matched:

  • nil-safe list: value in (@selected || [])
  • prop-ref class branches (do: @active_class): the directive becomes an interpolated expression attr resolved at render time
  • loop-variable member value: no member-value attr is injected and the element must carry phx-value-val (the per-row value the JS already reads inside :for loops) — otherwise no injection at all

ChipSet's manual data-lavash-member is deleted — the last hand-written directive inside lavash's own components. 3 new unit tests; 927 root (incl. e2e through the bindings/chips demos) + 83 demo green; hook chain passed.

🤖 Generated with Claude Code

The class-membership injector only matched literal member values,
bare @field lists, and string-literal class branches — so lavash's
own ChipSet hand-wrote its directive. Pattern 6 now also matches:

- the nil-safe list: value in (@selected || [])
- prop-ref class branches (do: @active_class): the directive becomes
  an interpolated expression attr resolved at render time
- a loop-variable member value: no member-value attr is injected and
  the element must carry phx-value-val (the per-row value the JS
  already reads inside :for loops) — otherwise no injection

ChipSet's manual data-lavash-member is deleted; the last
hand-written directive inside lavash's own components is gone.
@pinetops
pinetops merged commit 767cb25 into main Aug 22, 2026
4 checks passed
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.

chip_set hand-writes data-lavash-member because the injector rejects prop refs

1 participant