Commit Graph

4 Commits

Author SHA1 Message Date
kolaente f06e272225 test(frontend): add test for @keyup.enter forwarding in FormField
Verify that @keyup.enter modifier is properly forwarded to the inner
input element and only triggers for Enter key, not other keys.
2026-01-10 21:59:06 +01:00
kolaente 483ddc728d test(frontend): verify FormField generates unique IDs across instances
Mount multiple FormField components within the same Vue app to properly
test that useId() generates unique IDs for each instance. This validates
that labels correctly link to their respective inputs.
2026-01-10 21:59:06 +01:00
kolaente 8f0c7d504b test(frontend): add regression test for FormField $attrs event forwarding
Verify that FormField forwards $attrs event listeners (onKeyup, onFocusout)
to its inner input element. This ensures migrated templates using
@keyup.enter and @focusout continue to work correctly.
2026-01-10 21:59:06 +01:00
kolaente eb1f852927 feat(frontend): add FormField component for form field abstraction
Introduces a reusable FormField component that abstracts Bulma's
field/control/input pattern into a single component. This provides
a consistent API for form fields and prepares the codebase for
future CSS framework migrations.

Features:
- v-model binding for form values
- label prop with automatic for attribute linking
- error prop for validation messages
- Default slot for custom inputs (selects, editors)
- addon slot for button addons
- Attribute passthrough via v-bind="$attrs"
- Exposed value getter for browser autofill workarounds

Includes 14 unit tests covering all functionality.
2026-01-10 21:59:06 +01:00