-
Notifications
You must be signed in to change notification settings - Fork 374
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
Cell renderer set for vue vanilla (work in progress) #2279
base: master
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for jsonforms-examples failed.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @davewwww,
I discussed with the team. We very much like leveraging the cells mechanism and using it similar to the React Vanilla approach. If this PR is properly finished, then we don't even need the ControlWrapper
customization mechanism anymore. Instead one can simply override the InputControlRenderer
with the same end result. As this is the cleaner approach, we would prefer that.
Would you be willing to finish this contribution, i.e. removing most of the current control renderers which we have, replacing them with a cell variant?
const input = useVanillaControl( | ||
useJsonFormsControl(props), | ||
(target) => target.value || undefined | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should implement and use cell specific variants of the useJsonFormsControl
and maybe useVanillaControl
bindings, like we do in React.
By reusing the one for the renderers
, we will calculate a lot of unnecessary props here (e.g. label) which are then never used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sdirix is the implementation in the current commit as you imagine it? I have used the useVanillaCell() and useJsonFormsCell() functions at the cells, whereby the useVanillaCell() is actually only a copy of the useVanillaControl(), so far correct?
//stringControlRendererEntry, | ||
multiStringControlRendererEntry, | ||
numberControlRendererEntry, | ||
integerControlRendererEntry, | ||
//numberControlRendererEntry, | ||
//integerControlRendererEntry, | ||
enumControlRendererEntry, | ||
oneOfEnumControlRendererEntry, | ||
dateControlRendererEntry, | ||
dateTimeControlRendererEntry, | ||
timeControlRendererEntry, | ||
booleanControlRendererEntry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could get rid of all the renderers in favor of cells, except maybe the boolean one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not the boolean one? is there any special handling? looks pretty much the same as the others.
That is of course an interesting thought. So far I use the And yes, if you give the GO, then I would continue to work on it. |
I would just avoid introducing the new control-wrapper injection mechanism as a new additional way of customizing as it's no longer needed. If you have existing custom renderers using the control-wrapper and you would like to use your own customized one, then you can simply use your own implementation of control-wrapper for them. Then you register an additional custom
Please go ahead, we're looking forward to this feature 👍 Let us know if you need any support or have questions. |
0677ac8
to
3c21c93
Compare
@davewwww Let me know once I shall take a look again 👍 |
there is currently a error at the building that i wanted to investigate. but i don't really understand it, maybe you have an idea. Error: [@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types. Besides that, all cells are converted and you can have a look at it. especially the time & datetime cells. |
@sdirix What do you think about my proposal? I would like to contribute more cells & renderers for vue vanilla . |
Hi @davewwww, we had less resources than usual in the last weeks which is why I did not have time yet to look at the PR again. I will do so as soon as possible, probably within a week. If possible it would be great if you could make sure that the build is green. Then if the code is fine, we can immediately merge. Edit: Just saw that you mentioned the error already above. I will take a look when I review the PR 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look through the sources and commented what stuck out to me. Generally speaking this is good work and I love to see this merged in the near future ;)
This error likely comes from the type-based |
…l at Cells. adjusted DispatchCell props.
also add a fix for eclipsesource#2156 at dateTimeCell: use v-model instead of value and add missing seconds at timeCell
…ead of props.data
9850f2f
to
893774b
Compare
Update: I will re-review this PR again this week |
I like the cells but we need to fix the build errors. I started refactoring the cells but did run out of time. I think we could try not using the |
regarding: #1720
Hi,
I have tried to implement a proposal for the missing cell feature in vue vanilla.
What do you think, does it work so far?