Skip to content

fix(row): associate dropdown options with select inside implicit row items#29

Merged
teezeit merged 2 commits into
mainfrom
fix/dropdown-options-in-row
Apr 21, 2026
Merged

fix(row): associate dropdown options with select inside implicit row items#29
teezeit merged 2 commits into
mainfrom
fix/dropdown-options-in-row

Conversation

@teezeit
Copy link
Copy Markdown
Owner

@teezeit teezeit commented Apr 21, 2026

Summary

  • Dropdown selects inside ## {.row} implicit items had empty options — the option list was silently dropped and rendered as a stray bullet list instead
  • Root cause: the row parser called processNodeList([childNode], options) with a single-node slice per child, so nextNode was always undefined inside that call and the options-lookahead never fired
  • Fix: peek at the next sibling before building the grid-item; if the current node is a dropdown paragraph and the sibling is a list, group them in one processNodeList call so the existing lookahead works correctly

Test plan

  • npm test — all 597 + 4 new tests pass
  • tests/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 text
  • Visual: open examples/app-wireframes/pages/coaching.md in VS Code preview — "Select Team" dropdown in the Active sprints toolbar renders as a <select> widget

🤖 Generated with Claude Code

teezeit and others added 2 commits April 22, 2026 01:32
…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>
@teezeit teezeit merged commit 062142b into main Apr 21, 2026
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