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 657945 - New design for link dialog
New design for link dialog
Status: RESOLVED FIXED
Product: gnome-contacts
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Erick Perez Castellanos
GNOME Contacts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-09-01 14:59 UTC by Alexander Larsson
Modified: 2012-01-24 10:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
git patch, with commit message (4.67 KB, patch)
2011-11-01 14:14 UTC, Erick Perez Castellanos
none Details | Review
New Link dialog patch. (7.06 KB, patch)
2012-01-23 20:31 UTC, Erick Perez Castellanos
none Details | Review

Description Alexander Larsson 2011-09-01 14:59:43 UTC
There is a new mockup for how the link dialog could look at:
http://gitorious.org/gnome-design/gnome-design/blobs/master/mockups/contacts/aday/linking2.png
Comment 1 Raul Gutierrez Segales 2011-09-08 10:55:43 UTC
Would also be nice if we could link by selecting contacts from the main Contact List and then -> More -> Link Selected Contacts.

I believe a common use case for this would be having:

Foo Bar (gmail)
Foo Bar (email)

next to each other on the list, so a quick way of linking them would be handy. Right-click & "Link these contacts" could work too.
Comment 2 Allan Day 2011-09-08 11:00:54 UTC
(In reply to comment #0)
> There is a new mockup for how the link dialog could look at:
> http://gitorious.org/gnome-design/gnome-design/blobs/master/mockups/contacts/aday/linking2.png

I've got some more work on this. We should talk before taking it forward.

(In reply to comment #1)
> Would also be nice if we could link by selecting contacts from the main Contact
> List and then -> More -> Link Selected Contacts.
> 
> I believe a common use case for this would be having:
> 
> Foo Bar (gmail)
> Foo Bar (email)
> 
> next to each other on the list, so a quick way of linking them would be handy.
> Right-click & "Link these contacts" could work too.

Multiple selections wouldn't really work in the current ui. Linking by drag and drop might be worth considering though.
Comment 3 Erick Perez Castellanos 2011-10-21 16:31:54 UTC
(In reply to comment #2)
> I've got some more work on this. We should talk before taking it forward.

> Multiple selections wouldn't really work in the current ui. Linking by drag and
> drop might be worth considering though.

I do think DnD would look better, although I've already tried like a thousands times to select a more than one contacts, for deleting them, or something else.
I could start to code the UI once get decided which is the behavior and the look of it. How do I contact you ?
Comment 4 Allan Day 2011-10-24 08:23:51 UTC
fyi - latest mockups are on Github (I'll be updating the wiki once they've stabilised):

https://github.com/gnome-design-team/gnome-mockups/tree/master/contacts

(In reply to comment #3)
> (In reply to comment #2)
> > I've got some more work on this. We should talk before taking it forward.
> 
> > Multiple selections wouldn't really work in the current ui. Linking by drag and
> > drop might be worth considering though.
> 
> I do think DnD would look better, although I've already tried like a thousands
> times to select a more than one contacts, for deleting them, or something else.

Oh interesting - that's good to know.

> I could start to code the UI once get decided which is the behavior and the
> look of it. How do I contact you ?

Email or irc - I'm aday, you can usually find me on #gnome-design.

Multiple selections are a pending design task. I'll try and look at it soon. Feel free to swing by IRC and say hi!
Comment 5 Erick Perez Castellanos 2011-11-01 14:14:51 UTC
Created attachment 200404 [details] [review]
git patch, with commit message

Well, here goes the patch for adding DnD over list pane rows for linking contacts.
Comment 6 Erick Perez Castellanos 2012-01-23 20:30:21 UTC
Here it is the patch for turning the Link dialog into the final mockups.
It include fixes to make the dialog work in both modes link-to-my-contacts and link-to-other-contacts.
Comment 7 Erick Perez Castellanos 2012-01-23 20:31:35 UTC
Created attachment 205921 [details] [review]
New Link dialog patch.
Comment 8 Alexander Larsson 2012-01-24 08:57:18 UTC
Review of attachment 205921 [details] [review]:

::: src/contacts-link-dialog.vala
@@ +67,3 @@
     persona_grid.attach (label, 1, 1, 1, 1);
 
+    int is_main = contact.is_main ? 1 : 0;

Its kinda weird to store an int in something named like a bool. Its probably easiest to just move the whole operation to the one place its used.

@@ +78,3 @@
+        foreach (var p in selected_contact.individual.personas) {
+            selected_contact_personas_iids += p.iid;
+            stdout.printf (" %s,\n", p.iid);

In general we don't use the stdout printf in gnome apps, but rather g_print, which does things like utf8-to-locale conversion. In this particular case we should just not print the ids though.

@@ +97,3 @@
+                  if (p.iid in selected_contact_personas_iids) {
+                    unlink_persona.begin (contact, p, (obj, result) => {
+                      unlink_persona.end (result);

Link/Unlink are somewhat destructive operations, as we need to e.g. add/remove actual email addresses to link stuff. So, link + unlink could end up changing the actual data. I think we need to be a bit more careful, and have the link operation return some kind of object describing the change such that we can undo it.
Comment 9 Alexander Larsson 2012-01-24 10:26:23 UTC
I pushed this with some minor cleanups and with a new undo implementation for the linking operations.