Commit Graph
61171 Commits
Author SHA1 Message Date
Sérgio Saquetim 14fef6598c DEV: Replace deprecated Ember's array sortBy with sort (#34998)
This Pull Request introduces changes that replace the use of .sortBy
with .sort combined with compare from @ember/utils. This update aims to
modernize and standardize sorting operations throughout the codebase.

**Main Changes:**

* Replaced .sortBy with .sort and compare in various components,
controllers, and services to improve sorting practices.
* Updated sorting logic to handle optional chaining (?.) for increased
robustness.
* Adjusted sorting logic, including reversing, in some cases for more
clarity and correctness.
* Added a new deprecation workflow entry to handle sortBy deprecation
logs (discourse.native-array-extensions.sortBy).
2025-09-26 13:38:26 -03:00
chapoi 49ed4be80b UX: prevent icon and text wrapping in breadcrumb (#35008)
We need to allow the breadcrumbs to wrap properly, to account for deep
navigation layers on mobile

| BC | AC |
|--------|--------|
| <img width="668" height="842" alt="CleanShot 2025-09-26 at 08 17
42@2x"
src="https://github.com/user-attachments/assets/e38400eb-b8a2-48f2-be69-089ad392d144"
/> | <img width="668" height="842" alt="CleanShot 2025-09-26 at 08 17
59@2x"
src="https://github.com/user-attachments/assets/b061f82a-433a-409e-903e-90b2fde35a39"
/> |
2025-09-26 10:16:51 -06:00
Sérgio SaquetimandJarek Radosz ad3a2df0a4 DEV: Replace Ember's deprecated mapBy with standard .map (#34963)
Replaces usages of `mapBy` across the codebase with JavaScript's native
`.map`. This resolves deprecation warnings related to Ember's array
extensions and ensures compatibility with future Ember versions.

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2025-09-26 12:59:35 -03:00
Jarek Radosz 4e417223e5 DEV: Convert SimpleList to glimmer (#34490)
no more `@ember/-internals/metal` 😄 …in this component 😅
2025-09-26 14:24:30 +02:00
David Taylor 1313b4af4c DEV: Relax rules for JS build reuse (#34489)
With this commit, pre-built assets will be fetched and re-used even if
there is a diff on non-js-related files in the core repository
2025-09-26 13:12:28 +01:00
Yuriy Kurant 025f72e4ec FIX: escapes account-created routes on Welcome banner page visibility (#34951)
1. We are adding more pages that do not need a Welcome banner to be
shown on:
- a sign up journey

2. Hides Header search on a `/search` page (avoids duplicate inputs)
2025-09-26 14:41:59 +03:00
Discourse Translator Bot c349298f45 Update translations (#35003) 2025-09-26 13:35:05 +02:00
Natalie Tay 69ce962a8a DEV: Add discourse-doc-categories to metadata (#34920)
Part of supporting it on our hosting.

/t/162807
2025-09-26 17:12:21 +08:00
Natalie Tay ff422c2d25 UX: Use search padding for discoveries (#35005)
It was looking weird on narrower desktops.
2025-09-26 17:00:44 +08:00
Loïc Guitaut 8761d47e26 DEV: Allow ServerSession to store arbitrary data (#34919)
Currently, the server session can only store strings. As we want to move
more things into it (like with a proper session object), we need to be
able to store arbitrary data.

This PR serializes data using Message Pack, as it’s almost as flexible
as Marshal but without the potential security issues.
2025-09-26 10:35:28 +02:00
chapoi 9a5cc3c012 UX: Redesign 404 (#34999)
A little fairy dust sprinkle

| BC | AC |
|--------|--------|
| <img width="718" height="1546" alt="CleanShot 2025-09-25 at 20 39
23@2x"
src="https://github.com/user-attachments/assets/db98e434-effb-41a5-98da-8d66e41a710c"
/> | <img width="732" height="1550" alt="CleanShot 2025-09-25 at 20 36
49@2x"
src="https://github.com/user-attachments/assets/42543c25-7ac8-4f70-9f4f-737e8d675a68"
/> |
| <img width="2496" height="1698" alt="CleanShot 2025-09-25 at 20 39
13@2x"
src="https://github.com/user-attachments/assets/1ded9617-3ee9-435e-b4d2-8f8835186a45"
/> | <img width="2450" height="1702" alt="CleanShot 2025-09-25 at 20 43
02@2x"
src="https://github.com/user-attachments/assets/f2ae2f36-b474-43f1-a0bc-3efd40b34d39"
/> |
2025-09-25 22:14:44 -06:00
Alan Guo Xiang Tan 128e2f98ce DEV: Add missing test case to ApplicationController (#35001)
Follow-up to a3e5a31674 made 8 years ago
2025-09-26 12:05:44 +08:00
chapoiandMartin Brennan d262ce891b DEV: don't show new user notice after x-time (#34988)
Instead of desaturating the new-user notice to indicate it's no longer
relevant, we simply no longer render it.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-09-25 21:25:00 -06:00
Jarek Radosz 08a741b817 DEV: Fix PostDestroyer deprecations in specs (#34986)
…and remove a stray `puts` in a spec
2025-09-26 09:53:17 +08:00
Jarek Radosz 0c7b731b93 DEV: Remove an obsolete poll migration task (#34990)
This was used over 10 years ago to manually migrate poll data from a
previous syntax (the task was added in
202b442b86)
2025-09-26 09:52:47 +08:00
Jarek Radosz 2773ee4963 DEV: Fix random typos (#34987)
September 2025 edition
2025-09-26 09:52:28 +08:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> e0e33b539f Build(deps-dev): Bump chrome-launcher from 1.2.0 to 1.2.1 (#34994)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [chrome-launcher](https://github.com/GoogleChrome/chrome-launcher)
from 1.2.0 to 1.2.1.
- [Release
notes](https://github.com/GoogleChrome/chrome-launcher/releases)
-
[Changelog](https://github.com/GoogleChrome/chrome-launcher/blob/main/changelog.md)
-
[Commits](https://github.com/GoogleChrome/chrome-launcher/compare/v1.2.0...v1.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-26 00:50:13 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 9dd8aa902e Build(deps-dev): Bump @swc/core from 1.13.5 to 1.13.19 (#34993)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.13.5 to
1.13.19.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/swc-project/swc/compare/v1.13.5...v1.13.19)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-26 00:49:33 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> bf9247ad6c Build(deps-dev): Bump rouge from 4.6.0 to 4.6.1 (#34992)
Bumps [rouge](https://github.com/rouge-ruby/rouge) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
-
[Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v4.6.0...v4.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-26 00:48:55 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> a08ac0fd8b Build(deps-dev): Bump rubocop from 1.80.2 to 1.81.0 (#34991)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.80.2 to
1.81.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
-
[Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop/compare/v1.80.2...v1.81.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-26 00:48:26 +02:00
Sérgio Saquetim e091b6e447 DEV: Replace deprecated reject and rejectBy with filter (#34974)
Refactor all instances of `reject` and `rejectBy` across the codebase to
use the native `filter` method paired with appropriate logic. Updates
include changes in models, components, and services.

This ensures compatibility with modern JavaScript standards and reduces
reliance on deprecated array extension methods.
2025-09-25 17:15:19 -03:00
Sérgio Saquetim 9a6776c095 DEV: Ensure unsilenced deprecations raise errors in core tests (#34975)
Refine `shouldThrow` behavior by replacing `includeUnhandled` parameter
with `includeUnsilenced` to improve clarity and semantics. Adjust logic
to integrate unsilenced deprecations handling, ensuring more precise
deprecation workflows.
2025-09-25 15:49:29 -03:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 06bda75a18 Build(deps): Bump rack from 2.2.17 to 2.2.18 (#34983)
Bumps [rack](https://github.com/rack/rack) from 2.2.17 to 2.2.18.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.17...v2.2.18)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-25 20:05:28 +02:00
David Taylor 33c0041ac5 DEV: Improve rspec boot time & fix --bisect functionality (#34982)
By default, RSpec's bisect uses the `:fork` strategy. This is not safe
to use in Discourse, because miniracer is not fork safe. So if any
contexts have been booted in the parent process, they'll be broken in
the forked process. Using `:shell` solves this.

Also, since we introduced core themes, the database 'seed' step became
much more expensive because it re-installs and compiles
Horizon/Foundation every time. I don't think there's any need to do this
every time we boot a spec. Instead, we can trust that it ran as part of
`bin/rake db:migrate`, just like it does in production.

On my machine, this cuts the runtime of a single (empty) spec from 3.5s
to 1.1s 🚀
2025-09-25 17:54:40 +01:00
chapoi 5f0b703bba UX: use new --danger modifier in dropdown (#34981)
Context: no longer using `btn-danger` for non-standard buttons, such as
in a dropdown.
Instead, replace with the dedicated `--danger` modifier.
2025-09-25 10:48:52 -06:00
chapoi 26e3e027a5 UX: update emoji size (#34494)
Actual change instead of #34324
2025-09-25 09:53:07 -06:00
chapoi 36cc5971a5 UX: remove hover effect (not consistent) (#34881)
Noticed we're using some custom hover effect on these buttons, which we
don't use with similar nav areas such as main nav or user page nav.

 <img width="1684" height="288" alt="CleanShot 2025-09-19 at 09 46
37@2x"
src="https://github.com/user-attachments/assets/f6615210-411b-4f14-96a1-7119642dc2c1"
/>
 <img width="1060" height="210" alt="CleanShot 2025-09-19 at 09 46
56@2x"
src="https://github.com/user-attachments/assets/933f4a9d-1e42-4b19-b69c-ece8114b46c0"
/>
 <img width="938" height="226" alt="CleanShot 2025-09-19 at 09 47
20@2x"
src="https://github.com/user-attachments/assets/74ca8a0d-f82a-445d-a503-8f4082fa8417"
/>
2025-09-25 09:38:17 -06:00
chapoi 1d5b82ed51 UX: polish the new user first post notice (#34965)
Before
<img width="974" height="1000" alt="image"
src="https://github.com/user-attachments/assets/a27f4182-90a6-4967-8abe-dda8bc1662d2"
/>

After
<img width="1250" height="1000" alt="image"
src="https://github.com/user-attachments/assets/2b7abb0f-1196-4c92-a549-d615edeb149e"
/>
2025-09-25 09:21:05 -06:00
Amanda Alves Branquinho 8cb364c78b DEV: Update user note to allow customization (#34913)
- Adds a transformer to allow subtitle addition to the user notes form
- Adds plugin outlet to allow customization of each note in the modal
form
- Rename a handler placement to place the avatar under the correct
outlet
2025-09-25 11:36:55 -03:00
Discourse Translator Bot fe31f25ed9 Update translations (#34976) 2025-09-25 16:05:27 +02:00
Loïc Guitaut 2e47ee8a9e DEV: Fix Unicorn reloading (#34980)
Recently we replaced the `pry-byebug` gem by the `debug` one. It broke
the auto-reload mechanism we have in the development environment for
Unicorn.

Indeed, the `debug` gem by default will add an `at_exit` hook that will
wait for all its children to exit. It clashes with our own mechanism.

The workaround is to require `debug/prelude` instead of `debug`: the
`debugger` command and breakpoints will still work but without the hook
being set.
2025-09-25 15:51:02 +02:00
David Taylor 667f525292 DEV: Resolve flaky chat preferences spec (#34978) 2025-09-25 13:35:25 +01:00
Jarek Radosz 2c84945853 DEV: Normalize route and namespace setup in plugins (#34962) 2025-09-25 12:35:29 +02:00
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Discourse CI
fccc7efcdc Build(deps-dev): Bump puppeteer-core from 24.22.0 to 24.22.3 (#34969)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.22.0 to 24.22.3.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
-
[Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v24.22.0...puppeteer-core-v24.22.3)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-09-25 12:32:47 +02:00
David Taylor 6081bc2249 DEV: Standardize Ember route, controller and template naming (#34417)
For historical reasons, Discourse has a customized Ember resolver. This
had a much more fuzzy implementation of 'normalize' and 'findTemplate'
functions. This leniency meant that our file naming hasn't always
matched Ember conventions.

Standardizing our naming will make things easier to understand for
developers, and will make adoption of newer ecosystem tooling easier
(e.g. route-based bundle splitting in Embroider/vite)

This commit adds deprecations to the resolver when this leniency is
used, and uses a fully bespoke codemod to rename all of the affected
routes/controllers/templates in the Discourse core repository.
Backwards-compatibility is maintained for anyone looking up the old
names in the resolver.
2025-09-25 11:27:45 +01:00
Ted Johansson de93ccbade DEV: Touch-ups and test coverage for Reviewable#perform (#34950) 2025-09-25 15:17:24 +08:00
Gary Pendergast 8931a682ad DEV: Centralise post action definitions for reviewables. (#34940)
This change adds `ReviewableActionBuilder::build_post_actions_bundle`, which  defines all of the post actions that a reviewable should need. An important difference here is in `ReviewableQueuedPost`, which (despite the name) doesn't actually deal with posts, the post data is stored on the `Reviewable` object, so it needs to continue handling its own actions.

I've added relevant `perform_` methods to `ReviewableActionBuilder` to handle all of the actions defined in `build_post_actions_bundle`. Much like `target_user`, there's also now a `target_post` method to find the `Post` object.
2025-09-25 15:23:24 +10:00
Tobias Eigen 85a168f110 Explain that anon mode related settings require allow anonymous mode (#34956) 2025-09-24 16:53:08 -07:00
Sérgio Saquetim 8624dabc4b DEV: Replace without usage and update deprecation handling (#34971)
Refactor `recentSearches` logic in `search.js` to replace the deprecated
`without` with a `filter` function. Update deprecation workflow to log
usages of the `discourse.native-array-extensions.without` method.
2025-09-24 20:11:48 -03:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> a8d4d47265 Build(deps): Bump redis-client from 0.25.3 to 0.26.0 (#34934)
Bumps [redis-client](https://github.com/redis-rb/redis-client) from
0.25.3 to 0.26.0.
-
[Changelog](https://github.com/redis-rb/redis-client/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/redis-rb/redis-client/compare/v0.25.3...v0.26.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-25 01:05:01 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 10247a4772 Build(deps): Bump puma from 7.0.3 to 7.0.4 (#34932)
Bumps [puma](https://github.com/puma/puma) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v7.0.3...v7.0.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-25 01:04:29 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> cc1c4d2390 Build(deps-dev): Bump playwright from 1.55.0 to 1.55.1 (#34938)
Bumps [playwright](https://github.com/microsoft/playwright) from 1.55.0
to 1.55.1.
- [Release notes](https://github.com/microsoft/playwright/releases)
-
[Commits](https://github.com/microsoft/playwright/compare/v1.55.0...v1.55.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-25 00:59:19 +02:00
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Discourse CI
4178a4285a Build(deps): Bump ember-auto-import from 2.10.0 to 2.10.1 (#34939)
Bumps
[ember-auto-import](https://github.com/embroider-build/ember-auto-import/tree/HEAD/packages/ember-auto-import)
from 2.10.0 to 2.10.1.
- [Release
notes](https://github.com/embroider-build/ember-auto-import/releases)
-
[Changelog](https://github.com/embroider-build/ember-auto-import/blob/main/packages/ember-auto-import/CHANGELOG.md)
-
[Commits](https://github.com/embroider-build/ember-auto-import/commits/HEAD/packages/ember-auto-import)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-09-25 00:44:09 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 9a396fea49 Build(deps-dev): Bump lefthook from 1.13.2 to 1.13.4 (#34937)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.13.2
to 1.13.4.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
-
[Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/evilmartians/lefthook/compare/v1.13.2...v1.13.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-25 00:43:05 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 4e9b22f068 Build(deps): Bump @rollup/browser from 4.50.2 to 4.52.2 (#34935)
Bumps [@rollup/browser](https://github.com/rollup/rollup) from 4.50.2 to
4.52.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.50.2...v4.52.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-25 00:40:03 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 804020b5bb Build(deps-dev): Bump mime-types-data from 3.2025.0916 to 3.2025.0924 (#34968)
Bumps [mime-types-data](https://github.com/mime-types/mime-types-data)
from 3.2025.0916 to 3.2025.0924.
-
[Changelog](https://github.com/mime-types/mime-types-data/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/mime-types/mime-types-data/compare/v3.2025.0916...v3.2025.0924)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-25 00:25:34 +02:00
chapoi 29e60d7cf9 UX: replace btn-danger with modifier class for bookmark dropdown (#34941)
The bookmark modal should not be using `btn-danger`, as these classes
are reserved for buttons following a standard format ("normal buttons").
This can cause issues when a theme styles these classes, which then
conflicts with the display in a list.

This commit removes the class and replaces it with a `--danger` modifier
that can be used in any dropdown.

| BC | AC |
|--------|--------|
| <img width="734" height="326" alt="CleanShot 2025-09-23 at 20 59
03@2x"
src="https://github.com/user-attachments/assets/bd771908-8de2-4cfd-a648-fa880d330a09"
/> | <img width="598" height="316" alt="CleanShot 2025-09-23 at 21 05
35@2x"
src="https://github.com/user-attachments/assets/aba3877c-1aba-4fb3-935d-a31ec99e5fb6"
/> |
2025-09-24 13:34:46 -06:00
Natalie Tay 1e1d71af62 FIX: Publish the topic instead of the post to refresh topic titles (#34961)
When a topic has its title is translated, we're not refreshing the topic
titles correctly. This PR fixes the channel we're publishing on.
2025-09-25 03:12:41 +08:00
Jordan Vidrine eb4a335eb7 UX: Timeline fix (#34953) 2025-09-24 14:05:40 -05:00
Joffrey JAFFEUXandJarek Radosz e991d3b2ad FIX: ensures user notes routes are correctly defined (#34960)
A previous commit
https://github.com/discourse/discourse/commit/9b998f10ce2e4d655a26adce37db40d5b852be89
has been causing an error where routes were not defined.

This commit follows an established pattern and adds a spec to ensure
basic behavior is working correctly.

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2025-09-24 20:45:16 +02:00