discourse/app/assets/javascripts
David Taylor e3cfb1967d
FIX: Simplify sidebar custom link implementation (#26201)
All our link validation, and conversion from url -> route/model/query is expensive and prone to bugs. Instead, if people enter a link, we can just use it as-is.

Originally all this extra logic was added to handle unusual situations like `/safe-mode`, `/my/...`, etc. However, all of these are now handled correctly by our Ember router, so there is no need for it.

Now, we just pass the user-supplied `href` directly to the SectionLink component, and let Ember handle routing to it when clicked.

The only functional change here is that we no longer validate internal links by parsing them with the Ember router. But I'd argue this is fine, because the previous logic would cause both false positives (e.g. `/t/123` would be valid, even if topic 123 doesn't exist), and false negatives (for routes which are server-side only, like the new AI share pages).
2024-03-20 12:55:40 +00:00
..
admin FEATURE: Buttons to add and remove objects for schema theme settings (#26256) 2024-03-20 13:41:12 +08:00
bootstrap-json Build(deps-dev): Bump html-entities from 2.4.0 to 2.5.2 (#26021) 2024-03-05 22:56:43 +01:00
deprecation-silencer DEV: Update ember-cli to 5.6.0 (#25886) 2024-02-27 10:48:30 +01:00
dialog-holder DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
discourse FIX: Simplify sidebar custom link implementation (#26201) 2024-03-20 12:55:40 +00:00
discourse-common Build(deps): Bump the babel group with 2 updates (#26250) 2024-03-19 23:17:37 +01:00
discourse-hbr Build(deps): Bump the babel group with 2 updates (#26250) 2024-03-19 23:17:37 +01:00
discourse-i18n DEV: Update ember-cli to 5.6.0 (#25886) 2024-02-27 10:48:30 +01:00
discourse-markdown-it FIX: support [code] in blockquotes (#26182) 2024-03-14 19:31:22 +01:00
discourse-plugins Build(deps): Bump the babel group with 2 updates (#26250) 2024-03-19 23:17:37 +01:00
discourse-widget-hbs Build(deps): Bump the babel group with 2 updates (#26250) 2024-03-19 23:17:37 +01:00
docs
ember-addons
ember-cli-progress-ci
ember-production-deprecations DEV: Add production-mode shim for `Em` deprecation (#25109) 2024-01-03 10:39:59 +00:00
float-kit Build(deps): Bump the babel group with 2 updates (#26250) 2024-03-19 23:17:37 +01:00
locales DEV: convert I18n pseudo package into real package (discourse-i18n) (#23867) 2023-10-12 14:44:01 +01:00
pretty-text Build(deps): Bump the babel group with 2 updates (#26250) 2024-03-19 23:17:37 +01:00
select-kit Build(deps): Bump the babel group with 2 updates (#26250) 2024-03-19 23:17:37 +01:00
theme-transpiler Build(deps): Bump the babel group with 2 updates (#26250) 2024-03-19 23:17:37 +01:00
truth-helpers DEV: Convert truth-helpers to a v2 addon and simplify imports (#26029) 2024-03-05 15:24:47 +00:00
.npmrc
handlebars-shim.js
polyfills.js
run-patch-package DEV: Automatically retry patch-package on failure (#23583) 2023-09-14 12:25:06 +01:00
service-worker.js.erb FIX: Service worker push notifications when cache disabled (#25610) 2024-02-08 11:55:32 +00:00