stoplightio / desktop

The Stoplight desktop app + issues repository.
https://stoplight.io
79 stars 13 forks source link

Changes not detected as such in raw schema text area #173

Open wvzuilen opened 6 years ago

wvzuilen commented 6 years ago

I'm trying to rearrange the properties of a object. This was possible by rearranging the raw code, but when I do this I can't save my changes. The change isn't detected as a 'change that can be saved' and when I switch the view my changes in the raw code are reverted.

OS : macOS Browser : Chrome & Safari

image

wvzuilen commented 6 years ago

Nevermind. I had to change the focus. First I did that by clicking the viewer or editor tab but that reverts the changes. Clicking outside the text area makes the change savable.

wvzuilen commented 6 years ago

Ok, reopend because I've noticed that in some other text areas changes are being detected while typing. For example the document text area. It would be intuitive if this works for all text areas in the same way.

marbemac commented 6 years ago

A valid point - the reason that we do it on blue of the raw input is because as the user is typing it is most of the time an invalid schema (since while editing the JSON will probably be invalid and thus not parsable). We could, however, attempt to parse and update once the user is done typing (after a delay). Would that make it better?

wvzuilen commented 6 years ago

Yes. After a delay: If valid, enable save option. If invalid, update error counter?