Skip to content

Ati/cl 270 add email- number - price components to gooey (#45)#46

Merged
ati7697 merged 1 commit into
mainfrom
ati/cl-270-add-email-number-price-components-to-gooey
May 21, 2026
Merged

Ati/cl 270 add email- number - price components to gooey (#45)#46
ati7697 merged 1 commit into
mainfrom
ati/cl-270-add-email-number-price-components-to-gooey

Conversation

@ati7697
Copy link
Copy Markdown
Contributor

@ati7697 ati7697 commented May 21, 2026

This pull request adds three new form components—Email, Number, and Price—to the codebase, along with their documentation pages, navigation entries, and Cypress tests. These components are now available for use, are documented in the app, and are included in the navigation and routing system.

New Components and Features:

  • Added Email component:

    • Implements an email input with sensible defaults and v-model support (src/components/email/Email.vue, src/components/email/index.ts, src/components/email/email.spec.ts)
    • Exported and registered in the main index and router files (src/index.ts, app/pages/index.ts, app/router/index.ts, app/router/navigation.ts)
    • Added documentation page (app/pages/components/Email.vue)
  • Added Number component:

    • Implements a numeric input with integer mode, min/max/step, and v-model support (src/components/number/Number.vue, src/components/number/index.ts, src/components/number/number.spec.ts)
    • Exported and registered in the main index and router files (src/index.ts, app/pages/index.ts, app/router/index.ts, app/router/navigation.ts)
    • Added documentation page (app/pages/components/Number.vue)
  • Added Price component:

    • Implements a currency-aware numeric input with formatting, v-model in dollars, and currency/locale options (src/components/price/Price.vue, src/components/price/index.ts, src/components/price/price.spec.ts)
    • Exported and registered in the main index and router files (src/index.ts, app/pages/index.ts, app/router/index.ts, app/router/navigation.ts)
    • Added documentation page (app/pages/components/Price.vue)

Documentation and Navigation:

  • Added new documentation pages for Email, Number, and Price components, including usage examples and code snippets (app/pages/components/Email.vue, app/pages/components/Number.vue, app/pages/components/Price.vue)

  • Updated navigation and router configuration to include the new components, making them accessible via the app UI (app/router/navigation.ts, app/router/index.ts)
    Testing:

  • Added Cypress tests for all three new components to verify rendering, v-model updates, and special behaviors (e.g., integer rounding, currency formatting) (src/components/email/email.spec.ts, src/components/number/number.spec.ts, src/components/price/price.spec.ts)

These changes significantly improve the form input capabilities of the app with modern, well-documented, and tested components.

* Add Email, Text, Number, Price components

Adds semantic form-input wrappers to bridge the gap with @codinglabsau/ui
so LP form-builder schemas can port across cleanly. Price's v-model is a
number in dollars (Intl-formatted display) — consumers never convert to
cents. Description/error display is left to existing Field primitives.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Remove Text component

Drops Text from src/components, library exports, and demo app.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* build

* Fix Number/Price specs targeting the input directly

cy.type() auto-walks into the inner input but leaves the subject on
the wrapper div, so the chained cy.blur() fails — "can only be called
on the focused element". Target [data-cy] input so type/blur/val all
run against the focused input.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Fix Number integer-mode test assertion

Integer mode strips the decimal separator on input rather than
rounding on blur, so typing "7.5" produces 75, not 8. Assert that
the displayed value is a whole number — the observable contract
of integer mode.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ati7697 ati7697 merged commit ae94575 into main May 21, 2026
4 checks passed
@ati7697 ati7697 deleted the ati/cl-270-add-email-number-price-components-to-gooey branch May 21, 2026 06:22
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