Add support for [x-sort:handle] attributes defined in template tags#4483
Add support for [x-sort:handle] attributes defined in template tags#4483
Conversation
|
Would really be happy to see this get merged |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract repeated handle selector string to variable - Mark new x-for handle test as test.skip to match all other sort tests (CI flakiness) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR Review: #4483 — Add support for [x-sort:handle] attributes defined in template tagsType: Bug fix What's happening (plain English)
The fix checks Other approaches considered
The PR's approach (check template content at init) is the laziest correct solution. Changes Made
Test Results
Code Review
SecurityNo security concerns identified. This change only affects DOM selector queries at initialization time. VerdictClean, minimal bug fix for a real issue. The root cause is verified, the fix is the simplest correct approach, and the test properly isolates the bug. Community engagement is light (1 supportive comment) but the fix is straightforward enough that it doesn't need extensive discussion. One note: this PR has been open since Dec 2024 with no maintainer feedback. The contributor's approach was correct from the start — it just needed the merge conflict resolved and minor cleanup. Recommend merge. Reviewed by Claude |
Closes #4482
Many developer uses x-sort with x-for. In this cases, when x-sort gets processed there's technically no
[x-sort:handle]in any of the children even when the x-for template would create element with said attribute.The MR adds some additional logic (in the real word there will probably just be 1 single tag as a direct children but it takes a more generic approach) to support [x-sort:handle] defined in template tags (likely x-for).