-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix: log messages to the bottom of the output window instead of the top #946
fix: log messages to the bottom of the output window instead of the top #946
Conversation
A separate issue is that scrolling to the bottom of the output is not automatic. There is not currently a fix for that though. And it is a noted desired feature/milestone by the ipywidgets devs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can test, this definitely solves the issue. However, something that was un-noticeable before is that if you have scrolled down the log, and then do something that prints output to the log (such as making a new figure), the log "refreshes" and automatically moves its position back up to the top. We probably never noticed it before since it was printing new messages to the top location itself. Hopefully, if we can ever get auto-scroll working, that will solve this annoyance. (That said, this is only an annoyance, not a bug, so I won't make a thing of it). Thanks George!
Can we hold off on merging this? I think we should discuss whether it's better to print to the top or bottom in general. The log isn't useful now as it stands because while information should be printed to the bottom, it doesn't autoscroll to the bottom. It seems like there isn't an easy solution to autoscroll / pin to the bottom, so we may actually want to print new info to the top so users actually see it |
Keep in mind that there are two message types going to the output at the moment. 1) Statements (usually I'm not quite sure what the fix would be to make (1) print in the reverse order. One solution would be to switch everything to logging statements (2) so all messages come in the same format and we know how to reverse the order. See the ipywidgets docs on integrating output widgets with the logging module to get a sense about how logger is set up with the GUI's output widget. |
GUIs typically don't come with an output log ... it's worth asking what purpose the log serves. Do you actually need the user to see the entire history? Maybe you can overwrite the log with every operation so the user sees what just happened. If the history is indeed needed for debugging, the user can refer to the output on the terminal. This way you avoid feature creep ... |
I agree, refreshing the output per operation could be a good idea. I feel like the output window mostly serves as a way to tell if an operation is still running (long operations like simulations) and confirmation that an operation has finished (File IO, plotting)--in lieu of having something like a progress bar or other messaging system. |
Prints log messages to the bottom of the output instead of the top.