Skip to content

Commit 53b4e8e

Browse files
authored
Merge pull request #6 from flexion/demo-tweaks
Demo tweaks
2 parents c0ea108 + 1eeb2f3 commit 53b4e8e

12 files changed

Lines changed: 89 additions & 10 deletions

File tree

.changeset/modern-facts-watch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@flexion/forms-design': patch
3+
---
4+
5+
More aggressive refresh of forms list on AvailableFormList

apps/sandbox/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @gsa-tts/forms-server-doj
22

3+
## 0.2.2
4+
5+
### Patch Changes
6+
7+
- @flexion/forms-server@0.2.2
8+
9+
## 0.2.1
10+
11+
### Patch Changes
12+
13+
- @flexion/forms-server@0.2.1
14+
315
## 0.2.0
416

517
### Minor Changes

apps/sandbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@flexion/forms-sandbox",
3-
"version": "0.2.0",
3+
"version": "0.2.2",
44
"description": "Form server sandbox for evaluating functionality.",
55
"type": "module",
66
"license": "CC0",

apps/server-doj/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @gsa-tts/forms-server-doj
22

3+
## 0.2.2
4+
5+
### Patch Changes
6+
7+
- @flexion/forms-server@0.2.2
8+
9+
## 0.2.1
10+
11+
### Patch Changes
12+
13+
- @flexion/forms-server@0.2.1
14+
315
## 0.2.0
416

517
### Minor Changes

apps/server-doj/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@flexion/forms-server-doj",
3-
"version": "0.2.0",
3+
"version": "0.2.2",
44
"description": "Form server instance for DOJ",
55
"type": "module",
66
"license": "CC0",

apps/spotlight/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# @gsa-tts/forms-spotlight
22

3+
## 0.2.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
- @flexion/forms-design@0.2.2
9+
10+
## 0.2.1
11+
12+
### Patch Changes
13+
14+
- Updated dependencies
15+
- @flexion/forms-design@0.2.1
16+
317
## 0.2.0
418

519
### Minor Changes

apps/spotlight/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@flexion/forms-spotlight",
33
"type": "module",
4-
"version": "0.2.0",
4+
"version": "0.2.2",
55
"private": true,
66
"publishConfig": {
77
"registry": "https://npm.pkg.github.com"

packages/design/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @gsa-tts/forms-design
22

3+
## 0.2.2
4+
5+
### Patch Changes
6+
7+
- Include static assets and sass source in package
8+
9+
## 0.2.1
10+
11+
### Patch Changes
12+
13+
- Update main attribute in package.json
14+
315
## 0.2.0
416

517
### Minor Changes

packages/design/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "@flexion/forms-design",
3-
"version": "0.2.0",
4-
"main": "src/index.ts",
3+
"version": "0.2.2",
4+
"main": "dist/index.js",
5+
"types": "dist/index.d.ts",
56
"type": "module",
67
"publishConfig": {
78
"registry": "https://npm.pkg.github.com"
@@ -26,7 +27,9 @@
2627
"test:watch": "pnpm onchange './**/*.{tsx,ts}' -- pnpm test:url"
2728
},
2829
"files": [
29-
"dist/**/*"
30+
"dist/**/*",
31+
"static/**/*",
32+
"sass/**/*"
3033
],
3134
"size-limit": [
3235
{

packages/design/src/AvailableFormList/index.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useState } from 'react';
2-
import { Link } from 'react-router-dom';
2+
import { Link, useLocation } from 'react-router-dom';
33

44
import { type FormService } from '@flexion/forms-core';
55

@@ -23,13 +23,20 @@ export default function AvailableFormList({
2323
urlForFormManager: UrlForFormManager;
2424
}) {
2525
const [forms, setForms] = useState<FormDetails[]>([]);
26-
useEffect(() => {
26+
const location = useLocation();
27+
28+
const loadForms = React.useCallback(() => {
2729
formService.getFormList().then(result => {
2830
if (result.success) {
2931
setForms(result.data);
3032
}
3133
});
32-
}, []);
34+
}, [formService]);
35+
36+
useEffect(() => {
37+
loadForms();
38+
}, [location.pathname, location.hash, location.key, loadForms]);
39+
3340
return (
3441
<>
3542
<section className="padding-y-3 desktop:margin-top-10 border-base-lighter border-y">

0 commit comments

Comments
 (0)