Commit Graph

59255 Commits

Author SHA1 Message Date
ce2729e676 DEV: trigger single event when multiple posts are destroyed at once (#32731)
a complement to the :post_destroyed event - customer needed an action to
happen just once when the wrench icon was used to delete one or more
posts ...
2025-05-15 09:57:07 -04:00
305ebedfa1 Allow passing a redirect path to a param on the /login route (#32711)
Detects the `redirect` queryParam on the /login route. If the user is
already logged in, navigates to that page. Otherwise, sets the
"destination_url" cookie so that the user will be redirected after
logging in.

If the param doesn't start with a single slash, ignore it and follow
previous behavior (navigate to "/" or log in then navigate there)

Respects subfolder configs.
2025-05-15 08:48:06 -05:00
2e4076f586 DEV: standardise toasts duration (#32741)
Toasts can now have two durations:
- `short` -> 3000ms
- `long` -> 5000ms

For backwards compatibility integer values still work but will display a deprecation message in the browser console.
2025-05-15 14:59:37 +02:00
215a129b68 Revert UX: header search mobile support (#32748)
This reverts the complete work on "Improvements to mobile search" while
respecting all the related changes that were made after the next two
PRs:

- https://github.com/discourse/discourse/pull/32306
- https://github.com/discourse/discourse/pull/31711
2025-05-15 14:27:40 +02:00
5a8ab0b007 Build(deps): Bump prosemirror-view from 1.39.2 to 1.39.3 in the prosemirror group (#32738)
Bumps the prosemirror group with 1 update:
[prosemirror-view](https://github.com/prosemirror/prosemirror-view).


Updates `prosemirror-view` from 1.39.2 to 1.39.3
-
[Changelog](https://github.com/ProseMirror/prosemirror-view/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/prosemirror/prosemirror-view/compare/1.39.2...1.39.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-15 14:16:33 +02:00
11b740be89 DEV: Resolve content-tag initSync deprecation (#32746) 2025-05-15 13:04:52 +01:00
d90b03f3bf DEV: Remove deprecated/archived theme from CI (#32747) 2025-05-15 13:04:43 +01:00
358fc9631c DEV: Raise error if lib/viewport is imported (#32745) 2025-05-15 12:46:12 +01:00
eed9e1674b Build(deps): Bump @faker-js/faker from 9.7.0 to 9.8.0 (#32739)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.7.0 to
9.8.0.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](https://github.com/faker-js/faker/compare/v9.7.0...v9.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-15 13:40:02 +02:00
51ebe7064c FEATURE: Show localized posts and topics based on user's locale (#32618)
Related:
- https://github.com/discourse/discourse-translator/pull/205
- https://github.com/discourse/discourse-translator/pull/274
- https://github.com/discourse/discourse-translator/pull/294

With this PR, we will start showing localized posts (if available) based
on the user's locale.

This work had been done in discourse-translator, but is now moving to
core.
2025-05-15 19:11:06 +08:00
752f9a867b Build(deps): Bump bootsnap from 1.18.4 to 1.18.5 (#32737)
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.18.4 to
1.18.5.
-
[Changelog](https://github.com/Shopify/bootsnap/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/Shopify/bootsnap/compare/v1.18.4...v1.18.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-15 11:27:14 +02:00
7558e2c7cd DEV: revert admin users list change (#32723)
This change was unfortunately introduced in
b6aad28ccf (diff-5c7ecbec34de2166b60c5381df93a4e8438a2dbb6dcb8af0203cff4462fbc64b)
to prevent a failing spec due to the lack of last message bus id.

This commit reverts the change associated to it which was causing the
JSON response to be an object instead of an array.
2025-05-15 09:48:01 +02:00
231b3943d3 UX: simplify admin search, make more accessible (#32733)
This simplifies the admin search and adds some basic accessibility

Simplification: 
* Removes the filters for now, both in the modal and full-screen 
* Removes the link to full-screen from the modal
* Simpler input placeholder text
* Positioned to sit higher on the page, similar to a command palette 

Accessibility: 
* Results (or lack of) announced for screenreaders after query 

Bonus: 
* Makes the modal input sticky on scroll 
* Combined some styles shared between this and the chat menu (modifier +
k) under a `--quick-palette` class



Before:

![image](https://github.com/user-attachments/assets/0af2d741-e870-4ad2-b305-57dc4afc3946)


After:


![image](https://github.com/user-attachments/assets/a8492aed-03c7-4d73-a3d3-ae89834b82bc)

---------

Co-authored-by: Krzysztof Kotlarek <kotlarek.krzysztof@gmail.com>
2025-05-15 16:31:03 +10:00
29eb2eb096 FIX: Lock Bullet gem to a compatible version (#32724)
Because we use a custom ContentSecurityPolicy middleware, the latest versions (> 8.0.3) of Bullet error out on load.

This PR locks the gem to the latest compatible version.
2025-05-15 10:03:24 +08:00
933dd06b4f Build(deps): Bump google-protobuf from 4.30.2 to 4.31.0 (#32735)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf)
from 4.30.2 to 4.31.0.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
-
[Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
-
[Commits](https://github.com/protocolbuffers/protobuf/compare/v4.30.2...v4.31.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-15 09:14:14 +08:00
7e246996ae Build(deps-dev): Bump mime-types-data from 3.2025.0507 to 3.2025.0514 (#32736)
Bumps [mime-types-data](https://github.com/mime-types/mime-types-data)
from 3.2025.0507 to 3.2025.0514.
-
[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.0507...v3.2025.0514)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-15 09:13:12 +08:00
4df5638b3f DEV: Remove discourse-logster-rate-limit-checker from official plugins (#32727)
This is a plugin that is no longer maintained.
2025-05-15 09:10:15 +08:00
02a805c3ad DEV: Revert unintended changes to GroupsController #add_members and its corresponding route (#32732)
Reverted unintended changes to group routes made
[here](https://github.com/discourse/discourse/pull/32442/files#diff-959bc9abc46a55332bb64d5155a79323afa75a50ec1a2137ddd22d926f62c6c5)
2025-05-14 16:31:19 -05:00
a9c648dff4 FIX: this was hiding the top of the composer on iOS (#32734) 2025-05-14 22:46:00 +02:00
f291452c9a DEV: bump max attachment size to 10MB (#32730)
Brings it in line with `max_image_size_kb`.
2025-05-14 14:00:53 -04:00
ded2938700 UX: Focus on sign up form in social auth flow (#32728)
If user returns to the signup form with data from their social login,
then we shouldn't show the right side column, because it is confusing to
have buttons there that restart the social login flow. This PR makes it
so we only show the signup form.

Internal ticket: /t/154184

---------

Co-authored-by: Régis Hanol <regis@hanol.fr>
2025-05-14 13:28:43 -04:00
267736e5bc DEV: Show login-required splash in root route (take 2) (#32629) 2025-05-14 11:25:43 -04:00
c881bdb340 Revert "DEV: Speed up "having working core features" shared example by ~30%"
This reverts eff31e0d42c535ee115317f5b63ff70d90097911.

While it passes our build, it breaks too many custom themes and plugins.
2025-05-14 15:49:58 +02:00
2066e8619f REFACTOR: merge mobile reviewables css into common (#32714)
This moves the mobile styles into common under the relevant breakpoint.
No major visual changes should result.
2025-05-14 09:36:35 -04:00
e806cfbe1f Update translations (#32703) 2025-05-14 14:34:07 +02:00
33fbf19d05 FIX: ensure we can lookup identical ip addresses (#32725)
This has been broken in
b6aad28ccf

We correctly access the users object and added a test to prevent future
regressions.
2025-05-14 11:48:01 +02:00
c8d49a4d0a UX: split admin logo and fonts to separate pages (#32700)
Before we had logo and fonts page merged together. Decided to split
them.
2025-05-14 14:02:34 +08:00
02d0febf3a DEV: Fix full page search core features system test (#32722)
Follow-up to eff31e0d42c535ee115317f5b63ff70d90097911

This removes the assumption that the search dropdown is present across
all themes and plugins.
2025-05-14 12:19:08 +08:00
8e1357068b DEV: Improve core features spec (#32721)
This commit removes the assumption that the sidebar will always be
present as that may not always be the case in certain themes.
2025-05-14 12:36:52 +10:00
a445e8cce5 DEV: Port the about page extra groups functionality into core (#32659)
We want to merge the theme component that allows admins to display extra groups on the about page. The settings for this are now under About your site.

All the code is lift-and-shift, with some minor adjustments, e.g. theme components can't use the group_list setting type, but it has been converted to that here.

Also the system tests for the admin controls are new.

This whole thing is gated behind a hidden site setting to avoid double rendering while we deprecate the theme component.
2025-05-14 09:44:25 +08:00
404e2598b3 DEV: Fix flaky system tests (#32720)
We were not correctly relying on capybara matchers leading to test
flakiness

```
ailure/Error: super

Capybara::Playwright::Node::StaleReferenceError:
  Element is not attached to the DOM

/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-playwright-driver-0.5.6/lib/capybara/playwright/node.rb:91:in `rescue in assert_element_not_stale'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-playwright-driver-0.5.6/lib/capybara/playwright/node.rb:81:in `assert_element_not_stale'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-playwright-driver-0.5.6/lib/capybara/playwright/node.rb:124:in `visible_text'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/node/element.rb:60:in `block in text'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/node/base.rb:84:in `synchronize'
./spec/rails_helper.rb:421:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/node/element.rb:60:in `text'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/result.rb:44:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/capybara-3.40.0/lib/capybara/result.rb:44:in `each'
./spec/system/page_objects/modals/sidebar_edit_categories.rb:45:in `map'
./spec/system/page_objects/modals/sidebar_edit_categories.rb:45:in `has_categories?'
./spec/system/editing_sidebar_categories_navigation_spec.rb:161:in `block (2 levels) in <main>'
```
2025-05-14 09:14:29 +08:00
736f247511 Build(deps): Bump terser from 5.39.0 to 5.39.1 (#32716)
Bumps [terser](https://github.com/terser/terser) from 5.39.0 to 5.39.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.39.0...v5.39.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 07:48:54 +08:00
94932de163 Build(deps-dev): Bump ember-qunit from 9.0.2 to 9.0.3 (#32718)
Bumps [ember-qunit](https://github.com/emberjs/ember-qunit) from 9.0.2
to 9.0.3.
- [Release notes](https://github.com/emberjs/ember-qunit/releases)
-
[Changelog](https://github.com/emberjs/ember-qunit/blob/main/.release-plan.json)
- [Commits](https://github.com/emberjs/ember-qunit/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-14 07:15:18 +08:00
fdf3d8ea5d FIX: wrong class in schema setting editor stylesheet file (#32715)
relates to https://github.com/discourse/discourse/pull/32707 and
https://github.com/discourse/discourse/pull/32706

I've retested manually and all should be fine now.
2025-05-13 19:00:28 -03:00
105f5eca8c UX: Modal to inherit border radius (#32709) 2025-05-13 15:27:51 -05:00
2a738620c4 UX: minor style adjustments for experimental translation feature (#32708)
Before:

![image](https://github.com/user-attachments/assets/ff51c2b8-fff9-4c19-a8c8-6edb8a72a2fb)


After: 

![image](https://github.com/user-attachments/assets/c3b9a858-3499-4e35-bb48-a8da3ba5db3c)
2025-05-13 16:10:37 -04:00
51c687e6db UX: add missing import to admin_base.scss (#32707)
While re-reviewing what I did in
https://github.com/discourse/discourse/pull/32706, I noticed that the
import for customize_show_schema in `admin_base.scss` file was missing.
Probably removed by mistake in the rebase.
2025-05-13 16:41:13 -03:00
5072615290 FEATURE: Add the group show endpoint to search groups by id instead of only the slug name (#32442)
**Description**
As part of a customer request, we have added the option to search groups
by ID when doing API calls. However, in doing so we have decided to
correct the confusion around the group's routes. Previously the route
would look like `g/:id` while taking the `name` of the group as the
param. For example, when getting a group the route would be like this:

```
GET /g/admins
```

This would make the code in the controller seem as if it was handling
the group IDs instead of names. With these changes, this should be
addressed.
2025-05-13 14:22:06 -05:00
4d99c839b6 FEATURE: porting type object to site settings (#32706) 2025-05-13 14:30:24 -03:00
c688554cdd Build(deps-dev): Bump ember-async-data from 2.0.0 to 2.0.1 (#32699)
Bumps
[ember-async-data](https://github.com/tracked-tools/ember-async-data)
from 2.0.0 to 2.0.1.
- [Release
notes](https://github.com/tracked-tools/ember-async-data/releases)
-
[Changelog](https://github.com/tracked-tools/ember-async-data/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tracked-tools/ember-async-data/commits)

---------

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-05-13 15:25:30 +02:00
7e3b2c4738 Build(deps-dev): Bump testem from 3.15.2 to 3.16.0 (#32697)
Bumps [testem](https://github.com/testem/testem) from 3.15.2 to 3.16.0.
- [Release notes](https://github.com/testem/testem/releases)
- [Commits](https://github.com/testem/testem/compare/v3.15.2...v3.16.0)

---------

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-05-13 15:22:58 +02:00
9328ab54a0 Build(deps-dev): Bump playwright-ruby-client from 1.51.0 to 1.52.0 (#32694)
Bumps
[playwright-ruby-client](https://github.com/YusukeIwaki/playwright-ruby-client)
from 1.51.0 to 1.52.0.
-
[Commits](https://github.com/YusukeIwaki/playwright-ruby-client/compare/1.51.0...1.52.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 15:21:55 +02:00
0e7b9df9a6 DEV: bump max_image_size_kb to 10MB (#32688)
This allows, in particular, for larger animated image uploads. Due to
optimizing (clientside and serverside), the actual size of the uploaded
(non-animated) image often ends up being smaller than the o riginal
size. I.e. it may already be optimized before hitting this limit.
2025-05-13 08:47:38 -04:00
da956937d0 Build(deps): Bump json from 2.11.3 to 2.12.0 (#32691)
Bumps [json](https://github.com/ruby/json) from 2.11.3 to 2.12.0.
- [Release notes](https://github.com/ruby/json/releases)
- [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md)
- [Commits](https://github.com/ruby/json/compare/v2.11.3...v2.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:44:44 +08:00
9319b8c704 Build(deps-dev): Bump diff-lcs from 1.6.1 to 1.6.2 (#32692)
Bumps [diff-lcs](https://github.com/halostatue/diff-lcs) from 1.6.1 to
1.6.2.
-
[Changelog](https://github.com/halostatue/diff-lcs/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/halostatue/diff-lcs/compare/v1.6.1...v1.6.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:44:32 +08:00
f734cdc6cf Build(deps): Bump psych from 5.2.5 to 5.2.6 (#32693)
Bumps [psych](https://github.com/ruby/psych) from 5.2.5 to 5.2.6.
- [Release notes](https://github.com/ruby/psych/releases)
- [Commits](https://github.com/ruby/psych/compare/v5.2.5...v5.2.6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:44:18 +08:00
b585033a49 Build(deps-dev): Bump language_server-protocol from 3.17.0.4 to 3.17.0.5 (#32695)
Bumps
[language_server-protocol](https://github.com/mtsmfm/language_server-protocol-ruby)
from 3.17.0.4 to 3.17.0.5.
-
[Changelog](https://github.com/mtsmfm/language_server-protocol-ruby/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/mtsmfm/language_server-protocol-ruby/compare/v3.17.0.4...v3.17.0.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:14:31 +08:00
6f9e765ff2 Build(deps): Bump loofah from 2.24.0 to 2.24.1 (#32696)
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.24.0 to
2.24.1.
- [Release notes](https://github.com/flavorjones/loofah/releases)
-
[Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/flavorjones/loofah/compare/v2.24.0...v2.24.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-13 19:14:11 +08:00
7315a2fc70 UX: add fixed scrollbar gutter to avoid jump with modals (#32702) 2025-05-13 11:43:55 +02:00
70a0cc4d7a DEV: better error message when "becoming" an inactive user (#32689)
In development mode, when 'DISCOURSE_DEV_ALLOW_ANON_TO_IMPERSONATE' is
enabled, and going to /session/:username/become, we will now show an
error message when trying to impersonate an inactive user.

This was not obvious why trying to impersonate a user wasn't working
locally because I would hit the URL and be redirected back to the index
without any error and without being logged in.
2025-05-13 11:10:12 +02:00