Info about selected page on "New translation" dialog isn't reset when dialog is discarded. This is especially noticeable on slower, mobile networks. Motion picture below shows following scenario:
- Page is selected from the "Recently edited by you" list. Before selection, item displays number of languages (19) and there is no "Missing is српски" label, so we have information that page already exists in target wiki.
- When page is selected, API calls are made to get following info - number of languages, number of views in last week and "already exists" message. Number of languages should be reusable, "already exists" info may be reusable, but depends how much info we need to display inside that message (like link to target page). The information that we don't have is number of views in last week and ideally that is only call we make, rest we reuse.
- Selected page is discarded.
- Different page from "Nearby" list is selected.
- When new page is selected, we observe bug described in T188769. More problems can be seen at this point. Page info (19 languages and 2,686 page views last week) is displayed from previous page selected. When network call is resolved, page info is updated with new data. Instead of last page's info, we should display number of languages (3) while page views info is added when network call is done. Unlike this page data, "already exists" message is reset, when page is discarded.
So, this ticket has two parts:
- Try to reuse already available data about number of languages and availability in target wiki
- Reset page info when selected page is discarded
Everything stays same if search results are used instead of "Recently suggested by you" and "Nearby" items.