Commit Graph

59535 Commits

Author SHA1 Message Date
ce9ece434f UX: fix admin reports breadcrumb link (#33085)
`/admin.config.reports` does not exist

Reported here:
https://meta.discourse.org/t/breadcrumb-link-on-admin-reports-returns-404/368982
2025-06-05 09:16:42 -04:00
23eebee825 Build(deps-dev): Bump bullet from 8.0.7 to 8.0.8 (#33081)
Bumps [bullet](https://github.com/flyerhzm/bullet) from 8.0.7 to 8.0.8.
- [Changelog](https://github.com/flyerhzm/bullet/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/8.0.7...8.0.8)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 10:29:55 +02:00
10f45a0efe DEV: Skip flaky system tests (#33084) 2025-06-05 16:10:02 +08:00
60a3fe41d2 FIX: Disallow encoded words in e-mail addresses (#33083)
RFC 5322 allows special characters, including ? and =, to be used in e-mail addresses.

RFC 2047 is an extension that adds a feature called "encoded words" which let you embed different encodings in the same header. However, it explicitly says that these aren't allowed in e-mail address headers.

Encoded words have the format:

encoded-word = "=?" charset "?" encoding "?" encoded-text "?="
Where encoding is either Q or B, but could take on other values in the future.

After this change we consider e-mail addresses with an encoded word inside invalid.
2025-06-05 12:58:01 +08:00
7021c2f789 Build(deps): Bump cgi from 0.4.2 to 0.5.0 (#33077)
Bumps [cgi](https://github.com/ruby/cgi) from 0.4.2 to 0.5.0.
- [Release notes](https://github.com/ruby/cgi/releases)
- [Commits](https://github.com/ruby/cgi/compare/v0.4.2...v0.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 12:34:59 +10:00
c794784138 Build(deps): Bump bigdecimal from 3.2.1 to 3.2.2 (#33078)
Bumps [bigdecimal](https://github.com/ruby/bigdecimal) from 3.2.1 to
3.2.2.
- [Release notes](https://github.com/ruby/bigdecimal/releases)
- [Changelog](https://github.com/ruby/bigdecimal/blob/master/CHANGES.md)
- [Commits](https://github.com/ruby/bigdecimal/compare/v3.2.1...v3.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 03:07:43 +02:00
1e35efc64a Build(deps-dev): Bump rubocop from 1.75.8 to 1.76.0 (#33079)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.75.8 to
1.76.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.75.8...v1.76.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-05 03:06:48 +02:00
e5f1240b7f FIX: ensures post toolbar text can't be selected (#33075)
We suspect it might interfere with text selection of posts on android.
2025-06-04 23:34:14 +02:00
60b3a216e9 DEV: Drop fakeweb dependency (#33069)
This was only be `require`'d by one official plugin
(discourse-perspective), but was causing failures in specs of unrelated
plugins. See
https://github.com/discourse/discourse-perspective-api/pull/110
2025-06-04 14:29:25 +01:00
12811524fe DEV: Support 'cors origins' site setting for message-bus (#33066)
Discourse message-bus traffic is not considered a 'public api' for
general consumption. However, it does make sense to have consistency
with the CORS behavior of the rest of the app, so that people can use it
at their own risk.
2025-06-04 14:22:15 +01:00
f66339338e A11Y: SVG icons should be hidden unless a label is provided (#33059)
This is fairly minor because usually SVGs aren't focusable, but this
adds `aria-hidden='true'` to all SVGs by default unless either an
`aria-label` or `label` is provided. This gets reported to us in
automated tests from time to time.

So now:

1. SVG: `aria-hidden="true"` (new behavior, safe default when no label
is provided)
2. SVG with `label` param: `aria-hidden="true"` and `sr-only` label is
provided
3. SVG with `aria-label` param: `aria-hidden="false"` and `aria-label`
is provided
2025-06-04 08:21:36 -04:00
1633d7788a UX: keep marks when using emoji input rules on rich editor (#33058)
When typing `:emoji:` or `:)` to create emoji nodes through ProseMirror
inputrules, this PR changes the handler to enforce the use of the
existing marks in the current caret position (if it's a link, bold, etc)
so the newly created emoji is marked with the same marks(s).
2025-06-04 07:18:47 -03:00
72326aad65 Build(deps): Bump ace-builds from 1.41.0 to 1.42.0 (#33063)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.41.0 to
1.42.0.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
-
[Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/ajaxorg/ace-builds/compare/v1.41.0...v1.42.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-04 12:04:35 +02:00
009d835095 DEV: remove max similar results site setting (#32936)
We phased out the site setting for `max_similar_results` in #32934 -
this change is a follow up migration to delete the site setting from the
database.
2025-06-04 16:41:03 +10:00
7fce724089 FEATURE: Theme-owned color palettes (#32795)
This commit removes the color palette dropdown from the theme page and replaces it with a new "Colors" tab where the theme's color palette can be edited directly in that tab on the theme page. With this change, a theme's color palette is strongly tied to its theme and can't be linked to other themes and it can't be selected by users without using the theme as well.

All of the changes are behind a feature flag. To enable it, turn on the `use_overhauled_theme_color_palette` setting.

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-06-04 07:47:58 +03:00
a5d6e6ae4d FIX: Respect category/tag filtering for reviewable webhooks (#33051)
Currently, if you configure a webhook with reviewable events and apply
categories/tags filtering, no webhook gets fired for reviewable events.
This is because when we schedule the `EmitWebHookEvent` job, we don't
pass to it the reviewable's category or tags, making it seem like the
reviewable doesn't belong to the filtering category/tags that webhook
specifies.
2025-06-04 10:42:23 +08:00
631d2e3369 FIX: Exclude reviewable_notes from intermediate DB schema (#33068) 2025-06-04 10:31:28 +08:00
4e4ff41d19 FIX: latest duplicated groups to about components (#33003)
When "Add Groups to About" component is duplicated, choose the most
recently updated settings for migration.
2025-06-04 09:48:18 +08:00
727bd5dcfb UX: Add subheader to admin themes page (#32987)
Add subheader with install button to match the Components tab.

Remove the "special" card with the install button from the end of the list.
2025-06-04 09:43:55 +08:00
2eb459116c DEV: Update Bullet to latest version (#32904)
A few minor versions of Bullet were incompatible with Discourse because we use our own content security policy middleware.

This has now been fixed upstream and released in 8.0.7.
2025-06-04 09:40:06 +08:00
1ba8c0dcdc FIX: Back to themes page not working when theme has enabled components (#33048) 2025-06-04 08:59:50 +08:00
599404de31 DEV: Add a ReviewableNote model, and tie it into the Reviewable model. (#33047)
As part of the review queue refresh, we'll be adding the ability for moderators to make notes on individual reviewable items. As a first step, this change adds the new model and associated backend code.
2025-06-04 09:33:02 +10:00
d4644733a5 Build(deps): Bump @babel/standalone from 7.27.4 to 7.27.5 in the babel group (#33062)
Bumps the babel group with 1 update:
[@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.27.4 to 7.27.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/babel/babel/commits/v7.27.5/packages/babel-standalone)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-04 01:07:57 +02:00
246eca1258 Build(deps-dev): Bump rubocop-ast from 1.44.1 to 1.45.0 (#33064)
Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast) from 1.44.1
to 1.45.0.
- [Release notes](https://github.com/rubocop/rubocop-ast/releases)
-
[Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop-ast/compare/v1.44.1...v1.45.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-04 01:07:35 +02:00
0263336693 Build(deps-dev): Bump mime-types-data from 3.2025.0527 to 3.2025.0603 (#33065)
Bumps [mime-types-data](https://github.com/mime-types/mime-types-data)
from 3.2025.0527 to 3.2025.0603.
-
[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.0527...v3.2025.0603)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-04 01:07:24 +02:00
88ce76bd16 DEV: Added the ability to use users' names in group mention notifications and mentions shown in emails (#33055)
**Description**
These changes were introduced in a previous PR but were reverted due to
a bug when several users were mentioned in a response. This PR
reintroduces the changes along with a fix to the issue.

This is part of a series of changes to allow customers to display users'
names instead of the user's username.

When a user belongs to a group that has been mentioned by another user.
It shows the name of the user that mentioned the group.

[Previous
commit](e147d2afe6)

**Before**


![imagen](https://github.com/user-attachments/assets/b62224fb-9b69-4603-be00-e7aa61d9b33c)

**After**


![imagen](https://github.com/user-attachments/assets/8495cb63-6530-4d86-a51c-f0510d48f6c7)

When a email is sent to the user when mentioned in a post 

**Before**



![imagen](https://github.com/user-attachments/assets/94e674da-085a-41cb-8145-ba6fbe3636ce)

**After**


![imagen](https://github.com/user-attachments/assets/490cb365-bf85-4745-93b9-e47048b2f02e)
2025-06-03 15:49:55 -05:00
25e80511f7 UX: rich editor [details] caret hover and padding (#33057)
Improves the styles for the [details] caret pseudo-element on the rich
editor.

Additionally, having `summary` have no `pointer-events` is important so
Firefox doesn't mess with our caret positioning when clicking it.
2025-06-03 15:23:21 -03:00
8873a33b7a FIX: uses text selection when using hide details (#33049)
When hiding details if the user has currently a text selection we want
to use it as the content of the details element.

/t/-/154716/30
2025-06-03 19:53:45 +02:00
10a484fa4e UX: Update theme cards min width (#33045)
This PR allows for three cards per row at medium screen sizes and
placeholder images go all the way to the edges.

### Before
<img
src="https://github.com/user-attachments/assets/4526b39a-dcf8-4d38-ac6f-2179ef920144"
width="400"/>

### After
<img
src="https://github.com/user-attachments/assets/cc81853b-b99e-488b-9244-efc1cb803211"
width="400"/>
2025-06-03 11:31:29 -06:00
221380ac80 UX: Margin top to first onebox in topic (#33054) 2025-06-03 10:49:35 -05:00
b08d5ad7b7 Update translations (#33052) 2025-06-03 17:37:13 +02:00
6e00357ea6 UX: fast topic edit (#32941)
Changes of this commit:
- edit pencil will only show on hover on desktop
- clicking the topic title will display the topic edit UI

https://github.com/user-attachments/assets/58c55351-96ed-4f2d-8bd6-569310901cf0

/t/-/154792
2025-06-03 16:30:30 +02:00
ef9f5ccee1 Build(deps): Bump prosemirror-view from 1.39.3 to 1.40.0 in the prosemirror group (#33040)
Bumps the prosemirror group with 1 update:
[prosemirror-view](https://github.com/prosemirror/prosemirror-view).


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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 16:01:18 +02:00
df1bede9f7 FIX: when new new is enabled, filter dismiss modal to correct type (#33037)
Currently both boxes are always checked, even if you're filtered to new
topics or new posts.

You must have the site setting `Experimental new new view groups` set to
your user's group to see this mode.



![image](https://github.com/user-attachments/assets/f485ad66-7491-4f52-a812-4b5f9dba6d63)

This allows both options to appear, but only selects the current filter:


![image](https://github.com/user-attachments/assets/6a3c1a91-1638-440f-80e3-4d74711d8064)

Turns out this was already implemented, but `subset` was always
undefined. This fixes the arg and adds a couple new specs to cover it.

see /t/155039 for reference
2025-06-03 09:47:06 -04:00
8ac9c6b13c Build(deps): Bump @floating-ui/dom from 1.7.0 to 1.7.1 (#33041)
Bumps
[@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom)
from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
-
[Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
-
[Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.7.1/packages/dom)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 15:30:57 +02:00
f0e72f6206 FIX: handle redirect issue with categoryId rewriting page number (#33009)
### Description
When accessing a category via
`<baseUrl>/c/<categoryId>.json?page={pageNumber}`, it issues a redirect
to `<baseUrl>/c/<categorySlug>/<categoryId>.json?.....`. During this
redirect, any numeric occurrence matching the categoryId in the query
string is also rewritten - including the page parameter - causing
incorrect behavior (e.g., `page=5` becoming `page=community/5`).

This PR fixes the logic ensuring that the query parameters remain
intact.

### How to reproduce?
Try opening this link https://meta.discourse.org/c/10.json?page=10 in
the browser. It will throw a 400 Bad Request error. When we inspect the
url, we will notice the page number has been replaced by the
`slug/categoryId`
2025-06-03 15:45:21 +08:00
9613f657d0 DEV: remove educational tips and associated site settings (#33012)
Removes the composer educational tips for:

- upload avatar
- sequential replies 
- reviving old topic

We are also removing the associated site settings that are now
redundant:

- Disable avatar education message
- Sequential replies threshold
- Warn reviving old topic age
2025-06-03 09:44:35 +04:00
d24b79a004 UX: more consistent search menu spacing (#33036)
This gives the search input in the header dropdown consistent spacing by
adding top padding to the results wrapper (always present), which avoids
issues like this (too little space below while loading):


![image](https://github.com/user-attachments/assets/2b9c0ff2-b0fe-4334-a69c-d3e47cfd86fc)

Also fixes this slight misalignment (`test in all topics and posts` has
an extra space on the left):


![image](https://github.com/user-attachments/assets/831efebd-6fbc-4274-b6a7-dad4c3aebb34)


![image](https://github.com/user-attachments/assets/740b318c-6098-4b05-aad2-cc4feb35e79b)
2025-06-03 15:31:49 +10:00
f819b1ec4d FEATURE: Add option to make <AceEditor /> resizable (#33044)
This commit adds a `@resizable` argument to `<AceEditor />`
and sets it to true always for the FormKit code control.
This allows the user to vertically resize the editor inside
FormKit forms. Horizontal resizing is not allowed at this
time, it's more unpredictable for layout, and the vertical
resizing is mostly what's needed anyway.

Also changes the FormKit code control to use min-height of
250px so the inline style height takes precedence, before
it was a hardcoded !important height.
2025-06-03 15:22:48 +10:00
bdebaf3b1c DEV: Add enable_welcome_banner setting to Interface section (#33043)
This setting didn't have an area. Putting it in Interface & layout.
2025-06-03 09:53:33 +08:00
9a5aa2d8f1 Build(deps): Bump aws-eventstream from 1.3.2 to 1.4.0 (#33039)
Bumps [aws-eventstream](https://github.com/aws/aws-sdk-ruby) from 1.3.2
to 1.4.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
-
[Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-eventstream/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.3.2...1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 09:43:43 +08:00
35101c99f6 Build(deps-dev): Bump puppeteer-core from 24.9.0 to 24.10.0 (#33042)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.9.0 to 24.10.0.
- [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.9.0...puppeteer-core-v24.10.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-06-03 09:43:35 +08:00
e6cae5d879 UX: Onebox changes (#33038) 2025-06-02 20:29:29 -05:00
a48f33fda0 FIX: Ensure copy_data callbacks run even when all rows are skipped (#33002)
Currently, if a batch "copy" of an import step results in all rows being
skipped, the `after_commit_of_skipped_rows` callback is never triggered.
This happens because the callback is nested inside a block that only
runs when at least one row is inserted.

This change ensures the DB copy operation returns both inserted and
skipped rows, allowing the caller to respond appropriately in either
case.

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-06-02 23:07:28 +02:00
9f1dda2f02 DEV: Require created_at on users (#33033)
Add a table-level override to require `created_at` on `users` table
2025-06-02 14:08:38 +00:00
3a01b69b76 UX: make sure search context is kept when navigating (#33016)
Uses a getter to reactively re-render the search context (eg. "in
messages").

Also fixes an issue where although the in:messages suggestion appeared,
it didn't work to add the PM context.
2025-06-02 11:03:02 -03:00
1ee51f2e3b DEV: extract composer toolbar class for future reuse (#32897)
Starts defining a more generic API, so a different toolbar instance can
be used as a replacement on the main toolbar as well as a foundation for
rendering the same toolbar as a floating element.

This toolbar reuse started here for the link toolbar:
https://github.com/discourse/discourse/pull/32583, then got extracted to
this PR.

---------

Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com>
2025-06-02 11:02:52 -03:00
01a35c4243 Build(deps): Bump the babel group with 2 updates (#33026)
Bumps the babel group with 2 updates:
[@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core)
and
[@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/core` from 7.27.3 to 7.27.4
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/babel/babel/commits/v7.27.4/packages/babel-core)

Updates `@babel/standalone` from 7.27.3 to 7.27.4
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/babel/babel/commits/v7.27.4/packages/babel-standalone)

---------

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-06-02 16:01:06 +02:00
b27de48622 UX: Update some delete confirmation dialogs (#33018) 2025-06-02 09:14:58 -04:00
3ff96d6cfc FIX: correctly unescape title for amazon oneboxes (#33010)
Fixes `&amp;` in onebox title and replaces with `&`.
2025-06-02 17:50:13 +05:30