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
Add a way to serialize form content and status to/from JSON ? #929
Comments
@X-Ryl669 I think you're looking to integrate something that is best suited by other libraries.
It is like trying to reinventing the wheel. What if it is decided to put carbon fiber wheels on the Also what if the carbon fiber wheels, are not properly installed, or they get holes from big ass bugs in them? And now because I hope this doesn't sound rude, but it's facts. Especially when you're asking for features to be built for you, when what you're asking for is rather simple, and json encoding is a first-party feature built into go's stdlib. You can even This is what development is about, using libraries, integrating code.
In all honesty it sounds like you are looking for a framework, or library that does more of what you're asking for specifically, rather than asking other people to make it do what you want. Here's a library/framework specifically for asking questions in a terminal. |
Thanks for the link to huh. TBH, I was looking at some widget collection derived from tcell to integrate in micro's editor. My idea was to be able to trigger a dialog in Lua (micro implements a Lua based plugin system). Building the interface in Lua is too low level (and it doesn't solve the event loop issue). So the logical solution would be to have a Go-based dynamic form creation (to be implemented in micro's Go level) and that the form description and value would be serialized to/from Lua. I guess it's not too specific a feature, since building forms by hand is painful for everyone, every change implies rebuilding (which is slow). A dynamic form sounds like a must-have for ease of development, IMHO. I understand it might not be the goal of this project, it's a feature request (hence the question mark at the end of the issue's title). BTW, I'm not a Go developer, so yes it may sounds like a "do this for me" request, simple because I can't do it by myself efficiently. |
On the note of micro's editor. I am not sure if you are aware of the stripped down version of the micro editor that can be utilized within tview, that pgavlin ripped out of micro. I have a fork as well which added back a gutter, and some other integrations with how it handles colors. This is a previous issue I had linked to it in... HOpefully it will help, or provide some insight/inspriation/guidance/scratch of the itch
|
If would be very useful if it was possible to serialize a form to/from JSON (so one could build a form from a simple JSON stream) at runtime.
Also, when the form is "submitted" it would be great if it was possible to serialize the content of each FormItem's value to a JSON stream too.
The underlying idea would be to use tview in conjunction with lua (for example in a plugin) to build a form to ask something to the user and be able to react when it's changed.
The text was updated successfully, but these errors were encountered: