tokio-rs / console

a debugger for async rust!
MIT License
3.61k stars 142 forks source link

UI design proposal #25

Open pcwalton opened 3 years ago

pcwalton commented 3 years ago

Hi everyone,

I've got an initial redesign prototype here: https://github.com/pcwalton/turbowish-mocks

Screen Shot 2021-05-12 at 3 27 45 PM

The layout is done using the stretch implementation of flexbox, because I needed more power than the tui interface to Cassowary provided. Emphasis has been place on ease of use and discoverability, with the "obvious" keyboard focus and mouse intended to be supported. The design is responsive, in that it scales down to narrow 80-column terminals fine. The custom widgets are designed in a reusable way—when it's ready, I want to just be able to copy and paste this code in instead of rewriting it.

My next goals are:

Feedback is very welcome! This is early and I'm extremely open to suggestions and comments.

hawkw commented 3 years ago

This looks lovely! It would be great to start integrating this UI with the current implementation.

carllerche commented 3 years ago

This looks really amazing. I don't have any major feedback, just some questions.

It looks like it requires special fonts, which is fine. Have you thought of fallback?

Edit: amazing, not amazon.

pcwalton commented 3 years ago

Is the intent to be only a keyboard-based interface (I assume this is still TUI)?

Keyboard and optionally mouse.

What are the + signs to the left of task ID? It seems like it expands a node, what would happen then? How would it be triggered?

I was thinking that this would expand the attribute list to one per line below the task, in case the attributes are too long to fit on screen. Perhaps we could add other task info there too, like a stack trace or something. This would be especially useful for 80 column displays. I was assuming you could trigger it by going to the task and pressing right arrow, space, or Enter.

What are the arrows on the right of the "performance" box?

These would expand the performance pane so that the graphs are larger, again useful for 80-column displays. Maybe they'd be a 2x2 grid. The expanded performance pane would also be where more performance data goes if we add it.

When would one look at the date / time?

I dunno, I wouldn't find it useful, but I noticed that both top and bpytop had clocks at the top, so I added it. Maybe uptime of the binary would be more useful :)

How is the menu expanded?

Enter, Space, Escape (this is a global shortcut for the menu), or clicking on it. I was thinking it would either overlay the center of the app like bpytop's, or perhaps a sidebar. bpytop's ASCII art menu is a little too fancy for my taste and I think it should be simple.

It looks like it requires special fonts, which is fine. Have you thought of fallback?

Yep, fallback is a must, and I've designed it so that it looks good without powerline/nerd fonts. That'll be the next thing I work on.

pcwalton commented 3 years ago

I'm still working on this. Sorry it's been so slow.

hawkw commented 3 years ago

@pcwalton I've been working on bringing the current UI more in line with your proposal. Here's what I've got so far: image

hawkw commented 3 years ago

getting closer! image