After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759772 - chatView: Animate scroll when text is inserted
chatView: Animate scroll when text is inserted
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-22 11:24 UTC by Bastian Ilsø
Modified: 2015-12-22 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
chatView: Animate auto-scrolling to bottom (1.26 KB, patch)
2015-12-22 13:45 UTC, Florian Müllner
committed Details | Review

Description Bastian Ilsø 2015-12-22 11:24:43 UTC
What if the view smoothly scrolled to the bottom when new text is inserted?

Christian Hergert uploaded a video showing this in effect in Builder's terminal output pane: https://www.youtube.com/watch?v=m_l7KgD2uJQ


Something like that could be achieved if after each new inserted line, one does: 
gtk_text_view_scroll_mark_onscreen(textview, gtk_text_buffer_get_insert(buffer))


It's necessary to check that the view is at the bottom first, though.
Comment 1 Florian Müllner 2015-12-22 13:45:43 UTC
The following fix has been pushed:
65f9c8a chatView: Animate auto-scrolling to bottom
Comment 2 Florian Müllner 2015-12-22 13:45:50 UTC
Created attachment 317784 [details] [review]
chatView: Animate auto-scrolling to bottom

Unless the user is reading the backlog or there are unread highlights,
we jump to the bottom of the view on arrival of new messages. While
the jump is usually a single line, animations generally give transitions
a more natural feel, so move the cursor instead which allows GTK+ to
animate the transition.