Skip to content

Commit

Permalink
Rename ui-vue package to web-forms
Browse files Browse the repository at this point in the history
As decided in this week’s team meetings:

- We expect this to be our canonical (first-party) client for filling forms.
- It will also be the source package for a custom element wrapper (which will also be built with the underlying Vue UI implementation, but won’t require Vue in host applications).
- While we may continue to maintain `ui-solid`, that primarily serves internal purposes for now. We don’t **currently** anticipate providing multiple framework-specific UIs in tandem.
  • Loading branch information
eyelidlessness committed May 22, 2024
1 parent 6a5cdac commit 4fbe91c
Show file tree
Hide file tree
Showing 56 changed files with 30 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
Thank you for taking the time to report an ODK Web Forms issue!
Expand All @@ -10,7 +10,7 @@ Feature suggestions should be described [in the forum Features category](https:/
-->

#### Web Forms version and package (e.g. are you using `ui-vue` or only the engine?)
#### Web Forms version and package (e.g. are you using `web-forms` or only the engine?)

#### Browser and version

Expand All @@ -22,6 +22,6 @@ Feature suggestions should be described [in the forum Features category](https:/

#### Expected behavior

#### Other information
#### Other information

Things you tried, stack traces, related issues, suggestions on how to fix it...
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ jobs:
- if: ${{ matrix.target == 'Web' }}
run: 'yarn workspace @getodk/ui-solid test-browser:${{ matrix.browser }}'

ui-vue:
name: '@getodk/ui-vue'
web-forms:
name: '@getodk/web-forms'
needs: ['install-and-build']
runs-on: 'ubuntu-latest'

Expand Down Expand Up @@ -540,13 +540,13 @@ jobs:
fail-on-cache-miss: true

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @getodk/ui-vue test:types'
run: 'yarn workspace @getodk/web-forms test:types'

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @getodk/ui-vue test-node:jsdom'
run: 'yarn workspace @getodk/web-forms test-node:jsdom'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn playwright install ${{ matrix.browser }} --with-deps'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn workspace @getodk/ui-vue test-browser:${{ matrix.browser }}'
run: 'yarn workspace @getodk/web-forms test-browser:${{ matrix.browser }}'
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
# ODK Web Forms

With ODK Web Forms, you can define forms with powerful logic using the spreadsheet-based [XLSForm standard](https://docs.getodk.org/xlsform/). Use [our Vue-based frontend](/packages/ui-vue/) or build your own user experience around [the engine](/packages/xforms-engine/)!
With ODK Web Forms, you can define forms with powerful logic using the spreadsheet-based [XLSForm standard](https://docs.getodk.org/xlsform/). Use [our Vue-based frontend](/packages/web-forms/) or build your own user experience around [the engine](/packages/xforms-engine/)!

> [!IMPORTANT]
> ODK Web Forms is currently pre-release. We don't yet guarantee that its interfaces are stable and it is missing many features that are available in XLSForm form definitions.



https://github.com/getodk/web-forms/assets/447837/9b25e1bc-d209-462c-8e9e-3259bd8c5aa6



## Packages

> [!NOTE]
> Comprehensive usage and development instructions are coming soon! For now, you can see each package's README. Please be sure to run `yarn` commands from the project root.
- [ui-vue](/packages/ui-vue): form-filling frontend built with Vue
- [web-forms](/packages/web-forms): form-filling frontend built with Vue
- [xforms-engine](/packages/xforms-engine): implementation of the [ODK XForms specification](https://getodk.github.io/xforms-spec/)
- [xpath](/packages/xpath): XPath evaluator with ODK XForms extensions
- [scenario](/packages/scenario): engine client used to express tests on forms
Expand Down
12 changes: 6 additions & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const vueGlob = (pathSansExtensions) => {
return extensionsGlob(pathSansExtensions, vueFileExtensions);
};

const vuePackageGlob = vueGlob('packages/ui-vue/**/*');
const vuePackageGlob = vueGlob('packages/web-forms/**/*');

/**
* @typedef {import('eslint').Linter.FlatConfig} FlatConfig
Expand Down Expand Up @@ -132,7 +132,7 @@ export default tseslint.config(

/**
* For future reference, there's a **lot** going on here. As briefly as
* reasonably possible, all of this happens for the `ui-vue` package:
* reasonably possible, all of this happens for the `web-forms` package:
*
* 1. ESLint uses the Vue parser (`vue-eslint-parser`)
* 2. The Vue parser, in turn, uses the TypeScript parser
Expand Down Expand Up @@ -275,10 +275,10 @@ export default tseslint.config(
// Vue's project template does a great job of illustrating the use,
// and I suspect we'd benefit from applying the pattern throughout the
// entire monorepo.
'./packages/ui-vue/tsconfig.json',
'./packages/ui-vue/tsconfig.app.json',
'./packages/ui-vue/tsconfig.node.json',
'./packages/ui-vue/tsconfig.vitest.json',
'./packages/web-forms/tsconfig.json',
'./packages/web-forms/tsconfig.app.json',
'./packages/web-forms/tsconfig.node.json',
'./packages/web-forms/tsconfig.vitest.json',

'./scripts/tsconfig.json',
],
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-solid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A [Solid](https://www.solidjs.com/) UI for ODK web forms; currently a reference client of [`@getodk/xforms-engine`][xforms-engine].

> [!NOTE]
> The future of this package is unclear! Its current state reflects an early spike/prototyping effort to explore viability of the ODK web forms project. As development of the project proceeds overall, it is likely that the [Vue client](../ui-vue/) will be be more mature and actively developed.
> The future of this package is unclear! Its current state reflects an early spike/prototyping effort to explore viability of the ODK web forms project. As development of the project proceeds overall, it is likely that the [Vue client](../web-forms/) will be be more mature and actively developed.
## Install

Expand Down Expand Up @@ -61,4 +61,4 @@ This structure is mostly an aspirational attempt at conveying a sense of where a
- Node (current/LTS; tested with [jsdom](https://github.com/jsdom/jsdom)). Server-side rendering of forms is not presently supported or targeted beyond testing, though it may be considered in the future. Inclusion of Node in the automated test suites helps us to keep this option open.

[xforms-engine]: ../xforms-engine/
[vue-client]: ../ui-vue/
[vue-client]: ../web-forms/
6 changes: 3 additions & 3 deletions packages/ui-vue/README.md → packages/web-forms/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# @getodk/ui-vue
# @getodk/web-forms

This is a Vue component library that uses [`@getodk/xforms-engine`](../xforms-engine/) to render ODK XForms.

## Usage

To use this library in a Vue.js application:

1. Import `@getodk/ui-vue` as a dependency in the application
1. Import `@getodk/web-forms` as a dependency in the application
2. Install the exported plugin by adding app.use(WebFormsPlugin) in entry component (usually App.vue)
3. Add the exported component anywhere in the application:

Expand All @@ -28,7 +28,7 @@ Plugin is there to initialize PrimeVue, currently it exposes no options. In futu
To run in development, run this command at the monorepo root:

```sh
yarn workspace @getodk/ui-vue dev
yarn workspace @getodk/web-forms dev
```

Individual test environments, and their corresponding watch modes, also have separate commands which can be found in [`package.json`](./package.json).
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@getodk/ui-vue",
"name": "@getodk/web-forms",
"version": "0.1.0-alpha.0",
"description": "Currently a stub/strawman project, reflecting potential naming and structure discussed in https://github.com/getodk/web-forms/issues/40",
"author": "getodk",
"repository": {
"type": "git",
"url": "https://github.com/getodk/web-forms",
"directory": "packages/ui-vue"
"directory": "packages/web-forms"
},
"bugs": "https://github.com/getodk/web-forms/issues",
"homepage": "https://getodk.org/",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/xforms-engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Implementation of the [ODK XForms specification](https://getodk.github.io/xforms-spec/)'s data model and computation logic. This package does not handle presentation or user interaction. Those aspects of web forms are meant to be handled by a client. Presently, those clients are:

- [`@getodk/ui-vue`](../ui-vue)
- [`@getodk/web-forms`](../web-forms)
- [`@getodk/ui-solid`](../ui-solid)

## Install
Expand Down
9 changes: 5 additions & 4 deletions packages/xforms-engine/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ export type {
} from './client/hierarchy.ts';
export type * from './client/index.ts';

// TODO: notwithstanding potential conflicts with parallel work on `ui-vue`,
// these are the last remaining references **outside of `xforms-engine`** to
// anything besides /client/* and the `initializeForm` entrypoint
// implementation. We'll refine the various `definition` types in due time.
// TODO: notwithstanding potential conflicts with parallel work on `web-forms`
// (former `ui-vue`), these are the last remaining references **outside of
// `xforms-engine`** to anything besides /client/* and the `initializeForm`
// entrypoint implementation. We'll refine the various `definition` types in due
// time.
export type {
AnySelectDefinition,
SelectDefinition,
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependsOn": ["@getodk/xpath#build"],
"outputs": ["dist/**"]
},
"@getodk/ui-vue#build": {
"@getodk/web-forms#build": {
"dependsOn": ["@getodk/xforms-engine#build"],
"outputs": ["dist/**"]
},
Expand Down

0 comments on commit 4fbe91c

Please sign in to comment.