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 721415 - Design update for history dialog
Design update for history dialog
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: History
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-03 18:00 UTC by William Jon McCann
Modified: 2014-02-07 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Redesign the history dialog (76.78 KB, patch)
2014-01-03 18:00 UTC, William Jon McCann
none Details | Review
Make bookmark properties dialog modal (841 bytes, patch)
2014-01-03 18:00 UTC, William Jon McCann
committed Details | Review
Remove unused widgets (44.35 KB, patch)
2014-01-03 18:00 UTC, William Jon McCann
committed Details | Review
Redesign the history dialog (76.99 KB, patch)
2014-01-07 19:45 UTC, William Jon McCann
needs-work Details | Review
ephy-history-window: updates (3.43 KB, patch)
2014-02-04 20:05 UTC, Claudio Saavedra
none Details | Review
Redesign the history dialog (76.72 KB, patch)
2014-02-04 20:46 UTC, William Jon McCann
needs-work Details | Review
Redesign the history dialog (76.68 KB, patch)
2014-02-05 17:30 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2014-01-03 18:00:21 UTC
Here is a design update for the history dialog that more closely matches the
one used in the passwords and cookies dialogs.

This doesn't preclude us from adding history to the new overview but nice
to have an improved dialog in the meanwhile or even in addition to it.
Comment 1 William Jon McCann 2014-01-03 18:00:23 UTC
Created attachment 265237 [details] [review]
Redesign the history dialog
Comment 2 William Jon McCann 2014-01-03 18:00:26 UTC
Created attachment 265238 [details] [review]
Make bookmark properties dialog modal
Comment 3 William Jon McCann 2014-01-03 18:00:30 UTC
Created attachment 265239 [details] [review]
Remove unused widgets

After redesign of history dialog.
Comment 4 William Jon McCann 2014-01-03 20:09:45 UTC
*** Bug 699519 has been marked as a duplicate of this bug. ***
Comment 5 Yosef Or Boczko 2014-01-04 17:51:09 UTC
Great!

I see just one problem - it is very slow.
Maybe to add a back-forward buttons, same to the user-history
in gnome-control-center?
Comment 6 Yosef Or Boczko 2014-01-04 17:52:29 UTC
Btw, I see some warning, and also crashes:
(epiphany:10645): Gtk-CRITICAL **: _gtk_tree_view_column_autosize: assertion 'GTK_IS_TREE_VIEW (tree_view)' failed

(epiphany:20996): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(epiphany:20996): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Crashes:
(epiphany:10573): Gtk-CRITICAL **: _gtk_tree_view_column_autosize: assertion 'GTK_IS_TREE_VIEW (tree_view)' failed
Segmentation fault (core dumped)
Comment 7 Claudio Saavedra 2014-01-06 13:28:14 UTC
Review of attachment 265237 [details] [review]:

::: src/ephy-history-window.c
@@ +142,3 @@
+	substrings = substrings_filter (self);
+
+}

It is very slow, as Yosef pointed out. We might not want to do this in one pass -- perhaps first filter the history for the last month and when that's done, do the rest? Some kind of partial fetching until there is nothing left to add.
Comment 8 William Jon McCann 2014-01-07 19:45:10 UTC
Created attachment 265566 [details] [review]
Redesign the history dialog
Comment 9 William Jon McCann 2014-01-13 17:59:44 UTC
ping? :)
Comment 10 camille 2014-01-21 20:22:08 UTC
By the way, there is a $250 bounty open on this issue: https://www.bountysource.com/issues/1372360-design-update-for-history-dialog
Comment 11 Adam Dingle 2014-01-21 20:50:44 UTC
To be more exact, that bounty was created on bug 699519 (sort history entries by title/address/date), which was marked as a duplicate of this one so the bounty transferred over.  I'll be happy to pay out the bounty if this new design allows history entries to be sorted on all those fields.
Comment 12 Claudio Saavedra 2014-02-04 20:04:10 UTC
Review of attachment 265566 [details] [review]:

Partial review. Needs update, but I'll provide an initial patch you can apply on top of this one.

::: src/ephy-history-window.c
@@ +38,3 @@
 #include <time.h>
 
+#define NUM_RESULTS_LIMIT 500

We don't need to limit this if we remove the model sort (which we should).

@@ +149,3 @@
+					NUM_RESULTS_LIMIT, 0,
+					substrings, self->priv->cancellable,
+static GList *

I'm modifying this method so that you can pass the desired sorting method to the service.

@@ +730,2 @@
+	gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (self->priv->liststore), 0,
+					      GTK_SORT_DESCENDING);

This can go away. We should ask the history service to sort the results as we would like, so that sqlite does it internally.

::: src/resources/history-dialog.ui
@@ +15,3 @@
+  <object class="GtkTreeModelSort" id="treemodelsort">
+    <property name="model">liststore</property>
+  </object>

This makes the dialog terribly slow. Please remove the model sort.
Comment 13 Claudio Saavedra 2014-02-04 20:05:43 UTC
Created attachment 268091 [details] [review]
ephy-history-window: updates

Feel free to squeeze this into your patch
Comment 14 William Jon McCann 2014-02-04 20:46:22 UTC
Created attachment 268097 [details] [review]
Redesign the history dialog

Squashed and rebased
Comment 15 Claudio Saavedra 2014-02-04 22:56:19 UTC
Review of attachment 268097 [details] [review]:

A few other comments.

::: src/ephy-history-window.c
@@ +129,3 @@
+		substrings = g_list_prepend (substrings, *p++);
+	};
+	if (success != TRUE)

I think the order of the strings is irrelevant, so this you could remove.

@@ +673,3 @@
 	}
 
+	gtk_widget_destroy (GTK_WIDGET (self));

I'm getting crashers when closing this dialog, irregularly. I suspect that something goes wrong because of destroying the dialog in a handler to a signal of the dialog itself.
Comment 16 Claudio Saavedra 2014-02-04 22:56:41 UTC
Review of attachment 265238 [details] [review]:

OK
Comment 17 Claudio Saavedra 2014-02-04 22:57:01 UTC
Review of attachment 265239 [details] [review]:

OK
Comment 18 William Jon McCann 2014-02-05 17:30:06 UTC
Created attachment 268194 [details] [review]
Redesign the history dialog
Comment 19 William Jon McCann 2014-02-05 17:31:33 UTC
(In reply to comment #15)
> I think the order of the strings is irrelevant, so this you could remove.

OK

> @@ +673,3 @@
>      }
> 
> +    gtk_widget_destroy (GTK_WIDGET (self));
> 
> I'm getting crashers when closing this dialog, irregularly. I suspect that
> something goes wrong because of destroying the dialog in a handler to a signal
> of the dialog itself.

We do that all the time though. I'm not seeing the crash can you get a backtrace?
Comment 20 Claudio Saavedra 2014-02-05 21:11:19 UTC
> We do that all the time though. I'm not seeing the crash can you get a
> backtrace?

Unsurprisingly enough I can't reproduce it now and I lost the stacktrace. But I do remember it was send_delete_event () in gtkwindow.c calling gtk_widget_get_window () with a pointer that was not a window anymore. My guess is that the dialog might be triggering the gtk_window_close() call that schedules send_delete_event() after the gtk_widget_destroy() has been called on the it, but well, it doesn't seem to happen reliably :/
Comment 21 Claudio Saavedra 2014-02-05 21:11:47 UTC
btw, escape is not closing the dialog.
Comment 22 Claudio Saavedra 2014-02-05 21:12:16 UTC
Now it crashed:

  • #0 gtk_widget_get_window
    at gtkwidget.c line 15099
  • #1 send_delete_event
    at gtkwindow.c line 1298
  • #2 gdk_threads_dispatch
    at gdk.c line 809
  • #3 g_idle_dispatch
    at gmain.c line 5280
  • #4 g_main_dispatch
    at gmain.c line 3065
  • #5 g_main_context_dispatch
    at gmain.c line 3640
  • #6 g_main_context_iterate
    at gmain.c line 3711
  • #7 g_main_context_iteration
    at gmain.c line 3772
  • #8 g_application_run
    at gapplication.c line 1695
  • #9 main
    at ephy-main.c line 488

Comment 23 William Jon McCann 2014-02-06 17:40:34 UTC
Attachment 265238 [details] pushed as 2d77a8e - Make bookmark properties dialog modal
Attachment 265239 [details] pushed as bd6dd7c - Remove unused widgets
Attachment 268194 [details] pushed as 865db79 - Redesign the history dialog
Comment 24 Adam Dingle 2014-02-07 12:51:59 UTC
The new history dialog looks nice.  Currently it allows sorting history entries by date or name (i.e. page title).  Could we also enable sorting by location (i.e. URL)?  It seems arbitrary to disallow this, and it could be useful if I want to see a list of domains I've visited or a list of URLs on a particular site.
Comment 25 William Jon McCann 2014-02-07 13:25:36 UTC
Please file new or additional issues as new bugs.
Comment 26 Claudio Saavedra 2014-02-07 13:31:27 UTC
Actually, I am going to remove sorting by page title, because it is currently implemented by running a sorting algorithm at the model and that's very inefficient and it locks the UI for several seconds for large history. The proper way to do this would be to get the history already sorted from the history backend in the way desired. File a new bug and we can discuss that.
Comment 27 Adam Dingle 2014-02-07 14:04:01 UTC
OK - I'll simply reopen bug 699519 (sort history entries by title/address/date), which was previously marked as a duplicate of this one.