discourse/app/assets/javascripts
Régis Hanol 61b0a3730b
FIX: show loading spinner when redirecting to discourse connect (#34135)
On "slow" computers and/or in production builds of the client-side
application, the redirection to discourse connect (via window.location)
might happen _after_ the login/signup route is done loading and the
login/signup template is being shown.

Since when discourse connect is enabled, no other auth "provider" is
allowed, we "flashed" a screen that indicated there was no "login
method" configured.

In order to fix this, we rely on the "isRedirectingToExternalAuth"
boolean and ensure it's set to "true" when discourse connect is enabled.

This is unfortunately ~~impossible~~ very hard to test as it depends on
how fast the browser running the test is...

The only way I was able to reproduce this issue locally was to throttle
both the CPU and network in Chrome's performance tab.

<img width="861" height="156" alt="Screenshot 2025-08-07 at 13 43 09"
src="https://github.com/user-attachments/assets/de02be42-9ce8-4253-8c9c-fd9784a9bb65"
/>

---

I also renamed `isRedirecting` to `#isRedirecting` to better indicate
this is a private variable.

---

**BEFORE**


https://github.com/user-attachments/assets/568052d9-70eb-4d27-8d59-a4b67ae6d8ac

**AFTER**


https://github.com/user-attachments/assets/f51ee3f4-3322-4fc8-8e9b-6195413bba12
2025-08-07 15:12:55 +02:00
..
admin FIX: Update logic for displaying admin palette warning (#34121) 2025-08-07 07:40:20 -04:00
custom-proxy Build(deps-dev): Bump glob from 10.4.5 to 11.0.3 (#33191) 2025-07-25 19:13:32 +02:00
deprecation-silencer
dialog-holder Build(deps-dev): Bump webpack from 5.100.2 to 5.101.0 (#33899) 2025-07-28 17:53:05 +02:00
discourse FIX: show loading spinner when redirecting to discourse connect (#34135) 2025-08-07 15:12:55 +02:00
discourse-i18n DEV: Add an InterpolatedTranslation component. (#33082) 2025-06-17 07:52:06 +10:00
discourse-markdown-it FEATURE: add unicode username support for composer rich text (#33734) 2025-07-29 10:06:48 +04:00
discourse-plugins Build(deps-dev): Bump ember-cli from 6.5.0 to 6.6.0 (#33949) 2025-07-30 02:37:28 +02:00
discourse-widget-hbs Build(deps-dev): Bump ember-cli from 6.5.0 to 6.6.0 (#33949) 2025-07-30 02:37:28 +02:00
docs
ember-addons
ember-cli-progress-ci
float-kit Build(deps): Bump @floating-ui/dom from 1.7.2 to 1.7.3 (#33989) 2025-07-31 08:46:23 +02:00
pretty-text Build(deps-dev): Bump ember-cli from 6.5.0 to 6.6.0 (#33949) 2025-07-30 02:37:28 +02:00
select-kit UX: direct to single tag page from tag intersection when one tag remains (#34038) 2025-08-04 09:42:25 -04:00
theme-transpiler FIX: JS/HBS connectors in themes (#34130) 2025-08-07 12:39:06 +01:00
truth-helpers DEV: Correct truth-helper exports (#31528) 2025-02-26 17:50:29 +00:00
.npmrc
polyfills.js