pontoon icon indicating copy to clipboard operation
pontoon copied to clipboard

@user search result in Comment field limited to 5 results only

Open peiying2 opened this issue 3 years ago • 2 comments

When responding to a comment, @user search result is limited to only 5 people when there could be a lot more. Michael is a very common contributor name and you may never find the right person in the drop-down list.

Workaround appears to be searching by last name, and you have better luck in finding the person you are looking for.

peiying2 avatar Jun 14 '22 20:06 peiying2

The list of results will need to remain limited, because we might have too many matches. GitHub here also seems to only show 5 matches.

Looking at this example, we should improve sorting: Screenshot 2022-06-14 at 17 38 50

mathjazz avatar Jun 14 '22 21:06 mathjazz

We should rethink the back-end for this. At the moment, on pontoon.mozilla.org we're fetching 780 kB compresed / 2.85MB raw data from /get-users/ during/after the translate view's initial load, and then only using it for @-completion when adding a comment. This is... sub-optimal.

As an alternative, we could/should add query parameters to the API endpoint and only call it when actively doing @-completion, which would allow us to filter and prioritise the list according to the current locale, project and even entity. This might add a negligible delay to the dialog when editing, but would also cut 35% from Pontoon's transferred filesize.

eemeli avatar Jul 31 '22 13:07 eemeli