Page MenuHomePhabricator

many suggestion API calls in the new translation screen
Open, Needs TriagePublic

Description

while testing T283077 I noticed something weird:
Steps to reproduce
1-click on new translation
2-open the network tab on devtools
3-select another language from the language tabs
4-noticed the amount of calls being made in the network tab

image.png (1×2 px, 500 KB)

it seems it's calling the suggestions api (sometimes 40 times in a row) to get new suggestions but it's not showing anything on the list.
I understand that this happens because when we go back to the dashboard the language has changed and we have new suggestions but it seems unnecessary since the user can go through many languages and those calls are never used.
maybe we can:

  • only do the calls when we go back to the dashboard with the new selected language
  • avoid the calls all together and don't change the language in the dashboard

Event Timeline

Jpita renamed this task from many suggestion API calls being in the new translation screen to many suggestion API calls in the new translation screen.Jun 7 2021, 1:10 PM