2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-04 17:32:34 +08:00
Commit graph

60118 commits

Author SHA1 Message Date
Jarek Radosz
8d705c00c3 DEV: Move discourse-templates to core (#33749)
https://meta.discourse.org/t/373574

Internal `/t/-/156778`
2025-07-22 15:07:59 +02:00
Jarek Radosz
a7ad3beb0a DEV: Move discourse-topic-voting to core (#33749)
https://meta.discourse.org/t/373574

Internal `/t/-/156778`
2025-07-22 15:07:59 +02:00
Jarek Radosz
cc084bbbac DEV: Move discourse-solved to core (#33749)
https://meta.discourse.org/t/373574

Internal `/t/-/156778`
2025-07-22 15:07:59 +02:00
Jarek Radosz
732b0ad0b7 DEV: Move discourse-affiliate to core (#33749)
https://meta.discourse.org/t/373574

Internal `/t/-/156778`
2025-07-22 15:07:59 +02:00
Jarek Radosz
b8ae1d2076 DEV: Move discourse-adplugin to core (#33749)
https://meta.discourse.org/t/373574

Internal `/t/-/156778`
2025-07-22 15:07:59 +02:00
Jarek Radosz
97b1f04f8d DEV: Move discourse-github to core (#33749)
https://meta.discourse.org/t/373574

Internal `/t/-/156778`
2025-07-22 15:07:59 +02:00
Jarek Radosz
a64f22e72e DEV: Move discourse-policy to core (#33749)
https://meta.discourse.org/t/373574

Internal `/t/-/156778`
2025-07-22 15:07:59 +02:00
Loïc Guitaut
039aecae9b DEV: Fix sidekiq requires in test env
When in test env, we can get errors because the "sidekiq/api" file isn’t
properly loaded.
2025-07-22 12:40:57 +02:00
Loïc Guitaut
0eab7daea4 DEV: Upgrade Rails to version 8.0.2
- Migrated from annotate to annotaterb as the former is not maintained
  anymore.
- Dropped our `fast_pluck` patch as the default `pluck` implementation
  seems now faster.
2025-07-22 09:59:44 +02:00
Martin Brennan
e81370e0b9
DEV: Capture unhandled JS errors in Playwright logs (#33744)
Before this change, even if we were failing rspec tests due to
JS errors, they were not being shown in the "JS LOGS" backed
by the playwright logger in the failure message. Sometimes the
unhandled JS errors are the _cause_ of the failure, so it
is important to see them.
2025-07-22 16:14:08 +10:00
Sam
68b901586a
FEATURE: dynamic search when in /filter route (#33614)
Introduces new dynamic autocomplete for filter to make discovery
easier:

<img width="930" height="585" alt="image"
src="https://github.com/user-attachments/assets/17e7f746-a170-4f10-9ddf-77ef651e5325"
/>



https://github.com/user-attachments/assets/e9d7bc29-a593-4ef3-82a2-f10fc35ed47c

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-07-22 16:08:10 +10:00
Gary Pendergast
de1fb8c955
DEV: Add tests for the ReviewableFlagReason component. (#33728)
This is a follow-up to 38194c2aec.

In this change:
- Add JSDocs for the component.
- Add integration tests for the component.
- Standardise on passing a single `@score` parameter to the component,
rather than splitting out the parameters.
2025-07-22 11:36:34 +10:00
Sérgio Saquetim
5d601d36e0
DEV: Ensure the collapsed content of quoted posts is decorated (#33740)
This commit refactors the `PostCookedHtml` and `PostQuotedContent`
components to enhance how quoted posts are rendered and decorated. It
introduces a new `className` prop for customizing the class of cooked
HTML, and ensures collapsed quote content is consistently decorated with
appropriate styles and structure.

Key changes:
- Adds a `className` argument to `PostCookedHtml`, allowing quoted
content to have a distinct class for easier styling.
- Updates `PostQuotedContent` to render collapsed and expanded quoted
content through `PostCookedHtml`, ensuring consistent decoration and
disabling selection barriers for quoted posts.
- Refines decorator application logic in `PostCookedHtml` to
conditionally apply selection barriers.
- Improves CSS by targeting quoted content within blockquotes, ensuring
top and bottom margins are correctly removed from child elements.
- Updates acceptance tests to support both classic and glimmer post
stream modes, verifying composer actions and quoted content behavior
across modes.
2025-07-21 21:50:42 -03:00
David Taylor
43ddd4ef32
DEV: Improve testem error (#33739)
Followup to 8b957e5648
2025-07-21 21:52:46 +01:00
David Taylor
5ba28911ca
DEV: Only load specific plugin bundles during qunit test (#33678)
Previously, running qunit tests for a plugin would load the JS of all
installed plugins. This can be problematic because, depending on the
plugins installed in the current environment, there can be unexpected
interactions between the plugins.

This commit updates our qunit system to check the
`tests.requiredPlugins` list from the theme/plugin `about.json` file,
and only loads the listed plugins. This means that the environment is
much more consistent across CI and different development environments.

Alongside that change, this commit also:

- Starts storing the original `about.json` for themes in the database

- Improves qunit error handling when the test environment fails to boot
(e.g. there's a bad import in a plugin)

- Restores plugin CSS in theme qunit tests
2025-07-21 21:00:48 +01:00
Kris
0e1fa31bf9
UX: update groups route on admin users page (#33738)
Now that we have `/admin/groups` lets link there instead of `/g`

Mentioned here:
https://meta.discourse.org/t/can-the-groups-link-on-admin-users-link-to-admin-groups-instead-of-g/375106
2025-07-21 14:17:16 -04:00
Sérgio Saquetim
6698a0288f
DEV: Upgrade AvatarFlair to Glimmer, enhance avatar handling (#33695)
- Migrates the `AvatarFlair` component from classic to Glimmer,
refactoring its implementation and template for improved maintainability
and performance.
- Updates the `PostAvatar` component to use the new value transformer
for avatar size.
- Registers the `"post-avatar-size"` value transformer in the
transformer registry.
- Adds comprehensive integration tests for both `AvatarFlair` and
`PostAvatar` components, ensuring correct behavior for icon/image
rendering, style application, and avatar size/template transformation.

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2025-07-21 15:14:55 -03:00
Kris
57f4f5d60f
UX: show chat in plugin list (#33735)
follow-up to 2d111e2a9a, we're showing all
plugins now but chat was hidden via CSS
2025-07-21 12:01:42 -04:00
dependabot[bot]
0ddf82068e
Build(deps-dev): Bump @swc/core from 1.12.14 to 1.13.1 (#33718)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.12.14 to
1.13.1.
- [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.12.14...v1.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 17:48:03 +02:00
dependabot[bot]
bbbb69f86e
Build(deps): Bump thor from 1.3.2 to 1.4.0 (#33722)
Bumps [thor](https://github.com/rails/thor) from 1.3.2 to 1.4.0.
- [Release notes](https://github.com/rails/thor/releases)
- [Commits](https://github.com/rails/thor/compare/v1.3.2...v1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 17:24:12 +02:00
dependabot[bot]
2886bb3932
Build(deps): Bump multi_json from 1.16.0 to 1.17.0 (#33721)
Bumps [multi_json](https://github.com/sferik/multi_json) from 1.16.0 to
1.17.0.
-
[Changelog](https://github.com/sferik/multi_json/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/sferik/multi_json/compare/v1.16.0...v1.17.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 17:22:32 +02:00
dependabot[bot]
f2efa96cf5
Build(deps-dev): Bump esbuild from 0.25.6 to 0.25.8 (#33720)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.6 to 0.25.8.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.6...v0.25.8)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 17:21:07 +02:00
dependabot[bot]
330450a513
Build(deps-dev): Bump sqlite3 from 2.7.2 to 2.7.3 (#33723)
Bumps [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) from
2.7.2 to 2.7.3.
- [Release
notes](https://github.com/sparklemotion/sqlite3-ruby/releases)
-
[Changelog](https://github.com/sparklemotion/sqlite3-ruby/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/sparklemotion/sqlite3-ruby/compare/v2.7.2...v2.7.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 17:02:37 +02:00
Penar Musaraj
ecb4ece065
DEV: Add validator for enable_discourse_id setting (#33710)
Still an internal beta feature, but without an id and a secret, the
authenticator shouldn't be enabled.
2025-07-21 08:18:36 -04:00
Gerhard Schlager
5cbf465e33
DEV: Fix translator-bot config for more plugins (#33733) 2025-07-21 13:01:17 +02:00
Gerhard Schlager
dbcbd75b20
DEV: Fix translator-bot config (#33732)
The zendesk plugin doesn't have a `server.en.yml`. And this also removes
the `discourse-` prefix for the reactions plugin on Crowdin.
2025-07-21 11:51:27 +02:00
Linca
826dda2d52
FIX: Show bulk removal of expired invites (#33716)
An existing codepath to bulk delete invites exists, but does not show
up. This commit fixes it and also fixes the old code's bug.

Specifically,
- `destroy_all_expired` endpoint only acts on the `current_user` which
is absolutely counter-intuitive, when a person visits another person’s
profile and is able to see the button, clicking it would delete their
own invites and not those of the profile they are visiting.
- In `UserInvitedShowController` the removedAll state is never set to
the original state, which results in the link being displayed in the
list when the new link expires, but the batch deletion cannot be
displayed unless the page is refreshed. It is replaced by a toast.
2025-07-21 17:13:06 +08:00
Linca
c4e876fe2f
FIX: Don't delete keys for unsuccessfully hydrated subtypes (#33615)
`rest_serializer` option allows the backend to send a single response
containing the main object plus all its related data, and the frontend
automatically reconstructs the full object graph with proper
relationships. It is using recurrence, and will automatically detect all
id/ids and try to hydrate them into the corresponding array using the
first part as the model type name.

The problem is that the previous algorithm would delete the source array
regardless of whether the hydration was successful. This caused arrays
such as sidebar_category_ids to be automatically deleted when
currentUser was part of the model.

This commit fixes the above problem by detecting whether the hydration
was successful
2025-07-21 16:46:24 +08:00
Natalie Tay
83670fb01e
FIX: Show localization for regionless locale if they exist (#33702)
Currently if a post is written in Japanese (`ja`) and has been
translated to English (`en`), a British (`en_GB`) user will see the
Japanese post.

WIth this PR we normalize user locales so the best match would show
(`en` first, then `en_GB`, or `pt` and `pt_BR`).

Note: `LocaleNormalizer` is from discourse-ai and will be removed there.
2025-07-21 15:45:14 +08:00
Ted Johansson
24f58cb4b0
DEV: Remove now-redundant is_staff check from PostGuardian (#33714)
A while back we replaced hard-coded #is_staff? checks with group based permissions.

The edit_post_allowed_groups setting has admins and moderators (i.e. staff) as mandatory values, and so we no longer need the explicit staff check.
2025-07-21 15:19:39 +08:00
Ted Johansson
a658e50a48
DEV: Remove now-redundant is_staff check from PostGuardian (part 1) (#33713)
A while back we replaced hard-coded #is_staff? checks with group based permissions.

The edit_post_allowed_groups setting has admins and moderators (i.e. staff) as mandatory values, and so we no longer need the explicit staff check.
2025-07-21 15:15:13 +08:00
Ted Johansson
c1313c365f
DEV: Add test coverage for PostGuardian methods (#33712)
In #33587 we moved PostGuardian related tests from guardian_spec to post_guardian_spec. When doing so we also added stubs for missing tests.

This PR implements those missing tests.
2025-07-21 14:47:53 +08:00
Ted Johansson
00df94e195
FIX: Broken admin user profile bounce score link (#33726)
When we introduced a dedicated admin page for e-mail logs under a new route, this link remained un-updated.
2025-07-21 14:27:28 +08:00
Joffrey JAFFEUX
1f97cf4229
FIX: ensures event builder correctly sets the description (#33700)
For now this commit is going to correctly ensure that when creating a
new event through the form builder we set the description as the body of
the event and not a property. This change allows us to have line breaks
in the description and is now correctly tested.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-07-21 12:49:46 +10:00
Ted Johansson
f8b9153e42
DEV: Add learn more link for admin spam section (#33725) 2025-07-21 10:13:36 +08:00
Bryce Huhtala
e62ce820ce
FIX: CSS Variable name typo (#33717) 2025-07-20 11:04:28 -04:00
Jarek Radosz
987ef0d256
DEV: Incorrect site setting modifications in specs (#33708)
Modifying site settings outside of an example (or `before/after` blocks)
results in corrupting those settings in the test database.

(the was issue introduced in e05ef50c70)
2025-07-19 01:36:51 +02:00
Jarek Radosz
3ef64175f9
DEV: Run qunit tests and system specs for bundled themes (#33704)
Also: check for .gjs tests
2025-07-18 18:49:08 +02:00
Sérgio Saquetim
56ef7ea226
DEV: Add null-safe check for currentRouteName in route:topic._replaceUnlessScrolling (#33696) 2025-07-18 13:27:49 -03:00
chapoi
143783df0b
UX: split out unrelated composer css (#33701)
<img width="1199" height="674" alt="image"
src="https://github.com/user-attachments/assets/6a2a0c95-3ab7-4499-bda5-3f2fbf35ee56"
/>
2025-07-18 17:42:38 +02:00
Gabriel Grubba
3003d29852
SECURITY: Only public subcategories in onebox (#33705) 2025-07-18 11:41:10 -03:00
chapoi
a66b10cc16
UX: Horizon composer-chat interaction (#33677)
* relocated the border-radius to core, so it follows the variable
settings always, not just in Horizon
* changed the interaction-layout in Horizon for composer-chat where
* When opened, chat drawer will always be in front of composer, no
matter which mode (markdown, RTE, peek)
  * When minimised, chat drawer will always be behind the composer
* also changed the color of the chat-drawer when minimised, to stand out
a bit more and to match the de-focussed grippie colour on composer.
* slight change in height of composer when minimised (40 -> 45px) to
match height of chat drawer when minimised

<img width="3452" height="1680" alt="CleanShot 2025-07-17 at 17 14
13@2x"
src="https://github.com/user-attachments/assets/c524b1d8-dab2-4e89-b971-a91be87cc50d"
/>


<img width="3452" height="1680" alt="CleanShot 2025-07-17 at 17 14
01@2x"
src="https://github.com/user-attachments/assets/cb8b38c2-32f4-43f7-bc90-c45c00d9f102"
/>
2025-07-18 10:58:45 +02:00
chapoi
d6d9064e04
UX: decrease font of discourse tags in composer popup (#33679)
<img width="399" height="438" alt="CleanShot 2025-07-17 at 17 43 14"
src="https://github.com/user-attachments/assets/9ec9d4a2-1008-4f04-8a5a-a44c41dedfdc"
/>
<img width="399" height="438" alt="CleanShot 2025-07-17 at 17 43 24"
src="https://github.com/user-attachments/assets/3e7dca2f-2c75-4bbc-b00f-48a551c135c7"
/>
2025-07-18 10:40:05 +02:00
Martin Brennan
79ff804509
FIX: Make sure theme site setting cache is set on theme import (#33697)
This fixes an issue identified in specs where the theme site setting
cache was not being set correctly when importing themes, leading
to an incomplete list of settings being sent down to the client
via the `themeSiteSettingOverrides` preload store.

For example, a theme might have something like this:

```
496=>{:enable_welcome_banner=>false}}
```

Which is missing the `search_experience` theme site setting.

We can address this properly by refreshing the SiteSetting theme
site setting cache after importing themes, ensuring that all
properties are correctly set.
2025-07-18 13:28:05 +10:00
Natalie Tay
bb7c3f840f
DEV: Prevent N+1 for localizations on topic show (#33674)
`post_localizations` are preloaded, but using `find_by`, `exists?`, and
`count` will hit the db.

Use alternatives instead that can make use of the loaded records.
2025-07-18 10:53:55 +08:00
dependabot[bot]
d2bf962f91
Build(deps-dev): Bump jsuites from 5.11.0 to 5.11.1 (#33694)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.11.0 to
5.11.1.
- [Release notes](https://github.com/jsuites/jsuites/releases)
-
[Changelog](https://github.com/jsuites/jsuites/blob/master/changelog.md)
- [Commits](https://github.com/jsuites/jsuites/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-18 01:51:52 +02:00
dependabot[bot]
d38273ff4c
Build(deps-dev): Bump mime-types-data from 3.2025.0708 to 3.2025.0715 (#33693)
---
updated-dependencies:
- dependency-name: mime-types-data
  dependency-version: 3.2025.0715
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-18 01:36:59 +02:00
dependabot[bot]
f6fc7c0062
Build(deps): Bump ostruct from 0.6.2 to 0.6.3 (#33692)
Bumps [ostruct](https://github.com/ruby/ostruct) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/ruby/ostruct/releases)
- [Commits](https://github.com/ruby/ostruct/compare/v0.6.2...v0.6.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-18 01:27:10 +02:00
dependabot[bot]
b276dfc987
Build(deps-dev): Bump syntax_tree from 6.2.0 to 6.3.0 (#33690)
Bumps [syntax_tree](https://github.com/kddnewton/syntax_tree) from 6.2.0
to 6.3.0.
-
[Changelog](https://github.com/ruby-syntax-tree/syntax_tree/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/kddnewton/syntax_tree/compare/v6.2.0...v6.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-18 01:15:59 +02:00
dependabot[bot]
d89cf410c3
Build(deps): Bump json from 2.12.2 to 2.13.0 (#33691)
Bumps [json](https://github.com/ruby/json) from 2.12.2 to 2.13.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.12.2...v2.13.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-18 01:15:24 +02:00