Skip to content

form-js-viewer refactor, splitting view and state management #1166

Open
@Skaiir

Description

@Skaiir

What should we do?

We need to split the form-js-viewer state management logic from its rendering in two different projects.

grafik

Why should we do it?

There are many motivations for this change:

  • Our reliance on preact to compute things like feel expressions, visibility, ect... is slowing us down more and more, many timing issues are created as a result of tethering render to computations and it also affects performance
  • Our tests are unreliable and slow from their reliance on jsdom and waiting for UI event propagation
  • Splitting the two would make implementing new renderers in potentially other frameworks / different toolkits rather simple
  • Removing the viewer's dependency on the viewer would be a nice improvement as we currently do some quite hacky things with it

How we are going to do it?

  • Agree on form component & form structure interfaces
  • Build out the form-js-render package #1189
  • Build out the form-js-viewer-core package  #1208
  • Migration of custom components
  • Integrate the new packages into the viewer
  • Build out the editor "core" submodule (defines what the editor will supply the renderer, we don't need a full package for this, as it'll be small)
  • Integrate the module + the renderer into the editor
  • Consider integration concerns into other products
  • Final checks

Internal discussions ongoing, see comments for the brainstorms.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions