liberapay.com
liberapay.com copied to clipboard
added public_name search function
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.
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.
Yes, both names should be displayed for all results.
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.
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.
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)).