discourse/app
David Taylor 575c2c8573
DEV: Update homepage URL handling (#24373)
We want / to display one of our discovery routes/controllers, but we don't want to register it as `discovery.index` because that would break themes/plugins which check the route name. Previously, this was handled using a variety of approaches throughout the codebase (in discourse-location, discourse-url and mapping-router). But even then, it didn't work consistently. For example, if you used an Ember method like `router.transitionTo("/")`, an empty `discovery.index` page would be rendered.

This commit switches up the approach. `discovery.index` is now defined as a real route, and redirects to the desired homepage. To preserve the `/` as a 'vanity url', we patch the method on the router responsible for persisting URLs to the Ember Router and the browser. The patch identifies a relevant transition by looking for a magic query parameter.

In an ideal world, we wouldn't be patching the router at all. But at least with this commit, the workaround is all in one place, and works consistently for all navigation methods. The new strategy is also much better tested.
2023-11-16 11:58:04 +00:00
..
assets DEV: Update homepage URL handling (#24373) 2023-11-16 11:58:04 +00:00
controllers FEATURE: Allow users to confirm session with passkeys (#24337) 2023-11-14 11:38:10 -05:00
helpers DEV: Simplify ember-cli proxy strategy (#24242) 2023-11-10 11:16:06 +00:00
jobs FIX: Deleting/recovering a post in topics caused bookmark side effects (#24226) 2023-11-07 12:54:05 +10:00
mailers FIX: Order tags shown in email subject by topics count and name (#22586) 2023-07-13 15:39:58 +08:00
models FIX: Recompile theme translations when fallback data changes (#24371) 2023-11-14 19:53:27 +00:00
serializers DEV: Rename experimental_passkeys to enable_passkeys (#24349) 2023-11-13 15:04:15 -05:00
services SECURITY: Filter unread bookmark reminders the user cannot see 2023-11-09 13:39:16 +11:00
views DEV: Use WebPack stats plugin to map entrypoints to chunks (#24239) 2023-11-07 10:24:49 +00:00