Re: [Evolution-hackers] custom labels

2014-05-26 Thread Patrick Ohly
On Mon, 2014-05-26 at 07:38 +0200, Milan Crha wrote:
 On Sun, 2014-05-25 at 21:41 +0200, Patrick Ohly wrote:
  Instead if just the pre-defined Work, Home, Other, etc., the user
  can also enter arbitrary text. For example, instead of Other Tel: foo
  the user can enter Vacation Tel: bar for a telephone number that is to
  be used when that contact is in his vacation home.
  
  It's even more important for dates. There might be a lot more dates to
  be stored than just birthday and anniversary, so a repeating X-ABDate
  property is used with custom labels to allow that. Same for related
  persons.
 
   Hi,
 aha, I see, so it's more like TYPE parameter, with more fine-grained
 values. Would it be too complicated to use TYPE instead?

So you mean something like TYPE=X-user entered string? The problem
would be to distinguish between X-FOOBAR as a TYPE extensions and
X-FOOBAR as user entered text.

X-ABLabel avoids that by introducing a new parameter.

 It'll be
 slightly complicated for evolution's UI, but probably easier than
 dealing with it in a separate widget.

I'm not sure whether this is easier for the UI. The whole EContact API
deals poorly with arbitrary number of repeating properties. For some
properties one can iterate over all of them (E_CONTACT_TEL), for others
one can't (E_CONTACT_ADDRESS is documented as a single EContactAddress?
Might be a documentation bug).

For IM information it's definitely not possible to access arbitrary chat
handles; the API only supports those for which a
E_CONTACT_ADDRESS_service exists.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] custom labels

2014-05-26 Thread Milan Crha
On Mon, 2014-05-26 at 16:30 +0200, Patrick Ohly wrote:
 So you mean something like TYPE=X-user entered string? The problem
 would be to distinguish between X-FOOBAR as a TYPE extensions and
 X-FOOBAR as user entered text.
 
 X-ABLabel avoids that by introducing a new parameter.

Hi,
it seemed more natural to use the TYPE, because it is what it is (or
sounds to be). With an extra parameter you can have:

   TEL:Type=Work;X-ABLabel=Home:1234560789

My idea of UI change in the Contact editor was to allow entering any
value in the combo which currently consists of Work, Home,
Other (for emails; phone numbers have many more values). The combo
selection influences the TYPE parameter.

Anyway, I'm fine with a split too, this was only an idea. The split
might not be a big issue for Evolution.
Bye,
Milan

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] custom labels

2014-05-25 Thread Patrick Ohly
On Fri, 2014-05-23 at 15:58 +0200, Milan Crha wrote:
 On Fri, 2014-05-23 at 14:56 +0200, Patrick Ohly wrote:
  I went ahead with the X-ABLabel as parameter approach.
 
   Hi,
 I'm sorry you didn't get any answer for this thread. I always forgot of
 it, also due to not having much opinion on the subject.
 
 I still do not fully understand what are the custom labels for. Is it a
 per-attribute property or a per-contact property? It feels like
 categories, if the later. What are the labels used for in UI?

Instead if just the pre-defined Work, Home, Other, etc., the user
can also enter arbitrary text. For example, instead of Other Tel: foo
the user can enter Vacation Tel: bar for a telephone number that is to
be used when that contact is in his vacation home.

It's even more important for dates. There might be a lot more dates to
be stored than just birthday and anniversary, so a repeating X-ABDate
property is used with custom labels to allow that. Same for related
persons.

Bye, Patrick

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] custom labels

2014-05-25 Thread Milan Crha
On Sun, 2014-05-25 at 21:41 +0200, Patrick Ohly wrote:
 Instead if just the pre-defined Work, Home, Other, etc., the user
 can also enter arbitrary text. For example, instead of Other Tel: foo
 the user can enter Vacation Tel: bar for a telephone number that is to
 be used when that contact is in his vacation home.
 
 It's even more important for dates. There might be a lot more dates to
 be stored than just birthday and anniversary, so a repeating X-ABDate
 property is used with custom labels to allow that. Same for related
 persons.

Hi,
aha, I see, so it's more like TYPE parameter, with more fine-grained
values. Would it be too complicated to use TYPE instead? It'll be
slightly complicated for evolution's UI, but probably easier than
dealing with it in a separate widget.
Bye,
Milan

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] custom labels

2014-05-23 Thread Milan Crha
On Fri, 2014-05-23 at 14:56 +0200, Patrick Ohly wrote:
 I went ahead with the X-ABLabel as parameter approach.

Hi,
I'm sorry you didn't get any answer for this thread. I always forgot of
it, also due to not having much opinion on the subject.

I still do not fully understand what are the custom labels for. Is it a
per-attribute property or a per-contact property? It feels like
categories, if the later. What are the labels used for in UI?

 As mentioned before, Evolution currently drops the parameter extension.
 I've created a bug for that:
 https://bugzilla.gnome.org/show_bug.cgi?id=730636

Thanks, I'll CC there myself.
Bye,
Milan

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] custom labels

2014-05-02 Thread Patrick Ohly
On Fri, 2014-04-11 at 12:18 +0200, Patrick Ohly wrote:
 Hello!
 
 Both Google and Apple support custom labels for basically all of a
 contacts properties (telephone, email, address, instant messaging, etc).
 They use group tags to associate the extra label with the property:
 
 item4.ADR:;;custom address
 item4.X-ABLabel:custom-label
 
 Does anyone have suggestions for how this could and/or should be handled
 by EDS and Evolution?
 
 Obviously the Evolution UI would need to be modified to actually show
 the information. As a first step I would already be happy if the
 information didn't get lost during a import/edit/export cycle.
 
 I tried grouping, but when editing the field (an EMAIL in my test) its
 group tag was removed, thus breaking the connection to the custom label.
 After editing in Evolution:
 
 item1.X-ABLabel:foobar
 EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:email value modified
 
 I also tried a custom parameter, but that also got lost:
 
 EMAIL;X-ABLabel=foobar;X-EVOLUTION-UI-SLOT=1;TYPE=WORK:email value
 -
 EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:email value modified
 
 I tried this with Evolution 3.4 (the one shipped with my current
 desktop, Debian Stable). Has perhaps anything been done regarding this
 in later versions?
 
 I am undecided about what EDS and Evolution should use internally to
 represent custom labels. I lean towards a custom parameter because
 although grouping is supported by EVCard, it hasn't been really used,
 has it? The concept of fields of interest would still work if the
 field also has the custom label as parameter (not that we have special
 support for anything other than UID and REV, but at least conceptually
 something else could also be supported).

The custom parameter has one major drawback: it cannot store arbitrary
string values. Line breaks and double quotes are not possible. The EDS
vCard parser is also slightly broken and fails for

X-ABRELATEDNAMES;X-ABLabel=domestic partner:domestic partner

A space without quoting is valid according to
http://tools.ietf.org/html/rfc2425#page-5 but e-vcard.c complains
invalid character found in parameter spec and proceeds at the next
line.

 On the other hand, deviating from the format of the peers will make
 interoperability harder. I'm not sure yet how I would do the conversion
 in SyncEvolution between X-ABLabel as parameter and X-ABLabel as
 property with group. Importing/exporting vCards manually also is
 affected by the choice of the internal format.

Even if we used X-ABLabel + grouping, directly exchanging vCards with
Apple will still not work properly due to the X-JABBER/AIM/... vs IMPP
difference. Further work would be needed either way. I have not tested
whether Apple understands X-AIM/JABBER/... instead of IMPP.

I'm still undecided. A too complex X-ABLabel property value could be
simplified to store it in a X-ABLabel parameter, but that'll drop user
data.

At this point it really would be good to get feedback from others. Is
using groups going to be possible with EContact and Evolution or are we
forced to use the simpler parameter approach, despite its limitations?

Bye, Patrick

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers