Open metzgegu opened 5 years ago
The first pull request was closed and the new one include custom form
code without link to any frontend component in order to merge it and link it when the backend implementation is done see
TODO
frontend_app_custom_from
to frontend
(enable the app and display forms buttons in the dashboard)custom form
builder in workspace admin user
I have edited the description to explain the plan for this feature
@metzgegu I need you to update the description to list every components that are part of the dead code base please. Separate the app custom form ones from the app admin ones
The related PR has been merged. the App is added as dead code
Feature description
An app from which you load an external json file and it generates a html form.
Context
This app will be a new app with a few contents types which will be created with json files. The backend need to fetch all the forms from a json files and send it to the frontend. This json file will be created by the frontend with an UI custom form builder in admin workspace user. All the new endpoints needed is described here
Solution implemented
In order to generate form through JSON file, it use react-jsonschema-form, the form generated is displayed by this lib as well Custom form have a few fields which was added to the lib like a rich text and a markdown editor. Other libs was also used in order to add those custom fields
In order to create a form as an administrator, the
frontend
give a JSON editor and a drag and drop builderEDIT: 2020-04-22
The app is currently not functional due to the backend not being implemented. We are going to merge all the frontend code as dead code for now.
The plan is: 1) Merge the code 2) Right after the v3.0, we are going to activate the app 2.1) by doing all the backend requirements for the app to be functional (see https://github.com/tracim/tracim/issues/2042) 2.2) add some tests (see https://github.com/tracim/tracim/issues/2895) 3) In a version 3.x, we will refactor the custom form app and/or the related components in app admin to: 3.1) include the recent refactor of app feature 3.2) see if we should refactor, reorganize or rename some components 3.3) do these architecture fixes
Dead code when merging in current state
frontend_app_admin_workspace_user/
AdminForm
: component which is a container for the form editor, it need to be linked toAdminWorkspaceUser
and the dropdown inHeader
FormBuilder
component which is used byAdminForm
to build forms (e.g. JSON editor, DnD editor and from preview)frontend_app_admin_workspace_user/src/component/
:FromBuilder/
ErrorBoundary.jsx
Field.jsx
FieldList.jsx
FieldType.jsx
FormBuilder.jsx
FormHelper.js
FormInfo.jsx
JsonFormEditor.jsx
AdminForm.jsx
frontend_app_custom-form/
async
functions...)JsonForm
component and a folder with each custom field added to the lib which is used byJsonForm
functionnal_tests/