Opened 7 years ago

Closed 7 years ago

#2351 closed defect (fixed)

Hippo CanvasText doesn't handle scroll multiline messages properly

Reported by: Zack Owned by: morgs
Priority: high Milestone: Update.1
Component: chat-activity Version:
Keywords: Cc: Zack, morgs, jg, AlbertCahalan
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: yes

Description

If a Chat message is sent that exceeds 1 line, then when the Chat bubbles reach the bottom of the screen, the bottom-most ones will be hidden. It is not possible to scroll down far enough to see what the most recent messages were.

Attachments (1)

chat.diff (1.1 KB) - added by marco 7 years ago.

Download all attachments as: .zip

Change History (32)

comment:1 in reply to: ↑ description Changed 7 years ago by Simon

  • Verified set

Was stumbling over the same problem - I think there is a problem in hippo.CanvasText when using the
hippo.CANVAS_SIZE_WRAP_WORD option with long text that wraps. Lines that
wraps are then truncated at the bottom of the canvas. With gtk.TextBuffer this problem does not arise. So I guess it has to be fixed in hippo.canvas.

comment:2 Changed 7 years ago by Zack

  • Verified unset

The 'verified' flag is for verifying that fixes are correct.

Maybe you meant 'Accept ticket' :)

comment:3 Changed 7 years ago by Simon

thought it means that I can reproduce the bug - but make sense the other way round :)

comment:4 Changed 7 years ago by jg

  • Milestone changed from Untriaged to Trial-3

Unless this is a simple obvious one line fix, we should wait for trial-3.

If it is, put it back in the untriaged state with the patch attached so I'll see it again.

comment:5 Changed 7 years ago by coderanger

Adding reporter to CC list

comment:6 Changed 7 years ago by coderanger

  • Cc Zack added

Adding reporter to CC list

comment:7 Changed 7 years ago by jg

  • Cc changed from , Zack to Zack

Really just doesn't scroll properly.

comment:8 Changed 7 years ago by morgs

  • Summary changed from Chat doesn't handle multiline messages properly to Chat doesn't handle scroll multiline messages properly

Changing from CanvasText to gtk.TextView fixes the scrolling, although it messes up the formatting. This suggests the problem is with CanvasText.

comment:9 Changed 7 years ago by morgs

  • Component changed from chat-activity to sugar
  • Owner changed from morgs to dcbw
  • Summary changed from Chat doesn't handle scroll multiline messages properly to Hippo CanvasText doesn't handle scroll multiline messages properly

comment:10 Changed 7 years ago by marco

  • Milestone changed from Trial-3 to First Deployment, V1.0

comment:11 Changed 7 years ago by morgs

  • Owner changed from dcbw to marco

Now it is scrolling too much - see #3648 which I will mark as a duplicate of this.

See https://dev.laptop.org/attachment/ticket/3648/3648-morgs.png for a screenshot.

comment:12 Changed 7 years ago by morgs

A report of it still not scrolling enough: #3923

comment:13 Changed 7 years ago by morgs

  • Cc morgs added

comment:14 Changed 7 years ago by bemasc

This is still happening; it renders Chat nearly unusable.

comment:15 Changed 7 years ago by marco

  • Keywords update.1? added

comment:16 Changed 7 years ago by morgs

Reported again: #4636

comment:17 Changed 7 years ago by morgs

  • Cc jg AlbertCahalan added

Replying to AlbertCahalan:

Every time I get a message, the window scrolls way past the end of the text. It's possible I triggered this by trying to use the arrow keys as I do in xchat. The other person I was chatting with had the problem as well; he solved it by repeatedly leaving and reentering the chat.

So with every message, I find myself staring at an empty white screen. I have to use the scrollbar to get back up. Then another message comes in, and I'm thrown back to that white screen again.

Reported again: #5054. We need to fix this for Update.1 if at all possible.

comment:18 follow-up: Changed 7 years ago by Eben

So, there are two problems here, both of which need to be fixed to make chat usable.

  1. The chat shouldn't, obviously, scroll up and off screen. Instead, it should place the most recent message directly above the input field, one line above, leaving the remaining space for previous messages to give context. Essentially, this means that it should automatically scroll to the bottom of the list with each message (once the "bottom" is properly defined, to rid us of the extra whitespace).
  1. The auto-scrolling should only happen when the scroll position of the window was at its maximum before a new message gets added. That is, If I scroll up a few lines to read something, new messages should not reset my scroll position to the bottom, making it impossible for me to catch up on or revisit past conversation. This is a fundamental that a lot of chat clients got wrong for a long long time. Let's not make that mistake.

comment:19 in reply to: ↑ 18 Changed 7 years ago by morgs

Replying to Eben:

So, there are two problems here, both of which need to be fixed to make chat usable.

  1. The chat shouldn't, obviously, scroll up and off screen. Instead, it should place the most recent message directly above the input field, one line above, leaving the remaining space for previous messages to give context. Essentially, this means that it should automatically scroll to the bottom of the list with each message (once the "bottom" is properly defined, to rid us of the extra whitespace).

This is the problem here, with hippocanvas.

Please can we have this considered for the Update.1 milestone? jg? It makes Chat quite unusable for more than one screenful of chatting. relnoting this issue won't help with usability...

The alternative is very intrusive changes to stop using hippocanvas for the layout - we would have to reimplement CanvasRoundBox in gtk for example.

  1. The auto-scrolling should only happen when the scroll position of the window was at its maximum before a new message gets added. That is, If I scroll up a few lines to read something, new messages should not reset my scroll position to the bottom, making it impossible for me to catch up on or revisit past conversation. This is a fundamental that a lot of chat clients got wrong for a long long time. Let's not make that mistake.

Good point. Logged as a new bug, #5160, against Chat.

comment:20 Changed 7 years ago by morgs

  • Milestone changed from Update.2 to Retriage, Please!

Please consider this for Update.1.

With no long lines that are wrapped, Chat's scrollbar starts to scroll too far down after a screenful or so. That will be somewhat mitigated with #5160. However the moment you enter a long line of text, it doesn't scroll far enough, meaning you can't see all of the latest message even when scrolled down to the fullest extent.

comment:21 Changed 7 years ago by jg

  • Keywords update.1? removed
  • Milestone changed from Retriage, Please! to Update.1
  • Priority changed from normal to high

comment:22 Changed 7 years ago by humptybump

FYI - with all of the G1G1 users now pounding on the activities, this one has become a very frequent point. if the children only have short chats with short messages, it will not be as obvious but the adults with the G1G1 XOs are typing a lot.

Please indicate is you need explicit test cases and I'll get them documented.

comment:23 Changed 7 years ago by jg

Marco, any chance on this one?

comment:24 Changed 7 years ago by marco

It should be fixable, it's matter to find the time to look at it :)

morgs, maybe you can provide me a testcase for this? It would save me some time.

Changed 7 years ago by marco

comment:25 Changed 7 years ago by marco

So, interaction between gtk scrollbars and the canvas is "interesting".

Looks like you can use hippo.CanvasScrollbars to get this to work correctly (something like the patch I attached).

comment:26 Changed 7 years ago by marco

  • Owner changed from marco to morgs

comment:27 Changed 7 years ago by marco

  • Component changed from sugar to chat-activity

comment:28 Changed 7 years ago by morgs

Thanks for the patch marco, works great.

comment:29 Changed 7 years ago by morgs

  • Status changed from new to assigned

Works in Joyride 1491.

comment:30 Changed 7 years ago by morgs

See #5814 for Update.1 inclusion request

comment:31 Changed 7 years ago by morgs

  • Resolution set to fixed
  • Status changed from assigned to closed
  • Verified set

Fixed in Update.1 673.

Note: See TracTickets for help on using tickets.