Conversation
cafca
commented
Apr 3, 2022
- adds conversion from json to cbor
- conversion/validation is called whenever textbox contents are changed
- removes conversion/validation buttons
- removes window alert and displays error messages in the text boxes
The conversion from JSON to CBOR is super cool! I've changed the
Regarding the automatic changes of data as soon as I type something: First I thought "woah, cool", then I played with it a little and stumbled upon a few things I'm not sure I like them: a) If I manually write JSON it makes a dozen of invalid requests to the server before I finished writing valid input b) I have to change something in the already complete CDDL to re-trigger the validation after changing the JSON or CBOR c) the error messages overwrite my CBOR / JSON input now while I was writing it. I think its totally fine to trigger requests pressing the buttons, or if we're keen on using key events, then I'd come up with better places where to display error messages, also trigger CDDL validation and maybe validate the JSON before we send it to the server? Since this is just a simple tool I'd be happy to not over-engineer this, take this nice new feature and get back to the buttons as they just work without surprises 😄 |
|
Super, thanks. I was stuck with the debounce. The logic around the live conversion can be improved, yes. |