webots
webots copied to clipboard
Feature web terminal
Description Add a non-interactive terminal to the toolbar:
- Display messages from stdout and stderr
- Has a
clear
function. - Sort function by std (stdout or stderr) and tag (
INFO:
,ERROR:
,WARNING:
, other) - Support ANSI escape code (Fix #818)
To test it you can:
- Test locally (change the link to
WebotsView.js
instreaming_viewer/index.html
and the link totoolbar.css
inwwi/WebotsView.js
) - Test on a docker: https://benjamindeleze.github.io/sandbox/Theia_Cloud/maze_runner/index.html
- Test remotely by changing the link to
WebotsView.js
instreaming_viewer/index.html
fromR2022b
totestingTerminal
I changed the target branch to develop as we have released R2022b
Is there any particular reason why the new "clear" icon has the PNG format and the other icons ("fullscreen", "ide", "info", ..) are stored in SVG format. It would be better to be consistent with the format.
Everything works fine!
It took me a while to make it work locally, I double checked that I'm loading the modified CSS but from what I could get locally I think the layout can be improved:
- the clear / bin icon is not vertically centered with the toolbar
- maybe also the buttons labels (stdout, stderr, etc.) can be centered a little bit more vertically
- padding missing around the "stdout", "stderr" and "other" labels
- I would personally remove the colon from "INFO:", "ERROR:" and "WARNING:" but it's ok to keep them
Everything works fine!
It took me a while to make it work locally, I double checked that I'm loading the modified CSS but from what I could get locally I think the layout can be improved:
- the clear / bin icon is not vertically centered with the toolbar
- maybe also the buttons labels (stdout, stderr, etc.) can be centered a little bit more vertically
- padding missing around the "stdout", "stderr" and "other" labels
- I would personally remove the colon from "INFO:", "ERROR:" and "WARNING:" but it's ok to keep them
Wow you're right the layout seems ugly. I retested and everything looks fine on Chrome but not on Firefox :(
I think I addressed all comments (I am not sure about what you meant by "padding missing around the "stdout", "stderr" and "other" labels")
Ok, I will review the changed. I meant that there is some "space" between the word and the button border for "INFO", "WARNING" and "ERROR" but not for "stdout" "stderr" and "others".
Thanks, I will fix that right now
I confirmed the layout issues are fixed.
Just a question: in Webots the console is cleared when a world is loaded. Maybe it would be good to implement the same behavior in the web interface and clear the terminal when loading a world.
Good idea, I will do it.