Replies: 2 comments
-
What's your ideal form system look like?My ideal system has clear separations of the primary form concerns as I see them: content, network behavior, UI/UX behavior, and form configurations. Each of these concerns are individually testable for rigidity (particularly network and config code), and create clearer steps for developing future forms (i.e. add this, then add that, then wire it up here, etc.) A napkin-sketch of an idea: In our current setup, networking is efficiently managed by To further refine our system, we propose introducing These configurations will be accessed through a unified router like
// get params from URL
const { authority, type, id } = useParams("/:authority/:type/:id")
// use authority and type to determine what config to pull in
const formConfig = getFormConfig(authority, type)
// render config using `FormEngine`
return <FormEngine {...formConfig} /> How does that system improve the developer experience and user experience?DX:
UX:
What are the foreseeable cons of your desired approach?
|
Beta Was this translation helpful? Give feedback.
-
Related JIRA Ticket: https://qmacbis.atlassian.net/browse/OY2-27178
Introduction
Purpose of the Discussion: This discussion aims to land on ideas that significantly enhance the maintainability and efficiency of our form system within the React codebase, and a strategy for implementation.
Summarized Objectives:
Background Information
Our current repository includes over 10 forms that have been developed through a process of copying and pasting code. This approach, while expedient at first, has led to a complex codebase that is difficult to manage and prone to subtle, hard-to-detect bugs. A strategic refactor is necessary to address these challenges and streamline our development process.
Development, Maintenance, and Testing Issues
ItemResult
's authority. This is further complicated by New Submission's router that follows no similar structure.* Modals do have an exception with Withdraw actions, as they're destructive actions that require one additional confirmation before submission
Criteria for a New System
Needs:
Wants:
Discussion Prompts
What's your ideal form system look like?
How does that system improve the developer experience and user experience?
What are the foreseeable cons of your desired approach?
Beta Was this translation helpful? Give feedback.
All reactions