fix(row): associate dropdown options with select inside implicit row items#29
Merged
Conversation
…t row Covers two bugs (both now fixed): - dropdown options empty when select is a direct row child - option list leaking as a stray grid-item sibling Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…row items When the row parser looped over direct children it called processNodeList with a single-element slice, so nextNode was always undefined inside the call. Dropdown selects therefore got no options; the list then appeared as a stray grid-item bullet list. Fix: before pushing the grid-item, peek at the next sibling; if the current node is a dropdown paragraph (ends with `v]`) and the sibling is a list, include both in the same processNodeList call so the existing lookahead logic can associate options with the select. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
## {.row}implicit items had empty options — the option list was silently dropped and rendered as a stray bullet list insteadprocessNodeList([childNode], options)with a single-node slice per child, sonextNodewas alwaysundefinedinside that call and the options-lookahead never firedprocessNodeListcall so the existing lookahead works correctlyTest plan
npm test— all 597 + 4 new tests passtests/parser.test.ts— dropdown in implicit row has 3 options; search + dropdown produces 2 grid-items (not 3)tests/renderer.test.ts—<select>+<option>present in output; no stray<ul>containing option textexamples/app-wireframes/pages/coaching.mdin VS Code preview — "Select Team" dropdown in the Active sprints toolbar renders as a<select>widget🤖 Generated with Claude Code