Skip to content

[OpenSpec] reuse-gallery-categories-and-form-library #986

Open

Description

@github-actions

⚠️ OpenSpec-managed issue — this content is automatically synced
from the openspec/ directory. Manual edits will be overwritten on next sync.

Artifacts

Specs

Tasks

  • T01: Add the template category filter, the per-category headings, the GitHub card narrowing and the ?category= query to src/views/TemplateGallery.vue (REQ-BQGL-001). Verify: vitest cases in a new tests/views/TemplateGallery.categories.spec.js, and extend tests/e2e/template-gallery.spec.ts to filter by a category. Built in TemplateGallery.vue: one NcSelect over the four ApplicationTemplate.category values, groups in the enum's order with "Other" last (seeded first inside a group), GitHub cards narrowed by their descriptor's category, ?category= read on create and written with $router.replace. Vitest tests/views/TemplateGallery.categories.spec.js (red first: lane log red-gallery-T01.log); TemplateGalleryBuiltin.spec.js now expects the grouped order. The e2e opens ?category=field-work (not run in the lane: no live stack).
  • T02: Declare formTemplate in a new fragment lib/Settings/register.d/83-form-library.json (REQ-BQGL-002). Verify: PHPUnit on the register import accepting a form template. Built: formTemplate in 83-form-library.json; tests/Unit/Settings/FormLibraryFragmentTest.php validates the subsidy record (six bound properties) against the closed fragment with Opis and refuses another kind and a form without definitions.
  • T03: Add src/services/formCapture.js reusing deNamespaceSlug and rewriteSchemaRefs, and src/dialogs/SaveFormToLibraryDialog.vue, opened from FormPageEditor.vue and RegistrationFormEditor.vue, refusing a form bound to a missing property (REQ-BQGL-002). Verify: vitest tests/services/formCapture.spec.js and a dialog spec under tests/dialogs/. Built: formCapture.js (red first), SaveFormToLibraryDialog.vue opened from FormPageEditor.vue and, through RegistrationFormList.vue, from RegistrationFormEditor.vue's new "Save to form library" button; it reads the schema from the register's schema list and names a missing property. Vitest tests/dialogs/SaveFormToLibraryDialog.spec.js.
  • T04: Add the "Forms" view to TemplateGallery.vue with search and the category filter (REQ-BQGL-003). Verify: vitest cases in tests/views/TemplateGallery.categories.spec.js. Built: a "Forms" tab in TemplateGallery.vue rendering src/components/store/FormLibraryView.vue, sharing the gallery's category filter and ?category=; search by name, description and publisher (filterLibraryForms in src/services/formLibrary.js).
  • T05: Add src/dialogs/UseLibraryFormDialog.vue with app, version, target and schema mapping, the missing property list and "Add these properties", writing only on confirm (REQ-BQGL-004). Verify: vitest tests/dialogs/UseLibraryFormDialog.spec.js. Built: UseLibraryFormDialog.vue and useLibraryForm() in src/services/formLibrary.js: the schema gains only the missing properties (PATCH of properties by numeric id), a form page is appended to the version manifest (PATCH of manifest only), a registration form is saved as a draft that the real registrationForm fragment accepts (Ajv in tests/services/formLibrary.spec.js).
  • T06: Add src/services/formExport.js following blockExport.js, with export and validated import in the "Forms" view (REQ-BQGL-005). Verify: vitest tests/services/formExport.spec.js for a round trip and a refused component-block file. Built: formExport.js (red first); Export and Import buttons in the Forms view; a component-block file is refused with "This file is not a form export." (vitest in tests/views/TemplateGallery.categories.spec.js).
  • T07: Add the buildiq-form topic search to lib/Service/GitHubCatalogService.php, a route beside shop#githubSearch in appinfo/routes.php, and install into a local library form (REQ-BQGL-005). Verify: PHPUnit cases in tests/Unit/Service/GitHubCatalogServiceTest.php for the topic query, the cache and a repository without form.json. Built: searchForms() (topic buildiq-form, cached, a repository without a valid form.json is a non-installable card) and shop#githubFormSearch at /api/shop/github/forms; "Add to my library" in the Forms view validates the card's export and creates the local library form.
  • T08: Playwright tests/e2e/form-library.spec.ts: save a registration form to the library, find it, use it in a second app, export and import it (REQ-BQGL-002 to REQ-BQGL-005). Written in tests/e2e/form-library.spec.ts (skips when form-template is not imported); NOT run: no live stack in the lane, so this stays open until a CI or live run is green.
  • T09: Strings and docs: English and Dutch for the filter, "Forms", the dialogs and the refusals (l10n/en.json, l10n/nl.json), and a page in docs/ on the form library and sharing forms with other organisations. Built: 48 English and Dutch strings, and docs/form-library.md.
  • T10: Run openspec validate reuse-gallery-categories-and-form-library --strict. Run: valid.

Design

See design.md for technical design details.


Synced from openspec/changes/reuse-gallery-categories-and-form-library by OpenSpec workflow
App: buildiq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions