discourse/spec
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
..
fabricators DEV: Fix random typos (#25957) 2024-02-29 12:24:37 +01:00
fixtures DEV: Support description for properties in objects schema (#26172) 2024-03-15 07:47:42 +08:00
generator DEV: Improve site setting rename generator (#25354) 2024-01-25 10:45:46 +10:00
helpers PERF: Remove unnecessary `<link rel="preload">` (#26219) 2024-03-18 20:07:29 +08:00
import_export DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
initializers DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
integration FEATURE: Enable strict-dynamic Content-Security-Policy by default (#26051) 2024-03-07 15:20:31 +00:00
integrity Enable Embroider/Webpack code spliting for Wizard (#24919) 2023-12-20 13:15:06 +00:00
jobs DEV: Fix broken RunProblemCheck spec (#26074) 2024-03-07 13:31:59 +08:00
lib FIX: do not use return in block (#26260) 2024-03-20 10:49:28 +01:00
mailers DEV: Update rubocop-discourse to latest version 2024-03-04 15:08:35 +01:00
migrations DEV: Switch over category settings to new table - Part 3 (#20657) 2023-09-12 09:51:49 +08:00
models DEV: Promote block problem checks to ProblemCheck (#26193) 2024-03-20 08:52:25 +08:00
multisite DEV: Add S3 upload system specs using minio (#22975) 2023-08-23 11:18:33 +10:00
requests PERF: Fix N+1 when loading categories with custom fields (#26241) 2024-03-19 14:11:19 +02:00
script/import_scripts DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
serializers DEV: Dedicated route for current user notification counts (#26106) 2024-03-15 12:08:37 -04:00
services DEV: Promote block problem checks to ProblemCheck (#26193) 2024-03-20 08:52:25 +08:00
support DEV: Move non scheduled problem checks to classes (#26122) 2024-03-14 10:55:01 +08:00
system FIX: Simplify sidebar custom link implementation (#26201) 2024-03-20 12:55:40 +00:00
tasks DEV: Introduce rake task to validate discourse-compatibility file (#26158) 2024-03-13 13:57:41 +00:00
views FIX: Use subfolder-safe url for category in html view (#24595) 2023-11-28 19:08:14 +08:00
rails_helper.rb DEV: Support running system tests using chromium and custom chromedriver (#26234) 2024-03-19 14:47:14 +08:00
regenerate_swagger_docs
swagger_helper.rb DEV: Bump rswag-specs from 2.11.0 to 2.13.0 (#24654) 2023-12-07 08:16:47 +08:00