Skip to content

Commit f17a28c

Browse files
committed
improve readme
1 parent 03db765 commit f17a28c

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

README.md

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cd your-repo-name
3232
# If you’re cloning this repository for the first time, or if you haven't initialized the submodule yet
3333
git submodule update --init --recursive
3434

35-
# To update the submodule
35+
# To update the submodule from the remote.
3636
git submodule update --remote --merge
3737
```
3838

@@ -53,24 +53,22 @@ yarn install
5353
npm run dev
5454

5555
# Or, if using yarn
56-
yarn start
56+
yarn dev
5757
```
5858

5959
This command will compile and serve the application. By default, it should be accessible at http://localhost:5173 in your web browser.
6060

6161
# How it works.
6262

63-
This implementation extends the [React JSON Schema Form (RJSF) library](https://github.com/rjsf-team/react-jsonschema-form) to create a step-by-step wizard interface. Instead of displaying all form fields at once, it presents them one at a time, with validation and navigation controls.
63+
The actual form schema's are specified in [AI act questions repository.](https://github.com/NGO-Algorithm-Audit/AI-Act-Questions) And this repository is used as a git sub module in this repository.
64+
65+
This rendering implementation extends the [React JSON Schema Form (RJSF) library](https://github.com/rjsf-team/react-jsonschema-form) to create a step-by-step wizard interface. Instead of displaying all form fields at once, it presents them one at a time, with validation and navigation controls.
6466

6567
The original specification is still applicable so please read the [RSJF documentation](https://rjsf-team.github.io/react-jsonschema-form/docs/) for information about how the forms work.
6668

6769
Changes we made to the original specification:
6870

69-
### 1. Multi form support
70-
71-
To show multiple forms on the starting page, we always place our form specifications inside an array. [See our forms](./src/assets/forms.json)
72-
73-
### 2. Output
71+
### 1. Output
7472

7573
The templates should return an outcome after the questions, to show this result we trigger the results component when the question key is `output`. For example:
7674

@@ -86,27 +84,19 @@ This allows us to have multiple different outcomes in one template that each are
8684

8785
In case a form ends without an `output` question we automatically trigger an error component.
8886

89-
### 3. uiSchema integration
87+
### 2. Intermediate output
9088

91-
To simplify importing the json templates into our front-end we specificy our [uiSchema](https://rjsf-team.github.io/react-jsonschema-form/docs/api-reference/uiSchema) inside the original [object properties](https://rjsf-team.github.io/react-jsonschema-form/docs/json-schema/objects)
92-
93-
Example:
89+
To show intermediate outputs or simple text messages to the user we trigger a classname on such elements, to prevent the content from rendering as an input. This is done by adding the following uiSchema definition:
9490

9591
```json
96-
{
97-
"title": "Hello World",
98-
"type": "object",
99-
"required": ["question1"],
100-
"properties": {...},
101-
"dependencies": {...},
102-
"uiSchema": {
103-
"question1": {
104-
"ui:autofocus": true
105-
}
106-
}
92+
"outputIntermediate": {
93+
"ui:widget": "textarea",
94+
"ui:classNames": "intermediate-output"
10795
}
10896
```
10997

98+
In this example we trigger this for the input element `outputIntermediate` but this mechanism can be used for any question.
99+
110100
# Styling overrides
111101

112102
With these css variables defined in the root where the frontend is injected the default theming can be overriden.

0 commit comments

Comments
 (0)