Skip to content

feat!: redesign quaire for 1.0 - #7

Merged
devCrossNet merged 3 commits into
mainfrom
feat/v1-core
Oct 8, 2026
Merged

devCrossNet merged 3 commits into
mainfrom
feat/v1-core

Conversation

@devCrossNet

Copy link
Copy Markdown
Owner

What is accomplished by your PR?

New core for 1.0, based on the 1.0 review. The docs follow in a separate PR.

  • Path model: quaire follows the answers from the first question. Only questions on the path are validated, answers of other branches are removed.
  • New API: getState(), subscribe(), back(), canGoBack(), goTo(), goToNavigationItem(), getProgress(), isComplete(), getErrors(), reset()
  • Branching with conditions: next: [{ when: { age: { gte: 18 } }, to: 'adult' }, { to: 'minor' }]
  • Variants replace dependsOnResultProperties and the nested option format
  • Components: MULTI_SELECT and BOOLEAN built in, validation rules, custom validators, component registry instead of subclassing
  • validateDefinition() finds mistakes in the data
  • Fixes: falsy answers (false, 0), mutated result objects, isValid() in branched flows, about 1 s per answer in long flows
  • Structure: modules for conditions, components, definitions, navigation, and the Quaire facade
  • Examples: all migrated, new examples conditional-branching, validation, wizard
  • Tooling: ESLint ignores .claude/ (local plan files broke eslint .)

Is there something controversial in your PR?

Breaking changes in the data format and API (planned for 1.0). The migration table is part of the docs PR.

Checklist

  • Run unit tests to ensure all existing tests are still passing
  • Add new passing unit tests to cover the code introduced by your PR
  • Change documentation for the code introduced by your PR (separate PR)

🤖 Generated with Claude Code

devCrossNet and others added 2 commits October 8, 2026 20:32
- follow the path of the answers: only questions on the path are validated,
  answers of other branches are removed
- add back(), canGoBack(), goTo(), getProgress(), isComplete() and reset()
- add getState() and subscribe() for framework integration
- add conditions for next questions and variants for dependent properties
- add MULTI_SELECT and BOOLEAN, validation rules and custom validators
- add a component registry and validateDefinition()
- fix falsy answers, mutated result objects and slow flows
- split the code into modules
- ignore .claude in eslint

BREAKING CHANGE: new data format and API. Items are questions with type, key,
title and next, dependsOnResultProperties is replaced by variants, and the
methods are renamed. See the migration table in the readme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devCrossNet devCrossNet mentioned this pull request Oct 8, 2026
1 of 3 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devCrossNet
devCrossNet merged commit 2607d1d into main Oct 8, 2026
2 checks passed
@devCrossNet
devCrossNet deleted the feat/v1-core branch October 8, 2026 18:50
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