This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
FVL 4.0 and the plugin system #269
marina-mosti
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
This is a good overview of what we want to do, I have a few thoughts on the proposed API The const { model } = useSchemaForm({
initialModelState,
mapProps: {},
components: {
'text': InputText, // Defines a string-to-component mapping
InputCheckbox, // Defines a component, since the string and component name matches
'select': (el) => el.multiple ? InputMultiSelect : InputSelect, // Dynamic assignment based on other attributes in schema
},
}) And it kinda translates well with Vue's component definitions. What do you think, have I missed some cases? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've gotten to a difficult but exciting point in the life of FormVueLate.
Where we have realized the plugin system is very powerful but flawed because of a couple reasons:
Several attempts at fixing this have helped us understand that the problem can no longer be addressed without resorting to unmaintanable spaghetti code or the addition of a lot of bloat API, which brings us to the following conlusion.
The point in time has come for FVL to bring in yet another refactor/rewrite that will mostly focus on:
Some breaking changes are to be expected at this point, mainly with Lookup getting absorved into core.
As a first look, I think we should approach it the following way:
LookupPlugin
import fullymapProps
andmapComponents
as well as the second param to inject the local components will be moved intouseSchemaForm
useSchemaForm
composable since thats the primary entry point for the users' model.Beta Was this translation helpful? Give feedback.
All reactions