Skip to content
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

[Suggestion]: UX Improvements #33

Open
Xatenev opened this issue Sep 25, 2024 · 4 comments
Open

[Suggestion]: UX Improvements #33

Xatenev opened this issue Sep 25, 2024 · 4 comments

Comments

@Xatenev
Copy link

Xatenev commented Sep 25, 2024

What happened?

The java playground would benefit greatly from some fairly simple UX improvements. The typical approach to using the playground for me looks like the following:

  1. Navigate to the website.

image

  1. Clear example code, either by pressing the button or ctrl+a and remove.
  2. Press enter 10 times to make some space to work in.
  3. Click into the first row to get started.
  4. Now I can start working with the following layout.

image

I assume that others also use a similar approach.

It would be very beneficial if either the starting layout would be adjusted so the user can get started more quickly without all the extra steps or alternatively the possibility to set some kind of user configuration in the session/cookie/etc.

Thanks!

OS

Linux

What browsers are you seeing the problem on?

Chrome

Contact Details (optional)

No response

Additional information

Leave blank

@danthe1st
Copy link

What exactly would you like to store in the browser (localStorage might be an option as well)?

For making space, I would suggest "just" setting a minimum height for the playground text area unconditionally.

@delabassee
Copy link
Member

@Xatenev would a keyboard shortcut to clear the editor help?

@Xatenev
Copy link
Author

Xatenev commented Dec 26, 2024

@danthe1st @delabassee Sorry for the late response.

My idea would be the following fairly small changes:

  1. Add a minimum height for the playground text area unconditionally as proposed by @danthe1st.
  2. Set browser auto-focus into the editor on page-load so you can start working right away.
  3. Add a keyboard shortcut to clear the editor as proposed by @delabassee. (Might be irrelevant, if we have browser auto-focus into the editor, Ctrl+A Ctrl+X etc. works fine then.)
  4. Add a keyboard shortcut to run the code. (What about Ctrl + Enter like on play.rust-lang?)
  5. Make sure to not loose editor focus when running code (Can also be seen in the play.rust-lang link below) so you don't need to switch between keyboard and mouse all the time.
  6. Add a small help text that describes the useable hotkeys, for example in the "About" button on the top right of the editor.

A good example of a similar website can be seen here:

https://play.rust-lang.org/

We have auto-focus in the first row automatically and can get started right away. Ctrl + Enter runs the code. Works great for me.

I think with these changes we could already have a way more ergonomic UX that doesn't require switching between mouse/keyboard multiple times just to quickly test some code out.

If you agree with me and this is something I can contribute myself, I would gladly submit a PR for the changes above if you can point me to the right place.

Happy holidays.

@danthe1st
Copy link

If you agree with me and this is something I can contribute myself, I would gladly submit a PR for the changes above if you can point me to the right place.

IIRC the playground itself is not Open Source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants