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 765516 - Use GTK+ widgets to display individual emails, rather than WebKitGTK
Use GTK+ widgets to display individual emails, rather than WebKitGTK
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: client
master
Other Linux
: Normal normal
: 0.12.0
Assigned To: Michael Gratton
Geary Maintainers
Depends on: 764812
Blocks: 712856 712875 712938 713129 713196 713343 713474 713547 713849 713976 713998 714002 714009 714015 714065 714078 714097 714129 714314 714377 714413 714430 714908 714912 720920 724270 724841 725199 725312 726100 geary-wk2 737989 738181 738182 742944 744440 744506 748650 750075 766274 766275 766276 766277 770886 771642 772748 772752 772763 772951 773054 773132 773517
 
 
Reported: 2016-04-25 06:56 UTC by Michael Gratton
Modified: 2017-02-16 07:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace after gtk warning (17.74 KB, text/plain)
2016-10-08 18:58 UTC, Gautier Pelloux-Prayer
Details
attachment tooltip not readable (15.72 KB, image/png)
2016-10-20 09:54 UTC, Federico Bruni
Details

Description Michael Gratton 2016-04-25 06:56:01 UTC
Currently, ConversationViewer displays all messages in the selected conversation in a single WebKit.WebView instance. This requires a large number of hooks between viewer and the web view to manage user interaction just as saving attachments, handling popup menus, and so on.

Since we want to port to the WebKit2 API (Bug 728002) and since its multi-process model means we would need a large DBus API to deal with all of this (if it is even possible), switch Geary to use GTK+ widgets to display message chrome (headers, attachments, etc). This means using an individual WebView widget for each RFC 822 message body displayed, and should help the DBus API for the WebKit2 port as minimial as possible.
Comment 1 Michael Gratton 2016-05-13 02:18:44 UTC
Just pushed WIP to git.gnome.org as branch wip/765516-gtk-widget-conversation-viewer. Making good progress - most functionality is is place, needs a fair bit of polish however.
Comment 2 Michael Gratton 2016-10-04 07:10:51 UTC
I'm planning on landing this soon for user feedback and so work on Bug 728002 can start.

This will introduce some regressions that were not worth fixing until Geary has been ported to WebKit2. I have noted these on Bug 728002 and they will be fixed as part of that work.

There's a number of smaller issues/polish that could still be addressed however, these are listed below. I'll look into fixing them maybe as part of the bug above, or else will open new bugs for them. If you find any to be particularly important, or find any related issues not reported here or in Bug 728002, please feel free to comment on them here. Also feel free to attach patches with fixes. :)

 * Conversations:
   - Move/Label should not be enabled in search folder
   - Use animated OSD popup for link-rollover instead of tooltips
   - Flag manual-unread as well as manual-read
   - Make auto-mark-read not touch manually-marked-unread messages
   - Make auto-mark-read less keen

 * Design:
   - Bring back the conversation accordion — maybe?
   - Add revealer/scrollbar/etc when there's lots of recipients
   - Improve the attachments box
   - Show subject better somehow — Use headers in Conversation ListBox? 
   - Indicate how close to being auto-marked-read a message is?
   - Infobars too wide for narrow screens w/o ellipsiing, provide tooltips?

 * Search/Find
   - Highlight search terms that include operators, e.g. "from:foo"
   - Empty search placholder appearing when there were search results,
     but then the search changed and so less were found
Comment 3 Michael Gratton 2016-10-07 12:22:08 UTC
This has been pushed to master as 898fa33.

If you encounter any issues that aren't listed above, or in Bug 728002, please mention them here.
Comment 4 Gautier Pelloux-Prayer 2016-10-07 13:52:04 UTC
Some emails cannot be unfolded from conversation, they appear as a 1px wide blank line instead. In terminal output, getting a lot of related warnings:

> (geary:23078): Gtk-WARNING **: ConversationWebView 0x2bab280: widget tried to gtk_widget_get_height inside  GtkWidget     ::get_height implementation. Should just invoke GTK_WIDGET_GET_CLASS(widget)->get_height directly rather than using gtk_widget_get_height

Using gtk 3.21.6 and current master 898fa33.
Comment 5 Michael Gratton 2016-10-08 10:50:05 UTC
(In reply to Gautier Pelloux-Prayer from comment #4)
> Some emails cannot be unfolded from conversation, they appear as a 1px wide
> blank line instead. In terminal output, getting a lot of related warnings:
> 
> > (geary:23078): Gtk-WARNING **: ConversationWebView 0x2bab280: widget tried to gtk_widget_get_height inside  GtkWidget     ::get_height implementation. Should just invoke GTK_WIDGET_GET_CLASS(widget)->get_height directly rather than using gtk_widget_get_height
> 
> Using gtk 3.21.6 and current master 898fa33.

I've pushed a patch to master that may fix this issue: 06d799e - Gautier can you try that out and let me know if it does?

If not, getting a stack trace at the point of the warning would be useful. The following command will cause a segfault when any Gtk-WARNING is issued. When the one above occurs again gdb will catch it and you can just get a backtrace as normal.

> G_DEBUG=fatal-warnings gdb -path/to/geary -d
Comment 6 Gautier Pelloux-Prayer 2016-10-08 18:58:12 UTC
Created attachment 337250 [details]
backtrace after gtk warning

Unfortunately the issue is still there. Please find the stacktrace attached.
Comment 7 Federico Bruni 2016-10-11 12:13:16 UTC
I noticed that sometimes, when a conversation has several messages and some of them are unread, if I select the conversation it jumps to _the end_ of the first unread message. So I have to scroll up a bit to read the new message from the beginning.

It happened 3 or 4 times since master switched to GTK+.
Comment 8 Federico Bruni 2016-10-20 09:53:50 UTC
I noticed that sometimes, if the attachments are at the bottom of the window, the tooltip pops up on the bottom (instead of on top of the attachment), so you cannot read it.

See attached screenshot
Comment 9 Federico Bruni 2016-10-20 09:54:53 UTC
Created attachment 338089 [details]
attachment tooltip not readable
Comment 10 Michael Gratton 2016-10-21 23:08:42 UTC
Hey Federico,

(In reply to Federico Bruni from comment #7)
> I noticed that sometimes, when a conversation has several messages and some
> of them are unread, if I select the conversation it jumps to _the end_ of
> the first unread message. So I have to scroll up a bit to read the new
> message from the beginning.
> 
> It happened 3 or 4 times since master switched to GTK+.

Thanks for pointing that out - I've pushed commit 3b33f58 which should fix it, let me know if you see it happening again.

(In reply to Federico Bruni from comment #8)
> I noticed that sometimes, if the attachments are at the bottom of the
> window, the tooltip pops up on the bottom (instead of on top of the
> attachment), so you cannot read it.

I can't reproduce this using current Geary master and GTK+ 3.22. What part of the button is your mouse hovering over at the time? In any case this is probably a GTK+ issue since Geary is using the standard tooltip implementation for those buttons.
Comment 11 Michael Gratton 2016-10-21 23:13:16 UTC
Hey Gautier,

(In reply to Gautier Pelloux-Prayer from comment #6)
> Created attachment 337250 [details]
> backtrace after gtk warning
> 
> Unfortunately the issue is still there. Please find the stacktrace attached.

Thanks for the stack. I'm now on 3.22 and I still aren't getting those warnings however, and I don't know how I can solve it without re-introducing "How does the code know the size to allocate?" warnings that were introduced in GTK 3.20.

I think I know what the 1px message body bug is however - do these message bodies suddenly appear if you resize the window?
Comment 12 Michael Gratton 2016-10-22 07:26:13 UTC
Save All Attachments button not working fixed in commit da9f0ad, just pushed to master.
Comment 13 Federico Bruni 2016-10-24 16:00:21 UTC
(In reply to Michael Gratton from comment #10)
 
> (In reply to Federico Bruni from comment #8)
> > I noticed that sometimes, if the attachments are at the bottom of the
> > window, the tooltip pops up on the bottom (instead of on top of the
> > attachment), so you cannot read it.
> 
> I can't reproduce this using current Geary master and GTK+ 3.22. What part
> of the button is your mouse hovering over at the time? In any case this is
> probably a GTK+ issue since Geary is using the standard tooltip
> implementation for those buttons.

It happens when I hover over either "Open selected item" or "Save selected item".
In order to trigger the error, I must scroll the message all the way down until I see the bottom grey margin below open and save icons.
Comment 14 Federico Bruni 2016-10-24 16:03:53 UTC
Another bug I've just found (I'm not sure if it's related with this issue):
the attachment icon in conversation list is not present anymore.

It was useful when scanning the conversation list to find quickly a message with attachment (as we don't have yet an 'has:attachment' search operator).
Comment 15 Michael Gratton 2017-02-01 00:34:13 UTC
Closing this as fixed. I'll open new bugs for the issues mentioned above and make them depend on this one, please do the same if you find any other outstanding issues or regressions from this.