sillsdev / web-languageforge

Language Forge: Online Collaborative Dictionary Building on the Web and Phone.
https://languageforge.org
MIT License
44 stars 29 forks source link

bug: initial clone dialog never updates when finished cloning #1806

Closed megahirt closed 2 months ago

megahirt commented 2 months ago

Describe the bug When cloning a project from LD for the first time, the user is presented with "please wait while the project is created..." image ...but the message never disappears and the user must refresh the page in order to proceed.

The message used to redirect the user to the project page when the clone finished.

To Reproduce Clone a project from LD. Get stuck on the message.

Expected behavior The message should update with a status message and then take the user to the project when the clone is finished.

rmunn commented 2 months ago

There's a clone-status timer that gets set when you enter the "Get project from Language Depot" page, which is supposed to go to the project page when it completes. Also, an Angular event handler is also set to handle the locationChangeStart event to cancel the timer, presumably with the intent of making sure it doesn't keep running after you go to the project page. However, since the "Please wait while the project is created" page is a different Angular component with a different URL, it fires locationChangeStart and cancels the clone-status timer almost right away.

PR #1810 fixes this by simply removing that one event handler registration for locationChangeStart, which allows the clone-status timer to keep running. It already has code to cancel itself after it goes to the project page, so that event handler was redundant anyway. The only drawback of this approach is that the "Creating initial data" text is soon replaced by "Syncing...", but I don't feel that that's enough of a problem that it's worth spending any more time on.