Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into acdc-pilot
Browse files Browse the repository at this point in the history
  • Loading branch information
fongsean committed Oct 24, 2024
2 parents 0c98f00 + f4c4ca3 commit 87d1d88
Show file tree
Hide file tree
Showing 180 changed files with 17,542 additions and 8,573 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
"plugin:prettier/recommended",
"plugin:storybook/recommended"
],
"ignorePatterns": ["*.config.js", "*.bin.ts", "*.js", "**/dist/**"],
"ignorePatterns": [
"*.config.js",
"*.bin.ts",
"*.js",
"**/dist/**",
"**/demo-renderer-app/src/components/ui/*.tsx"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_test_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
build-smart-forms-app:
name: Build
name: Build Smart Forms App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -20,7 +20,7 @@ jobs:
run: npm run build -w apps/smart-forms-app

build-demo-app:
name: Build
name: Build Demo App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -30,19 +30,19 @@ jobs:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
run: cd apps/demo-renderer-app && npm ci
- name: Build application
run: cd apps/demo-renderer-app && npm run build

jest-test:
name: Jest Tests
name: Jest Tests (only runs on node 18)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
Expand Down
90 changes: 90 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Change log

This log documents significant changes for the [@aehrc/smart-forms-renderer](https://www.npmjs.com/package/@aehrc/smart-forms-renderer). This project follows
[Semantic Versioning](http://semver.org/).

Changelog only includes changes from version 0.36.0 onwards.


## [0.44.1] - 2024-10-14
### Fixed
- Fixed unexpected behaviour of open-choice's open label field clearing the answers of previously selected options.
- Fixed an issue where enableWhen logic was not working properly with repeating items.

## [0.44.0] - 2024-10-09
### Added
- Added support for the [preferredTerminologyServer](https://hl7.org/fhir/uv/sdc/STU3/StructureDefinition-sdc-questionnaire-preferredTerminologyServer.html) SDC extension.

## [0.43.1] - 2024-10-04
### Changed
- Completely removed persisting "iframe-resizer" dependencies as a follow-up to v0.43.0.

## [0.43.0] - 2024-10-04
### Changed
- Removed external dependency on "iframe-resizer" while retaining dynamically sized Storybook iframes in the documentation.

## [0.42.0] - 2024-09-27
### Changed
- Replaced all instances of cloneDeep() with the native structuredClone() function.
- Changed Storybook iframes in the documentation to be dynamically sized based on the content.

## [0.41.0] - 2024-09-25
### Changed
- Significantly improved performance by reducing the number of re-renders.
- Adjusted renderer's background color to be #fafafa.
- Removed left and right paddings from the renderer - it now takes up the full width of its container.

### Fixed
- Fixed inconsistencies when syncing the renderer's internal state with externally-generated QuestionnaireResponses.
- Fixed inconsistencies with internal IDs for tracking repeating items and groups.
- Fixed an issue where the renderer's theme was overriding the parent app's styles.
- Fixed issues with lodash dependencies in package.json.

### Added
- Added a library function removeInternalIdsFromResponse() to remove internal IDs for tracking repeating items.


## [0.40.1] - 2024-09-18
### Fixed
- Fix date validation error message for two matches.
- Fix generation of internal IDs for repeat items and groups to be consistent and sync-able with externally-generated QuestionnaireResponses.
- Added a simple, minimal fix to dynamically adjust field positions based on viewport

## [0.40.0] - 2024-09-06
### Added
- Added support for Observation-based extraction as a library function and as a feature in the Playground.

## [0.39.0] - 2024-09-06
### Changed
- Refactored `repeat` items so that it tracks item instances using the QuestionnaireResponse, instead of using React's `useState`.

### Fixed
- Fixed an issue where `string` and `text` items were automatically removing inputted trailing whitespaces.

## [0.38.4] - 2024-08-29
### Fixed
- Fixed support for item.initial and item.answerOption.initialSelected for repeating groups.

## [0.38.3] - 2024-08-23
### Added
- Added support for non-repeating group table (`gtable`) items.

## [0.38.2] - 2024-08-21
### Added
- Added support for `Quantity` items. See documentation and Storybook for more details.

## [0.37.2] - 2024-08-19
### Fixed
- Fixed a @aehrc/sdc-populate library dependency issue.

## [0.37.1] - 2024-08-05
### Added
- Added support for `page` UI Control code from https://hl7.org/fhir/extensions/ValueSet-questionnaire-item-control.html.

## [0.36.1] - 2024-07-23
### Added
- Add support for `Coding` type in calculatedExpressions for choice and open-choice items.

## [0.36.0] - 2024-07-22
### Added
- Add Save-Extract-Write functionality (StructureMap-based) in the "Save as Final" button in the Smart Forms app.
14 changes: 12 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ If possible, it is recommended to merge the `main` branch into your branch first

## Development dependencies

You will need the following software to build the solution:
You will need the following software to build the solution and run the tests:

* Node.js 16.x or 18.x
* Node.js 18.x or later versions

To build and install locally, run in the root folder:
```
Expand All @@ -45,6 +45,16 @@ The easiest way to test your changes is to use Storybook, which can be run via:
npm run storybook
```

## Vite-specific caveats
The `vite.config.ts` file in the `@aehrc/smart-forms-renderer` package contains a `resolve: { preserveSymlinks: true }` config, when used alongside `optimizeDeps` and `build.commonjsOptions` allows Vite to use CommonJS modules in the package properly.

This config is essential for the package to properly build in deployments, but it breaks `tsc --watch` by ignoring changes.
To work around this, comment out the config during development and uncomment it (or just don't add it to git) before pushing changes.
```
...
// resolve: { preserveSymlinks: true }
...
```

### Coding conventions

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Any questionnnaire/SDC-related discussion can be raised in the questionnaire str

## Licensing and attribution

Smart Forms is copyright © 2022-2023, Commonwealth Scientific and Industrial
Smart Forms is copyright © 2022-2024, Commonwealth Scientific and Industrial
Research Organisation
(CSIRO) ABN 41 687 119 230. Licensed under
the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
Expand Down
20 changes: 20 additions & 0 deletions apps/demo-renderer-app/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/styles/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
}
}
Loading

0 comments on commit 87d1d88

Please sign in to comment.