Start spinners before evaluating the input, so spinners are properly … #202
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…stopped when the input processing fails (due to invalid URL for instance).
Task: https://phabricator.wikimedia.org/T123709
Demo: https://tools.wmflabs.org/file-reuse-test/fix-no-error-msg-on-wrong-input/
I just noticed that when one enters non-Wikipedia and non-Commons URL (or simply some foobar contant) to the input field, the tool does not show an error message (you can see the error in the browser console when trying the input on the production instance for example).
Apparently, this got broken when adding the loading spinners. This change simply starts spinners no matter what the input was. That way spinner stopping function will always have a spinner to stop, and also spinner wouldn't start if the input was wrong (the latter would happen if I simply check for spinner's existence in the
_stopLoading
method).