This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/app
David Taylor b537d591b3
FIX: allow slug-less topic URLs to work within the same topic (#15508)
- Update the TOPIC_URL_REGEXP in `lib/url` so that `navigatedToPost` doesn't attempt to handle slug-less URLs. Slugs must contain at least one non-numeric character, so we can use that fact to make the regex more specific. We want slug-less URLs to be routed as a normal Ember transition, so that `topic-by-slug-or-id` can catch them and re-write the URL to include the slug.

- Update the `topic-by-slug-or-id` afterModel to ensure that the Ember router is used to handle the redirect, rather than DiscourseURL. This guarantees that it will function as a redirect (DiscourseURL.routeTo sometimes bypasses the router). This solves the history problem which was worked-around in 27211ee7bb.

- Update routes/topic to recover from aborted transitions gracefully. This means that following an aborted transition, the browser URL continues to be updated with post numbers as the user scrolls down the page.
2022-01-11 10:37:37 +00:00
..
adapters FEATURE: Display pending posts on user’s page 2021-11-29 10:26:33 +01:00
components FEATURE: Show warning if user won't be mentioned (#15339) 2022-01-11 09:16:20 +02:00
controllers FEATURE: Show warning if user won't be mentioned (#15339) 2022-01-11 09:16:20 +02:00
helpers DEV: Re-use main app registry for raw HBS view lookups (#15456) 2022-01-05 22:22:13 +00:00
initializers DEV: Allow click-interceptor in tests and add navigation test (#15499) 2022-01-10 15:45:44 +00:00
lib FIX: allow slug-less topic URLs to work within the same topic (#15508) 2022-01-11 10:37:37 +00:00
mixins DEV: Skip timers when loading topic route in tests (#15500) 2022-01-10 10:51:18 +00:00
models DEV: Add composer-open class to body element when compsoer is open (#15420) 2021-12-28 15:25:53 -06:00
pre-initializers DEV: Correct method name in theme-errors-handler pre-initializer (#15501) 2022-01-10 10:51:40 +00:00
raw-views DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
routes FIX: allow slug-less topic URLs to work within the same topic (#15508) 2022-01-11 10:37:37 +00:00
services DEV: correctly notify property changes of emoji store (#15389) 2021-12-22 10:59:41 +01:00
styles DEV: Migrate to Ember CLI (#11932) 2021-02-03 14:22:20 -05:00
templates DEV: Update emojis constants (#15506) 2022-01-10 14:53:52 -03:00
widgets FEATURE: Allow topic pin toggle when header is docked (#15438) 2022-01-03 15:21:06 +03:00
app.js FEATURE: Catch decorateCooked errors from themes/plugins (#15450) 2022-01-04 21:59:52 +00:00
index.html FIX: Ember CLI was always loading the admin payload in dev mode 2021-10-05 08:34:10 -04:00
mapping-router.js DEV: Improve and document __container__ workaround in tests (#15498) 2022-01-10 10:34:08 +00:00