liberapay.com icon indicating copy to clipboard operation
liberapay.com copied to clipboard

added public_name search function

Open biskwikman opened this issue 1 year ago • 5 comments

closes #2082

I basically mimicked the structure of the code for usernames, but pointed the new query to the public_name column of the participants table, it seems to work fine.

biskwikman avatar Jul 14 '22 16:07 biskwikman

Should we include the username and public name under the avatar on all search results from now on? I think it would help with any confusion if an account has a similar username and public name.

biskwikman avatar Jul 19 '22 16:07 biskwikman

Yes, both names should be displayed for all results.

Changaco avatar Jul 19 '22 16:07 Changaco

I've made it so the username and public name are returned in a single query, and both are displayed. I also added the index.

I'm not sure what word to use instead of "username" now. For example in the phrasing "Found a matching username". I was thinking of just using "user", but maybe "individual" would be more consistent.

biskwikman avatar Aug 14 '22 13:08 biskwikman

thanks for the suggestions. I just wanted to check, the tests will have to be updated for this, right? It looks like two are failing now.

biskwikman avatar Aug 25 '22 07:08 biskwikman

The tests aren't failing with the latest commit. I think GitHub is still showing earlier test results because there's currently a merge conflict (because #2177 hasn't been deployed yet, because I've been waiting for new machine and human translations (https://github.com/liberapay/salon/issues/520)).

Changaco avatar Aug 25 '22 09:08 Changaco