webots icon indicating copy to clipboard operation
webots copied to clipboard

Feature web terminal

Open BenjaminDeleze opened this issue 2 years ago • 4 comments

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 in streaming_viewer/index.html and the link to toolbar.css in wwi/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 in streaming_viewer/index.html from R2022b to testingTerminal

BenjaminDeleze avatar Aug 25 '22 09:08 BenjaminDeleze

I changed the target branch to develop as we have released R2022b

BenjaminDeleze avatar Sep 14 '22 12:09 BenjaminDeleze

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.

stefaniapedrazzi avatar Sep 20 '22 14:09 stefaniapedrazzi

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

Screenshot from 2022-09-20 21-12-08

stefaniapedrazzi avatar Sep 20 '22 19:09 stefaniapedrazzi

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

Screenshot from 2022-09-20 21-12-08

Wow you're right the layout seems ugly. I retested and everything looks fine on Chrome but not on Firefox :(

BenjaminDeleze avatar Sep 21 '22 07:09 BenjaminDeleze

I think I addressed all comments (I am not sure about what you meant by "padding missing around the "stdout", "stderr" and "other" labels")

BenjaminDeleze avatar Sep 22 '22 06:09 BenjaminDeleze

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".

stefaniapedrazzi avatar Sep 22 '22 06:09 stefaniapedrazzi

Thanks, I will fix that right now

BenjaminDeleze avatar Sep 22 '22 06:09 BenjaminDeleze

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.

stefaniapedrazzi avatar Sep 22 '22 06:09 stefaniapedrazzi

Good idea, I will do it.

BenjaminDeleze avatar Sep 22 '22 06:09 BenjaminDeleze