Page MenuHomePhabricator

Display a loading symbol during the AJAX request when a user registers
Closed, ResolvedPublic

Description

Go to the Translatewiki.net homepage, and register as a new user.

After pressing the Create account button there will be a small duration when nothing happens. This is because an AJAX call is done to create the user and we are not showing a loading symbol.

Since this is one of the first interactions that translators will have with our software, maybe a good idea to display a loading symbol to avoid the user having to wonder whats going on after pressing Create account.

Event Timeline

abi_ created this task.Jun 24 2019, 2:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 24 2019, 2:50 PM
abi_ moved this task from Backlog to In Progress on the User-abi_ board.Jul 1 2019, 7:34 AM

Change 520008 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/TwnMainPage@master] Display loading icon on Main Page after user clicks on create account

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

Change 520008 abandoned by Abijeet Patro:
Display loading icon on Main Page after user clicks on create account

Reason:
Incorrect topic

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

Change 520046 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/TwnMainPage@master] Display loading icon on Main Page after user clicks on create account

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

abi_ moved this task from In Progress to Under Review on the User-abi_ board.Jul 1 2019, 5:28 PM
abi_ added a comment.EditedJul 1 2019, 5:34 PM

As part of this task, I've also added ESLint and Stylelint to TwnMainPage extension. This required fixing any errors that were being raised by the linters. The patch for that is here - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TwnMainPage/+/519988

Here are a couple of images from the changes made,

For generic errors, instead of showing a window.alert, we're now showing an HTML notice itself,

The newly added loading icon next to the create account button,

Change 520046 merged by jenkins-bot:
[mediawiki/extensions/TwnMainPage@master] Display loading icon on Main Page after user clicks on create account

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

abi_ moved this task from Under Review to QA on the User-abi_ board.Jul 8 2019, 7:48 AM
abi_ added a subscriber: Pginer-WMF.Jul 8 2019, 8:39 AM

Hi @Pginer-WMF ,

I'd planned to work on this ticket before this quarter, and the patch for this is already submitted and merged. Hence please add this to the current quarter board.

abi_ claimed this task.Jul 8 2019, 11:21 AM

Moving to in-review as the patch has been merged. Please wait before starting QA as the MLEB instance has yet to be setup.

abi_ added a subscriber: Jpita.Jul 11 2019, 1:20 PM

This works well. Seeing a loading symbol when a user registers. Tested on the MLEB instance.

This is ready for testing.

abi_ added a comment.Jul 11 2019, 2:54 PM

The main page for the TwnMainPage extension is here - https://language-translate.wmflabs.org/index.php/Special:MainPage

Jpita added a comment.Jul 11 2019, 3:35 PM

small fix needed:
after the Create account button is pressed and the api is called to create the user, once the user is created and just before the login call happens, there's a couple seconds (not even) window where the Create account button is again available for clicking.

there's no real problem because the api call is canceled , but it should be avoided in case the user has a slow connection and the 2nd call to create might happen.

https://drive.google.com/file/d/1hh2QjvxZ23C5GtedShT25yUMdRNgXwVU/view?usp=sharing

Change 522384 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/TwnMainPage@master] Display the loading symbol on registration until the page refresh

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

abi_ added a comment.Jul 12 2019, 9:19 AM

Thanks @Jpita

I've uploaded a patch to fix this issue. Will let you know once it is merged and deployed.

Pginer-WMF triaged this task as Medium priority.Jul 15 2019, 8:06 AM

Change 522384 merged by jenkins-bot:
[mediawiki/extensions/TwnMainPage@master] Display the loading symbol on registration until page refresh

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

abi_ added a comment.Jul 17 2019, 8:04 AM

Hi @Jpita

This is now deployed on the MLEB testing instance and can be tested.

Once you've tested this, please mark this as resolved if everything is OK on the testing instance.

Jpita closed this task as Resolved.Jul 17 2019, 8:34 AM
Jpita moved this task from QA to Done on the User-abi_ board.