main ← discovery-topics-refresh
opened 01:41PM - 07 Jan 22 UTC
Before 6e0e6014, the flow looked something like:
1. `discovery/topics` contro…ller (which extends `discovery` controller) `afterRefresh()` calls `.send("loadingComplete")`
2. Bubbles to [`discovery` route](https://github.com/discourse/discourse/blob/554ff07786a81ed55c902c074d5ba787cfda0a3b/app/assets/javascripts/discourse/app/routes/discovery.js#L58)
3. Discovery route calls `controllerFor('discovery').loadingComplete()`. `loading` is set false, and the spinner disappears
Now that `discovery/topics` defines `loadingComplete` as an action, the `discovery/topics` controller runs its own `loadingComplete` handler logic in step 1, and the action does not bubble any further.
This commit adds action overrides in `discovery/topics`, so that the new actions only apply to the main `discovery` controller. The need for this does suggest some more radical refactoring is required, but these are very critical routes, and we are very close to a major release.
Meta topic: https://meta.discourse.org/t/topic-list-loads-forever-in-some-circumstances/214042