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

Make status message expandable to show more detail #1496

Closed
hannobraun opened this issue Jan 10, 2023 · 1 comment
Closed

Make status message expandable to show more detail #1496

hannobraun opened this issue Jan 10, 2023 · 1 comment
Labels
type: feature New features and improvements to existing features

Comments

@hannobraun
Copy link
Owner

The Fornjot app displays status messages, to show what's currently happening with the model.

Screenshot from 2023-01-10 12-08-15

These status message provide a high-level overview, but there's more detail going on behind the scenes. Not showing this detail can be confusing. For example, when loading a model for the first time, it can take longer than expected, as the model's dependencies need to be compiled first.

At the same time, showing all the detail would be overwhelming. So I've come up with the following idea to address this:

  • Add a UI element to the left of each status message that allows you to expand that status message, to see more detail.
  • I often see triangles to represent such UI messages, with the triangle pointing to the right while the element is not expanded, then down once it is expanded. But such details don't matter for an initial implementation. If egui already offers something like this, we can just use it.
  • If a status message is expanded, it shouldn't scroll out of sight because too many details are displayed. It should always stay visible, to always make it clear to which message the currently displayed details belong, and to always make it possible to un-expand the details.
  • I think the way to achieve that, would be to display the expanded details in a scrollable UI element that has a constant size.
  • We might consider to automatically expand the latest message, and automatically un-expand it, once the next message is displayed. But this is a detail that can be left for further iteration.
  • Initially, the only details displayed in this way could the the output from Cargo when compiling a model.

I haven't looked into implementing this, but off the top of my head, this is what would need to happen:

  • Status messages are stored in the StatusReport struct. This needs to be expanded, to support the new capabilities.
  • StatusReport is accessed from Gui to be displayed. The new UI would need to be implemented there.
  • StatusReport is stored in EventLoopHandler and updated by its methods, based on the events they receive.
  • StatusReport is mostly updated based on a custom event fed into the event loop by HostThread. The event type is ModelEvent.
  • HostThread and the APIs it calls would have to be expanded as necessary to capture the Cargo output (and later, other details). ModelEvent would have to be expanded to carry the new information into the event loop.

I hope this helps a bit. If you're interested in implementing this but have further questions, feel free to ask!

@hannobraun hannobraun added type: feature New features and improvements to existing features topic: host labels Jan 10, 2023
@hannobraun hannobraun added this to the Basic Usability milestone Jan 10, 2023
@hannobraun
Copy link
Owner Author

This issue is no longer applicable. The affected code has been removed. See A New Direction for context.

@hannobraun hannobraun closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New features and improvements to existing features
Projects
None yet
Development

No branches or pull requests

1 participant