Skip to content

Deploy tree: bind checkbox labels to per-node input IDs#709

Open
benhegartysefe with Copilot wants to merge 3 commits into
mainfrom
copilot/ux-fix-checkbox-labels
Open

Deploy tree: bind checkbox labels to per-node input IDs#709
benhegartysefe with Copilot wants to merge 3 commits into
mainfrom
copilot/ux-fix-checkbox-labels

Conversation

Copilot AI commented May 28, 2026

Copy link
Copy Markdown
Contributor

In the Deploy components tree, checkbox labels were not associated with their corresponding inputs (label for pointed at a non-matching value), so clicking component text did not toggle selection. This updates checkbox/label wiring to use matching, node-specific IDs so label text is a valid hit target everywhere this tree node renderer is used.

  • Checkbox/label association in tree node template

    • Replaced hardcoded checkbox id/label for values with a shared computed ID per node.
    • Ensures each <label> targets its own <input> in the recursive component tree.
  • Stable per-node input ID generation

    • Added deploymentInputId on HegsTreeNode, derived from data.id with an instance fallback when needed.
    • Prevents collisions and keeps ID generation local to the component.
  • Input lookup compatibility

    • Updated internal query selector from #deployment to input[type="checkbox"] to match dynamic IDs.
  • Focused coverage for regression prevention

    • Added tests asserting:
      • input.id === label.for for rendered nodes.
      • Clicking label text toggles checkbox state.
// hegs-tree-node.template.ts
<input id="${this.deploymentInputId}" type="checkbox" ... />
<label for="${this.deploymentInputId}">${this.data?.name}</label>

Copilot AI changed the title [WIP] Fix checkbox labels to reference input ID for better usability Deploy tree: bind checkbox labels to per-node input IDs May 28, 2026
Copilot AI requested a review from benhegartysefe May 28, 2026 15:15
@benhegartysefe
benhegartysefe marked this pull request as ready for review May 28, 2026 15:27
@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown

Test Results

310 tests  ±0   310 ✅ ±0   5s ⏱️ -6s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 34eeb7f. ± Comparison against base commit f0fbf91.

♻️ This comment has been updated with latest results.

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.

UX: checkbox labels should reference input id so label text is clickable

4 participants