From 5a22fecc89db563ac2ec75d823d232340f0e7a02 Mon Sep 17 00:00:00 2001 From: Artem Alexeyenko Date: Tue, 19 Sep 2023 17:53:20 -0400 Subject: [PATCH 1/4] Disable form when submit in progress: small inert fix (cherry picked from commit a9e8cf00ae96718da9ae9ddb828a9faf1eb12e4f) --- packages/sitecore-jss-react-forms/src/components/form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitecore-jss-react-forms/src/components/form.tsx b/packages/sitecore-jss-react-forms/src/components/form.tsx index c8e1a6aa4e..0206332509 100644 --- a/packages/sitecore-jss-react-forms/src/components/form.tsx +++ b/packages/sitecore-jss-react-forms/src/components/form.tsx @@ -119,7 +119,7 @@ export class Form extends Component action={action} method="POST" onSubmit={this.onSubmit.bind(this)} - {...{ inert: isInert || undefined }} + {...{ inert: isInert ? 'true' : undefined }} > {fieldComponents} From be0ecc2075f7412597525f402e337906bfa2a80c Mon Sep 17 00:00:00 2001 From: Artem Alexeyenko Date: Tue, 19 Sep 2023 18:40:15 -0400 Subject: [PATCH 2/4] Disable form submit: adjust test (cherry picked from commit 8598cb33b58a3807178daaf556976f713012dc4b) --- packages/sitecore-jss-react-forms/src/components/form.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sitecore-jss-react-forms/src/components/form.test.tsx b/packages/sitecore-jss-react-forms/src/components/form.test.tsx index 6280c10025..08abf26d95 100644 --- a/packages/sitecore-jss-react-forms/src/components/form.test.tsx +++ b/packages/sitecore-jss-react-forms/src/components/form.test.tsx @@ -468,7 +468,7 @@ describe('
', () => { c.setState({ submitInProgress: true }); - expect(c.find('form').prop('inert')).to.be.true; + expect(c.find('form').prop('inert')).to.be.equal('true'); }); it('should return form to non-inert state after submit is done', () => { From 093635d954df6f2ebeb765ac9aa25c37d7558db0 Mon Sep 17 00:00:00 2001 From: Artem Alexeyenko Date: Wed, 20 Sep 2023 10:33:13 -0400 Subject: [PATCH 3/4] changelog update --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65ddd16e27..593461a562 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ Our versioning strategy is as follows: * `[sitecore-jss-react]` Fetch Data for FEaaS Components as part of Component SSR/SSG ([#1586](https://github.com/Sitecore/jss/pull/1590)) * `[sitecore-jss-dev-tools]` `[templates/nextjs]` `[templates/react]` Introduce "components" configuration for ComponentBuilder ([#1598](https://github.com/Sitecore/jss/pull/1598)) * `[sitecore-jss-react]` `[sitecore-jss-nextjs]` Component level data fetching(SSR/SSG) for BYOC ([#1610](https://github.com/Sitecore/jss/pull/1610)) -* `[sitecore-jss-nextjs]` Reduce the amount of Edge API calls during fetch getStaticPaths ([#1612](https://github.com/Sitecore/jss/pull/1612)) +* `[sitecore-jss-nextjs]` Reduce the amount of Edge API calls during fetch getStaticPaths ([#1612](https://github.com/Sitecore/jss/pull/1612) [#1614](https://github.com/Sitecore/jss/pull/1614)) ### 🧹 Chores From 29126f26ecab087ea824ab8585e21ca4bd24bad6 Mon Sep 17 00:00:00 2001 From: Artem Alexeyenko Date: Wed, 20 Sep 2023 13:27:58 -0400 Subject: [PATCH 4/4] update changelog - the sequel --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 593461a562..1a68f836c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ Our versioning strategy is as follows: * `[sitecore-jss-react]` Fetch Data for FEaaS Components as part of Component SSR/SSG ([#1586](https://github.com/Sitecore/jss/pull/1590)) * `[sitecore-jss-dev-tools]` `[templates/nextjs]` `[templates/react]` Introduce "components" configuration for ComponentBuilder ([#1598](https://github.com/Sitecore/jss/pull/1598)) * `[sitecore-jss-react]` `[sitecore-jss-nextjs]` Component level data fetching(SSR/SSG) for BYOC ([#1610](https://github.com/Sitecore/jss/pull/1610)) -* `[sitecore-jss-nextjs]` Reduce the amount of Edge API calls during fetch getStaticPaths ([#1612](https://github.com/Sitecore/jss/pull/1612) [#1614](https://github.com/Sitecore/jss/pull/1614)) +* `[sitecore-jss-nextjs]` Reduce the amount of Edge API calls during fetch getStaticPaths ([#1612](https://github.com/Sitecore/jss/pull/1612)) ### 🧹 Chores @@ -59,7 +59,7 @@ Our versioning strategy is as follows: * `[templates/nextjs-sxa]` Don't let Image component wrap with tag when TargetUrl is not configured. ([#1593](https://github.com/Sitecore/jss/issues/1593)) * `[templates/nextjs]` Next config header plugin for CORS. ([#1597](https://github.com/Sitecore/jss/pull/1597)) * `[templates/nextjs]` Ensure dictionary data is only fetched when layout data is present for a route ([#1608](https://github.com/Sitecore/jss/pull/1608)) -* `[sitecore-jss-react-forms]` Form should be blocked while submit is in progress to avoid submit spam ([#1611](https://github.com/Sitecore/jss/pull/1611)) +* `[sitecore-jss-react-forms]` Form should be blocked while submit is in progress to avoid submit spam ([#1611](https://github.com/Sitecore/jss/pull/1611) [#1614](https://github.com/Sitecore/jss/pull/1614)) * `[templates/nextjs]` Fix linting errors, fix type error by upgrading @react/types to v18.2.22 ([#1613](https://github.com/Sitecore/jss/pull/1613)) ### 🛠 Breaking Changes