Page MenuHomePhabricator

Compare contents step: "Section already present banner" shows up momentarily when screen loads
Closed, ResolvedPublic

Description

Similar to T263118, when "Compare contents" screen loads for the first time, a grey message indicating the translation is present is shown for a moment and then disappears, inserting a UI glitch and causing confusion.

This happens when selecting any section that is missing. Issue illustrated below:

Sep-24-2020 09-38-35.gif (624×500 px, 1 MB)

Event Timeline

I have a feeling this will appear more times throughout the app, can @ngkountas or @santhosh tell us why this is happening?
Is it like a default state for the component that then gets updated? if that's the case we should think about setting the default to a loading gif or something so that doesn't happen

Change 629631 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Fix present section banner to show only for present sections

https://gerrit.wikimedia.org/r/629631

I have a feeling this will appear more times throughout the app, can @ngkountas or @santhosh tell us why this is happening?
Is it like a default state for the component that then gets updated? if that's the case we should think about setting the default to a loading gif or something so that doesn't happen

As @Jpita noticed this happens because application state is not (always) fully loaded as soon as user reaches "Compare contents step". However, there is no need to change implementation for the rest of the application or its state, as this can be easily be fixed by adding a few more checks before showing "present section" banner. Done in related patch.

Change 629631 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Fix present section banner to show only for present sections

https://gerrit.wikimedia.org/r/629631