GNOME Bugzilla – Bug 756060
Hyperlink / URL dialog should be a GTK Popover widget and make better use of screen space
Last modified: 2021-05-19 11:46:07 UTC
Currently, selecting some text and clicking the hyperlink button makes a traditional GTK dialog window show up. Besides the fact that it feels a bit clunky, with full animation by GNOME Shell etc., it is always obscuring my view, and it's just… huge. I like seeing the text that I'm hyperlinking in its full context (inside the sentence/paragraph) so currently I always end up having to move the window around. I think it could feel much better integrated if we used https://developer.gnome.org/gtk3/stable/GtkPopover.html It could point to the text being hyperlinked in the composer canvas, or be attached to the hyperlink button in the toolbar.
The relevant code is src/e-util/e-html-editor-link-dialog.c Today I was about to file a new bug report saying that this dialog is currently modal and transient to the parent (composer) window and that it should be GDK_WINDOW_TYPE_HINT_DIALOG instead of GDK_WINDOW_TYPE_HINT_NORMAL, so that at least GNOME Shell sets the proper visual cues (such as obscuring the composer when that modial dialog is active) ...and then remembered that a GtkPopover, emanating from the link button and showing "above" (north) of it would be much better anyway, because you wouldn't get all the useless window decoration (titlebar and X button) and obscuring of contents... Some more things to fix, whether in the dialog or the Popover implementation: - Labels have "gtk_label_set_justify (GTK_LABEL (widget), GTK_JUSTIFY_RIGHT);" ...but it doesn't work, because they actually need halign = GTK_ALIGN_END - The URL GtkEntry widget would need to have the "expand" property set to TRUE, otherwise the grid doesn't expand to fill to the margin to the right so things look de-centered and there is no space for the URL anyway - The URL GtkEntry widget would need to have the "width-chars" prop set to 50 This lets the dialog have a better default width, makes URL editing easier (Still fits 800x600 screens, nearly 640x480 screens, if you care for that ;)
Created attachment 368875 [details] screenshots from Geary's implementation For what it's worth, here's how it looks and behaves like in Geary's WebkitGtk composer. Not saying you need to do exactly like that (if Evolution's users really really need the "Description"/link-text field), but it's interesting to look at nonetheless. Notes: - Their hyperlink button only becomes sensitive if your cursor is in the middle of an existing hyperlink, or if you have text selected to hyperlink. This is why they can get away with not having a "Description" field (like most hyperlinking UIs we see out there these days). - They run basic link syntax checks too
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines and create a new enhancement request ticket at https://gitlab.gnome.org/GNOME/evolution/-/issues/ Thank you for your understanding and your help.