-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First pass at full-form preview rendering #175
Draft
sergei-maertens
wants to merge
6
commits into
main
Choose a base branch
from
feature/full-form-preview
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sergei-maertens
force-pushed
the
feature/full-form-preview
branch
from
August 16, 2024 12:34
7022837
to
fd9a13f
Compare
This was referenced Aug 16, 2024
Merged
sergei-maertens
force-pushed
the
feature/full-form-preview
branch
from
August 16, 2024 13:15
fd9a13f
to
7541540
Compare
sergei-maertens
force-pushed
the
feature/full-form-preview
branch
from
August 16, 2024 15:59
7541540
to
ba6488e
Compare
* The structure subtree types allow a react component to be specified, which will be used to render children/subtrees of a given formio component definition. Components that don't support child components do not need to provide this. * The webform preview allows specifying a react component to use to display the component as a field in the full form definition. If not specified, the panel preview will be used. This is mostly relevant for components that support child components and need to render those recursively.
The form preview is broken out in two possible render modes, each have their own top-level component to lock in the context and behaviours. The structure mode is the most complex, since it will integrate with the edit modal/form for each individual component, and the controls for position within the component tree.
The webform preview will actually render the nested components in each column, and applies the grid layout similar to what the SDK does. There is no mobile toggle in this preview. The structure preview groups the columns that are defined, and the child components within each column.
The content component displays the configured HTML in the webform preview. In structure mode, because there is no label, the content is stripped from HTML tags and truncated to show a short summary.
* in structure mode, we can simply display the template for each item, consisting of the nested components * in webform mode, we currently display a single, fake nested form. This will however need to be updated with the add/remove controls and Formik's array helpers
Both simply display their nested children.
sergei-maertens
force-pushed
the
feature/full-form-preview
branch
from
August 16, 2024 16:37
ba6488e
to
2980a2f
Compare
sergei-maertens
changed the title
Render full form preview
First pass at full-form preview rendering
Aug 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
EditConfiguration
This could get merged without getting in the way :)