getodk / getodk/web-forms

[EPIC] Define API for embedding in host application

Open
#20 9 comments 0 reactions 0 assignees View on GitHub
epic front-end
Dominant language
TypeScript
Stars
38
Forks
22
PR merge metrics
No merged PRs in 30d

Description

## User story
As the developer of an application
I want to embed one or more ODK Web Forms
so that users of my application can use a rendered form from a form definition and other settings

## Requirements

### Must
- [x] #23
- [x] #30
- [x] #31
- [x] #36

### Additional
- [ ] #76
- [ ] https://github.com/getodk/web-forms/issues/43
- [ ] https://github.com/getodk/web-forms/issues/44

Early brainstorming

## Possible options
- Javascript function (similar to [Enketo Core](https://github.com/enketo/enketo/tree/main/packages/enketo-core#usage-as-a-library))
- Vue component (similar to [JSONForms Vue binding](https://github.com/eclipsesource/jsonforms-vuetify-renderers/tree/main/vue2-vuetify))
- Web Component (similar-ish to [Fore](https://github.com/Jinntec/Fore?tab=readme-ov-file#an-xformish-framework-in-web-components) but we'd expose a single component representing an entire form; possibly related to [entire Fore form as Web Component](https://jinntec.github.io/Fore/demo/lab/fore-component.html))

@sadiqkhoja points out [here](https://github.com/getodk/web-forms/issues/20#issuecomment-1954473659) that Vue recommends [exporting Vue components](https://vuejs.org/guide/extras/web-components.html#web-components-vs-vue-components)

## Questions
- How important is it that it's framework-agnostic? If the initial reaction of possible adopters is that it's very Vue-focused, it could limit its reach (but maybe that's ok or even good)
- Does the host application need to know anything about errors or is that a responsibility of Web Forms?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the completed requirements (#23, #30, #31, and #36) and the additional issues #76, #43, and #44. Compare the JavaScript function, Vue component, and Web Component options, then resolve the framework-agnostic and error-handling questions. Done means a decided, documented embedding API with its host-application responsibilities clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.