Skip to content

Feature/upgrade formio react 2.0.0#2

Open
Josephalexantony-aot wants to merge 112 commits into
developfrom
feature/upgrade-formio-react-2.0.0
Open

Feature/upgrade formio react 2.0.0#2
Josephalexantony-aot wants to merge 112 commits into
developfrom
feature/upgrade-formio-react-2.0.0

Conversation

@Josephalexantony-aot

Copy link
Copy Markdown
Member

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-XXXX

Description

This PR brings the full upstream @formio/react 6.1.0 rewrite into our develop branch while preserving all AOT-specific customisations. No AOT code is lost.

What's new from upstream

The upstream library underwent a major rewrite between the version develop was based on and 6.1.0:

  • TypeScript migration — all components rewritten from .jsx.tsx with full type safety
  • Build tool — replaced Babel with tsc
  • Test runner — replaced Karma/Webpack with Jest
  • Bug fixes included:
    • FIO-11245: FormBuilder does not work correctly after ReactComponent redraw
    • FIO-11128: Fix strange state bugs in EFB demo
    • FIO-9944: Fix memory leak where create form promise fulfills only after component unmounts
    • FIO-9592: Fix builder form sync issues
    • FIO-10763: Apply form edit conflict resolution
    • FIO-10798: Form tags not displayed in FormEdit

AOT-specific changes preserved

Item Detail
Package name @aot-technologies/formio-react
Version 2.0.0
formiojs imports All @formio/js references replaced with @aot-technologies/formiojs across all source files
Peer dependency @aot-technologies/formiojs ^1.0.2 added to peerDependencies
Custom condition logic iterateConditionsAndSetLogic and createCustomConditions (originally in FormBuilder.jsx) ported into the new FormBuilder.tsx — fires on every onChange event to convert GUI-built conditional rules into customConditional expressions

Files removed

These old .jsx files were removed because they are fully superseded by the upstream .tsx rewrites:

  • src/components/Form.jsx → replaced by Form.tsx
  • src/components/FormBuilder.jsx → replaced by FormBuilder.tsx
  • src/components/FormEdit.jsx → replaced by FormEdit.tsx
  • src/components/SubmissionGrid.jsx → replaced by SubmissionGrid.tsx
  • babel.config.json → no longer needed, build now uses tsc

What changed?

Use this section to provide a summary description of the changes you've made

Why have you chosen this solution?

Use this section to justify your choices

Breaking Changes / Backwards Compatibility

Use this section to describe any potentially breaking changes this PR introduces or any effects this PR might have on backwards compatibility

Dependencies

Use this section to list any dependent changes/PRs in other Form.io modules

How has this PR been tested?

Use this section to describe how you tested your changes; if you haven't included automated tests, justify your reasoning

Checklist:

  • I have completed the above PR template
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

JaguarsCodehub and others added 30 commits November 20, 2022 23:46
This CONTRIBUTING.md file will help our fellow contributors to show by which mens they can contribute to this project
* Rewrites of the major components (Form, FormBuilder, FormGrid,
  SubmissionGrid, etc.) to idiomatic React and Typescript
* Tooling updates (eslint, typescript, no more babel, etc.)
* Many more...
Bumps [webpack](https://github.com/webpack/webpack) from 5.91.0 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.91.0...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [ws](https://github.com/websockets/ws) from 8.17.0 to 8.18.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@8.17.0...8.18.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…ces-3.0.3

Bump braces from 3.0.2 to 3.0.3
brendanbond and others added 29 commits June 13, 2025 12:50
FIO-9944: Fixes an issue where some form instances will not be destroyed
…ssue where form tags are not displayed in Form Edit'
…ory leak where create form promise fullfills only after original component got unmount'
…ssue where react form builder does not work correctly after react component redraw'
- Rename package to @aot-technologies/formio-react, version 2.0.0
- Swap all @formio/js imports to @aot-technologies/formiojs
- Port iterateConditionsAndSetLogic + createCustomConditions from develop
  into FormBuilder.tsx so conditional chain logic is preserved
- Add @aot-technologies/formiojs as peer dependency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolution strategy:
- Old .jsx files (Form, FormBuilder, FormEdit, SubmissionGrid): deleted —
  superseded by TypeScript .tsx rewrites from upstream 6.1.0
- babel.config.json: deleted — new build uses tsc, not Babel
- package.json, imports, README: kept our branch version which carries all
  AOT customizations (@aot-technologies/formiojs, v2.0.0, package rename)
- webpack.test.config.js: auto-merged from develop (legacy, unused by Jest)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… swap

- Add @formio/js to devDependencies so its type declarations are available
  at build time (runtime uses @aot-technologies/formiojs, types come from
  the upstream @formio/js package which it is a fork of)
- Add src/aot-formiojs.d.ts shim so tsc resolves @aot-technologies/formiojs
  and /utils and /lib subpaths to @formio/js type declarations
- Add explicit WebformInstance | null and FormioFormBuilder | null type
  annotations on two prevInstance parameters flagged by strict mode (TS7006)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants