-
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
base: main
Are you sure you want to change the base?
Commits on Aug 16, 2024
-
🏷️ Define registry types for preview flavours
* 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.
Configuration menu - View commit details
-
Copy full SHA for b26df1c - Browse repository at this point
Copy the full SHA b26df1cView commit details -
⚗️ Implement generic top-level components for form previews
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.
Configuration menu - View commit details
-
Copy full SHA for bde933c - Browse repository at this point
Copy the full SHA bde933cView commit details -
✨ Implement the columns structure and webform previews
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.
Configuration menu - View commit details
-
Copy full SHA for 9511836 - Browse repository at this point
Copy the full SHA 9511836View commit details -
✨ Implement the structure and webform content preview
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.
Configuration menu - View commit details
-
Copy full SHA for 36a2101 - Browse repository at this point
Copy the full SHA 36a2101View commit details -
* 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
Configuration menu - View commit details
-
Copy full SHA for 926295e - Browse repository at this point
Copy the full SHA 926295eView commit details -
✨ Implement the structure and webform fieldset preview
Both simply display their nested children.
Configuration menu - View commit details
-
Copy full SHA for 2980a2f - Browse repository at this point
Copy the full SHA 2980a2fView commit details