-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Implement support for async ops. #117
Conversation
This is to stop jsdoc parsing errors. More information in this thread: jsdoc/jsdoc#555
Hi @tlwr, is there anything in the |
Very happy to have |
Great, this looks a lot cleaner! There is a small UI-related bug introduced by these changes. When typing in the input box, auto-bake triggers as each new character is entered. This causes the |
Just reproduced this, it is quite bad from a usability perspective. I believe the standard solution is to "debounce" the input |
Added debounce with guidance from the underscore.js implementation: https://github.com/jashkenas/underscore/blob/e944e0275abb3e1f366417ba8facb5754a7ad273/underscore.js#L880
Debouncing implemented for autobaking instead of just the input box being changed. This means that changing operation arguments doesn't "overtrigger" autobaking either. |
I'm afraid this still doesn't actually solve the root problem, it just delays it by 300ms. Focus is still removed from the input box when auto-bake does run. This also happens when you do a Ctrl+A to select all the input. Debouncing is an interesting method, however I'm not a fan of introducing latency into the auto-baking process. It may be suitable if multiple changes are being made in quick succession, however it shouldn't delay the first bake - that should always be instant the moment you change an argument, the input, or anything else that triggers a bake. Perhaps we shouldn't be disabling the input at all if it's going to cause this focus problem. |
On Firefox 53 I do not get issues with focus (for arguments or the input pane) both with and without debouncing. However I understand this is a big usability concern. In these commits I have:
There is a UX consideration we should think about: when async baking is occurring and the input has in the meantime been changed, should we in some way mark the output as "dirty"? "Dirty" being that the contents of the output pane may no longer match the output that would be returned by baking again. |
Seems to be working well now. Marking the output as "dirty" once the input has changed is a very good idea. This is already potentially a problem when auto-bake is turned off, so I think a subtle indicator would be a welcome addition. Perhaps a slight change to the output border and a tooltip when you hover over it. |
We finally finished this! I'll make a separate PR for the indicator. |
[FEATURE] RPi Arm V7 & 8 Docker support Re: gchq#117
Fix arm64v8 Dockerfile Re: #gchq#117
This deals with #79 with 11 lines of code changes (and the addition of some tests).
The relevant code changes are exclusively the addition of
async
andawait
where necessary.This should be able to be dealt with fairly quickly and I can clean up #89 separately.
Summary