[PATCH 4 of 4] autocomplete: consistently show 'username (Full Name)'
mads at kiilerich.com
Wed Jun 24 11:45:23 EDT 2015
On 06/24/2015 05:15 PM, Thomas De Schampheleire wrote:
> On June 23, 2015 10:00:00 PM CEST, Thomas De Schampheleire <patrickdepinguin at gmail.com> wrote:
>> # HG changeset patch
>> # User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
>> # Date 1435088059 -7200
>> # Tue Jun 23 21:34:19 2015 +0200
>> # Node ID 08fff816a576b4a6a70499d2d40e8ee516db83d4
>> # Parent b609779e357e262092c323bc63eebd569e9e1f36
>> autocomplete: consistently show 'username (Full Name)'
>> There are three user-related autocompletion paths: members (when
>> permissions), mentions (in comments), reviewers (in pull requests).
>> The pop-ups shown when autocompleting would show
>> 'Full Name (username)'
>> unlike the way Kallithea normally handles such strings:
>> 'username (Full Name)'
>> Hence, line up the autocomplete code to use the same format.
>> Note: there is a lot of duplication in this autocomplete code, to be
> To be clear, I already started this deduplication...
Quite related, these patches remind me how wrong it is that we have
'firstname' and 'lastname' in the database without having a clear and
working mapping from that to "given name" and "family name". We should
probably take a first step of fixing that by hiding firstname + lastname
behind a fullname getter in db.py .
> (08:12:23 PM) patrickdp: kiilerix2: other question:
> User.username_and_name currently shows 'username (First Last)', would
> you be opposed to turning it around to: 'First Last (username)' ?
Yes, please. I'm all for consistency, but consistency in the direction
of this patch 4/4 looked too wrong.
I applied a patch for that on top of your patches on our local instance.
I guess it will conflict with your cleanup, but it will also be nice to
go more directly towards where we want to be insted of taking detours;
this patch seems to be a bit in the wrong direction.
More information about the kallithea-general