-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move crud operations into "form-manager", along with DocumentImporter. * Rename "stories" to "example-stories" * PascalCase for FormManager * Create top-level Form design component. * Rename forms/Form type to forms/FormDefinition * Add Storybook a11y plugin, which has Axe integrated. * Add play function to Form story and initial unit test. * Add tests for each Storybook stories module, using a new helper - describeStories - to compose storybook stories and their "play" functions into Vitest specs. Integrate so it's included with the workspace's coverage metrics. (there's a failing test that will be fixed in a follow-up commit.) * Get design unit tests running via the workspace's Vitest configuration. This required added a "jsdom" environment annotation to every unit test file, despite there being a global jsdom environment configuration setting in the project. (running just the design test suite from the packages/design directory picks up the environment correctly; not so when the entire monorepo is tested at the same time). * Update README, moving pdf->html parsing notes into comment on processHtml.js. Also, add linting to CI. * Move FormManager implementation into the package's index. * To reduce memory consumption on Cloud.gov Pages, reduce Turborepo's build concurrency from the default of 10 to 5. * Log available memory in the Pages build container. * Try building on Pages with a Turborepo concurrency of 1 (for serial build execution). * Remove single concurrency from Turborepo build
- Loading branch information
1 parent
3f124ed
commit c0997fd
Showing
81 changed files
with
2,447 additions
and
1,175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v18.16.0 | ||
v20.11.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
import { FormSection } from '@atj/design/src/form'; | ||
import { FormManager } from '@atj/design'; | ||
import ContentLayout from '../../layouts/ContentLayout.astro'; | ||
--- | ||
|
||
<ContentLayout title="10x Access to Justice Spotlight"> | ||
<FormSection client:only /> | ||
<FormManager client:only /> | ||
</ContentLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
import { FormView } from '@atj/design/src/form/FormView'; | ||
import { Form } from '@atj/design'; | ||
import formData from '../htmlParser/ud105-form-field-output.json'; | ||
import ContentLayout from '../layouts/ContentLayout.astro'; | ||
--- | ||
|
||
<ContentLayout title="10x Access to Justice Spotlight"> | ||
<FormView prompt={formData} /> | ||
<Form client:only form={formData} /> | ||
</ContentLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended" | ||
], | ||
"overrides": [ | ||
{ | ||
"env": { | ||
"node": true | ||
}, | ||
"files": [ | ||
".eslintrc.{js,cjs}" | ||
], | ||
"parserOptions": { | ||
"sourceType": "script" | ||
} | ||
} | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"react" | ||
], | ||
"rules": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { createForm } from '@atj/forms'; | ||
|
||
import Form from '.'; | ||
|
||
export default { | ||
title: 'Form', | ||
component: Form, | ||
decorators: [(Story, args) => <Story {...args} />], | ||
args: { | ||
form: createForm( | ||
{ | ||
title: 'Test form', | ||
description: 'Test description', | ||
}, | ||
[ | ||
{ | ||
id: 'question-1', | ||
text: 'Question 1', | ||
initial: '', | ||
required: true, | ||
}, | ||
{ | ||
id: 'question-2', | ||
text: 'Question 2', | ||
initial: 'initial value', | ||
required: false, | ||
}, | ||
] | ||
), | ||
}, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof Form>; | ||
|
||
export const FormTest = {} satisfies StoryObj<typeof Form>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* @vitest-environment jsdom | ||
*/ | ||
import { describeStories } from '../test-helper'; | ||
import meta, * as stories from './Form.stories'; | ||
|
||
describeStories(meta.title, stories); |
Oops, something went wrong.