Repository navigation
feat: member injection covers the ChipSet shapes - #134
Merged
Merged
Conversation
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.
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.
Closes #129 — the last mechanical audit item.
Pattern 6 (class membership) only matched literal member values, bare
@fieldlists, and string-literal class branches — so lavash's own ChipSet hand-wrote its directive. Now also matched:value in (@selected || [])do: @active_class): the directive becomes an interpolated expression attr resolved at render timemember-valueattr is injected and the element must carryphx-value-val(the per-row value the JS already reads inside:forloops) — otherwise no injection at allChipSet's manual
data-lavash-memberis 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