Skip to content

feat(sdui): port adaptive questionnaire to Vue and Lit demos (#465)#466

Merged
roblevintennis merged 1 commit intomasterfrom
issue-465/adaptive-questionnaire-vue-lit
Mar 24, 2026
Merged

feat(sdui): port adaptive questionnaire to Vue and Lit demos (#465)#466
roblevintennis merged 1 commit intomasterfrom
issue-465/adaptive-questionnaire-vue-lit

Conversation

@roblevintennis
Copy link
Copy Markdown
Contributor

Summary

  • Port adaptive questionnaire (AdaptiveOutput) to Vue (demo-vue) and Lit (demo-lit) demos, matching the React reference implementation with multi-step navigation, skip logic, and inline validation
  • Core bug fix: ag-input shadow DOM change event was composed: false, silently stopping at the shadow root — Vue @change listeners never fired; added composed re-dispatch from host
  • Renderer keying fix: Vue h() calls and Lit render() loop were positional (no keys), causing stale DOM reuse and value bleed-over between wizard steps; fixed via key: node.id in Vue and repeat() directive in Lit (codegen updated so the fix is permanent)
  • VueInput prop forwarding fix: min, max, labelPosition were declared in props but never bound in the template, silently dropped
  • Renderer dist fix: min/max props were missing from the AgInput case in both Vue and Lit renderer codegen
  • Simplification: removed login-form workflow (redundant with contact-form); picker now has 4 distinct patterns
  • Dev experience: added DEV-WORKFLOW.md and npm run fresh scripts to all three demos

Test plan

  • React demo: all 4 workflows render and navigate correctly
  • Vue demo: all 4 workflows render; adaptive questionnaire steps/back/skip logic work; past date in "Preferred appointment date" shows validation error
  • Lit demo: same as Vue
  • Value bleed-over between wizard steps no longer occurs in Vue and Lit
  • npm run fresh in any demo rebuilds upstream deps, clears Vite cache, and starts dev server

🤖 Generated with Claude Code

Core fixes:
- ag-input: re-dispatch composed change event from host so Vue @change
  listeners receive it across the shadow root boundary
- VueInput: add missing :min, :max, :labelPosition template bindings
  (declared in props but never forwarded to ag-input)

Renderer fixes:
- codegen: add key:node.id to all Vue h() calls and use repeat() with
  node.id key in Lit render loop, preventing stale DOM reuse and value
  bleed-over between wizard steps
- codegen: add min/max props to AgInput case in both Vue and Lit renderers
- rebuild generated AgDynamicRenderer for Vue and Lit

Demo additions:
- demo-vue: add AdaptiveOutput.vue with ANSWER_CHANGE, NEXT_STEP,
  PREV_STEP, SUBMIT, RESTART actions and inline validation
- demo-lit: add AdaptiveOutput.ts (ag-adaptive-output custom element)
  with same action set
- All three demos: add min validation to buildValidationErrors so past
  dates in date fields are caught alongside existing max/future check

Demo fixes (parity with React reference):
- Vue/Lit WorkflowPicker: fix payload destructuring ({ id, value }
  not a raw string)
- Vue/Lit: max-width 800px -> 900px to match React
- Vue/Lit: add missing ag-selection-button-group spacing CSS
- adaptive-questionnaire fixture: add min:today to aq-preferred-date
  and max:today to aq-last-visit nodes

Simplification:
- Remove login-form workflow (redundant with contact-form); picker now
  shows 4 distinct patterns: contact form, account setup wizard,
  pricing card, adaptive questionnaire

Dev experience:
- Add DEV-WORKFLOW.md explaining the local dependency chain, rebuild
  order, and Vite cache behaviour
- Add rebuild:lib, rebuild:renderer, rebuild:all, fresh scripts to all
  three demo package.json files (fresh also nukes .vite cache)
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

Deploy Preview for agnosticui-demo-vue ready!

Name Link
🔨 Latest commit c500406
🔍 Latest deploy log https://app.netlify.com/projects/agnosticui-demo-vue/deploys/69c30179368e650008eeaf26
😎 Deploy Preview https://deploy-preview-466--agnosticui-demo-vue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@roblevintennis roblevintennis merged commit 7e16630 into master Mar 24, 2026
10 of 11 checks passed
@roblevintennis roblevintennis deleted the issue-465/adaptive-questionnaire-vue-lit branch March 24, 2026 21:26
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

Deploy Preview for agnosticui-demo-lit ready!

Name Link
🔨 Latest commit c500406
🔍 Latest deploy log https://app.netlify.com/projects/agnosticui-demo-lit/deploys/69c30179fe51e40008603729
😎 Deploy Preview https://deploy-preview-466--agnosticui-demo-lit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

Deploy Preview for agnosticui-demo-react ready!

Name Link
🔨 Latest commit c500406
🔍 Latest deploy log https://app.netlify.com/projects/agnosticui-demo-react/deploys/69c30179d000b40008bdf578
😎 Deploy Preview https://deploy-preview-466--agnosticui-demo-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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