Commit Graph

59696 Commits

Author SHA1 Message Date
c9425c93cc FIX: ensures empty fields don't store an empty array (#33274)
This is a follow-up to
299d28cb73
to apply it to more fields.
2025-06-19 20:46:48 +02:00
35d9688aa3 UX: Add tertiary-25 color variable (#33273) 2025-06-19 13:05:55 -05:00
299d28cb73 FIX: ensures empty tags field is not storing an empty array (#33270)
This would happen in the following scenario:
- select a tag
- save the automation
- unselect the tag
- save the automation

You would end up with a field having `[]` as value instead of `nil`.
This can cause issues in the logic of scripts and triggers as they might
consider the value as present.
2025-06-19 17:06:22 +02:00
af11b23309 FIX: add channel hashtag color when lazy load is disabled (#33269)
When category lazy loading was disabled, chat channel CSS classes were
not being inserted into the page markup. This meant that they would not
be styled correctly in the markdown editor preview.
2025-06-19 18:54:11 +04:00
81b4cb776b FIX: prevent login loop when logging out when only one idp (#33266)
When we migrated to the full page /login, we added a nice feature that
will automatically redirect a user to the idp if it's the only way they
can log in, thus avoiding unecessary click.

But when logging out, we would redirect to the /login page which would
start the /login process by automatically redirecting the user to the
idp...

The fix is easy, redirect back to `/login-required` after logging out
instead. This will show the "splash" screen that asks the user to either
log in or sign up.

Note: I also removed the `Discourse::Utils::EMPTY_KEYWORDS` since it was
its last occurence and I'm pretty sure we dropped support for Ruby 2 a
while ago...

Internal ref - t/156834
2025-06-19 15:02:54 +02:00
5307a1c8e9 Build(deps-dev): Bump matrix from 0.4.2 to 0.4.3 (#33262)
Bumps [matrix](https://github.com/ruby/matrix) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/ruby/matrix/releases)
- [Changelog](https://github.com/ruby/matrix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ruby/matrix/compare/v0.4.2...v0.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-19 11:22:36 +02:00
6dcddb3906 Build(deps): Bump ostruct from 0.6.1 to 0.6.2 (#33261)
Bumps [ostruct](https://github.com/ruby/ostruct) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/ruby/ostruct/releases)
- [Commits](https://github.com/ruby/ostruct/compare/v0.6.1...v0.6.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-19 11:22:17 +02:00
8c2b8dbbe4 Build(deps): Bump rdoc from 6.14.0 to 6.14.1 (#33260)
Bumps [rdoc](https://github.com/ruby/rdoc) from 6.14.0 to 6.14.1.
- [Release notes](https://github.com/ruby/rdoc/releases)
- [Changelog](https://github.com/ruby/rdoc/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rdoc/compare/v6.14.0...v6.14.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-19 11:22:00 +02:00
3364bd7edb Build(deps): Bump faraday-retry from 2.3.1 to 2.3.2 (#33264)
Bumps [faraday-retry](https://github.com/lostisland/faraday-retry) from
2.3.1 to 2.3.2.
- [Release notes](https://github.com/lostisland/faraday-retry/releases)
-
[Changelog](https://github.com/lostisland/faraday-retry/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/lostisland/faraday-retry/compare/v2.3.1...v2.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-19 11:21:45 +02:00
fe30ffa3f9 DEV: Remove 'experimental' prefix from settings (#33233)
This PR takes the localization features out of "experimental" to prep
for the announcement
- rename settings and gives them its own area
- `experimental_content_localization` to `content_localization_enabled`
- `experimental_content_localization_allowed_groups` to
`content_localization_allowed_groups`
- `experimental_content_localization_supported_locales` to
`content_localization_supported_locales`
- `experimental_anon_language_switcher` to
`content_localization_anon_language_switcher`
- migration
- related to https://github.com/discourse/discourse-ai/pull/1439

| screenshot 📸 |
|---|
| <img width="964" alt="Screenshot 2025-06-17 at 5 06 32 PM"
src="https://github.com/user-attachments/assets/9a8b2c38-c846-4fc9-8ddd-815c45cc3d0e"
/> |
2025-06-19 12:23:42 +08:00
eefcbb554d DEV: Add outlet wrapper for post avatar flair (#33265)
This adds an outlet wrapper for post avatar flair to keep in line with 
the existing pattern we see with user card and profile avatar flair.
2025-06-18 20:29:40 -07:00
8cc009ceeb Build(deps-dev): Bump puppeteer-core from 24.10.1 to 24.10.2 (#33256)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.10.1 to 24.10.2.
- [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.10.1...puppeteer-core-v24.10.2)

---------

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-19 00:44:12 +02:00
473347eccb UX: add labels and update title of insert link modal (#33252)
Adds input labels, updates placeholders, and updates the modal title for
the insert/edit link modal.

**Before**

![image](https://github.com/user-attachments/assets/2fc40d54-8936-426e-81e2-ceea7dcd5249)


**After**

![image](https://github.com/user-attachments/assets/31b772de-e755-411d-b1e4-7014af0a8847)
2025-06-18 17:20:06 -03:00
8cf5585cc2 DEV: allows to disable ancestorScroll on float-kit (#33251)
Usage:

```gjs
<DMenu @updateOnScroll={{false}} />
```

https://floating-ui.com/docs/autoUpdate#ancestorscroll

No test as it's hard to test a scrolling behavior.
2025-06-18 18:16:20 +02:00
daa77feb73 UX: fix rich editor link toolbar misalignment (#33249)
Fixes a misalignment in the link toolbar caused by `DButton`'s zero
width space for icon-only buttons.

Also removes the horizontal margin of the toolbar separator, that was
causing an odd misalignment impression unnecessarily.

**Before**

![image](https://github.com/user-attachments/assets/b68b1199-5ce4-46fb-a7b2-eeb2439e4f80)


**After**

![image](https://github.com/user-attachments/assets/1776dda7-9205-4f8c-840e-764fcd4695e7)
2025-06-18 11:13:37 -03:00
15a491d2d0 FEATURE: add emojis to seeded categories (#33248)
This change adds some flair to the default seeded categories by adding
emojis for new sites.
2025-06-18 17:25:12 +04:00
76017950ab Build(deps-dev): Bump jsuites from 5.10.0 to 5.11.0 (#33241)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.10.0 to
5.11.0.
- [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-06-18 15:20:19 +02:00
ea56480681 Build(deps-dev): Bump ember-cli from 6.4.0 to 6.5.0 (#33223)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 6.4.0 to
6.5.0.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
-
[Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli/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-06-18 15:18:08 +02:00
4f2a8d39da FIX: correctly refreshes associated fields after update (#33246)
The `on_update` callback of triggers is called with previous fields and
new fields, values. However since a recent change:
https://github.com/discourse/discourse/pull/32810 this relationship is
cached and would cause previous fields to equal new fields. This commit
ensures we are refreshing the relationship before calling the
`on_update` callback.
2025-06-18 14:01:09 +02:00
b76931cd57 Build(deps): Bump postcss from 8.5.5 to 8.5.6 (#33224)
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.5 to 8.5.6.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.5...8.5.6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-18 11:17:20 +02:00
11e498f9f9 Build(deps): Bump redis-client from 0.24.0 to 0.25.0 (#33243)
Bumps [redis-client](https://github.com/redis-rb/redis-client) from
0.24.0 to 0.25.0.
-
[Changelog](https://github.com/redis-rb/redis-client/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/redis-rb/redis-client/compare/v0.24.0...v0.25.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-18 10:26:02 +02:00
15937ff736 Build(deps-dev): Bump rubocop from 1.76.1 to 1.76.2 (#33242)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.76.1 to
1.76.2.
- [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.76.1...v1.76.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-18 10:25:17 +02:00
0bfa48c7f6 Build(deps): Bump terser from 5.42.0 to 5.43.0 (#33240)
Bumps [terser](https://github.com/terser/terser) from 5.42.0 to 5.43.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.42.0...v5.43.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-18 10:25:05 +02:00
12787b1baf Build(deps-dev): Bump mime-types-data from 3.2025.0610 to 3.2025.0617 (#33244)
Bumps [mime-types-data](https://github.com/mime-types/mime-types-data)
from 3.2025.0610 to 3.2025.0617.
-
[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.0610...v3.2025.0617)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-18 10:19:33 +02:00
b1833b6473 FIX: Incorrect key being used in S3Helper#upsert_tag (#33245)
This is a follow up to b02bc707dec12c607511d4a95c7d791f63131b49 where
the `S3Helper#upsert_tag` method was introduced. Using the method
resulted in an error being thrown because the key was incorrect.
2025-06-18 14:08:56 +08:00
9a3225681a DEV: Update link to comment in robots.txt as 'allow' is allowed (#33227)
The old link http://www.robotstxt.org/robotstxt.html seems to indicate
that `allow` is not allowed.
2025-06-18 13:30:26 +08:00
0b6155a8d8 Update translations (#33235) 2025-06-17 23:07:42 +02:00
91d697cfab UX: fix toolbar tooltip regression (#33237)
Fixes regression added on
https://github.com/discourse/discourse/pull/33228


![image](https://github.com/user-attachments/assets/4288046c-e749-4a3c-a227-e6c75213c2d9)
2025-06-17 11:19:48 -03:00
6e22f8fac8 DEV: Remove generic exception in model step in services
Currently when a model is not found, we raise an `ArgumentError`
exception and that exception is stored in the resulting context object.

However, since we’re also storing unexpected exceptions, this default
exception can pollute the context object when we need to inspect it or
act on it.

This patch addresses that issue by raising a custom exception instead,
and we then discard it from the context object.
2025-06-17 16:12:28 +02:00
d45ebd746c DEV: Add Discourse ID authenticator (#33186)
Adds a Discourse ID authenticator. Not available for use in production
just yet, but soon communities will be able to use this service to let
users authenticate using a central Discourse ID account.

Includes a support for a `/revoke` action, allowing users to log out of
multiple client instances from a central auth service.

Internal ticket: t/155397
---------

Co-authored-by: Loïc Guitaut <loic@discourse.org>
2025-06-17 09:47:00 -04:00
2362bf740d UX: strip base url and https/mailto protocol from link toolbar (#33228)
Strips the site's base URL and `https`/`mailto` protocols from the link
toolbar display


![image](https://github.com/user-attachments/assets/9a38c840-63bb-4a74-a210-f66dd56766cf)

Refactors the toolbar to use getters instead of function calls, re-uses
`DButton` for the `href` toolbar item instead of a custom `a` tag, fixes
a bug where we passed a translated string to DButton's `label` that
expects a i18n key, and adds support to “disabled” buttons.

Slightly simplifies the toolbar implementation by extracting one step of
indirection removing `toolbarButton` from d-editor.
2025-06-17 10:41:19 -03:00
aab7b9fc68 DEV: Use imports for select-kit components & deprecate string lookups (#33219) 2025-06-17 10:40:46 +01:00
342e9208b3 FIX: Upload#update_secure_status not updating s3 access control (#33232)
This commit is a follow-up to b02bc707dec12c607511d4a95c7d791f63131b49
where `Upload#update_secure_status` does not call
`FileStore::S3Store#update_upload_access_control` if
`s3_use_acls` is disabled. This is no longer correct as an upload's
access control on S3 can now be based on tags if the
`s3_enable_access_control_tags` site setting is
enabled.

To fix this, this commit removes the `s3_use_acls` check in
`Upload#update_secure_status` and updates
`FileStore::S3Store#default_s3_options`
to not set the `acl` option if the `s3_use_acls` site setting is
disabled.
2025-06-17 16:28:36 +08:00
cb7d26fae5 DEV: change experimental_system_themes setting to list (#33230)
Before it was Boolean. 
The list is giving more control over which system themes should be
displayed.
2025-06-17 15:41:19 +08:00
da1de52a06 FIX: Wrong argument error in FileStore::S3Store#update_access_control (#33231)
This commit is a follow up to b02bc707dec12c607511d4a95c7d791f63131b49.
When the `s3_enable_access_control_tags` site setting is enabled,
calling `FileStore::S3Store#update_access_control` will result in a
argument error.
2025-06-17 15:18:14 +08:00
1a2b003d35 FIX: import Horizon system theme (#33229)
System themes were introduced here -
https://github.com/discourse/discourse/pull/32681

In this PR, Horizon is imported.
2025-06-17 14:03:38 +08:00
c00c522530 DEV: Adds hasNoPreferredMode to chat state manager (#33213)
This commit introduces a new property `hasNoPreferredMode` to the
chat state manager, which represents a user who has not purposely
set chat mode to drawer or full page, meaning they have no LocalStorage
value set.

This can be useful for themes to change the chat mode but only
if the user has no preference already.

c.f.
https://meta.discourse.org/t/full-screen-chat-as-default-for-collaboration-setup/369849
2025-06-17 13:22:42 +10:00
6ea31d32f0 DEV: Fix lograg logger and log_level not following rails log_level (#33218)
Before this change, we were relying on the `lograge`'s gem default
`log_level` of `info`. However, `lograge` should be following
`Rails.application.config.log_level` instead and this commits seeks to
correct that behaviour.
2025-06-17 09:59:58 +08:00
c5a38d3c2e Build(deps-dev): Bump lefthook from 1.11.13 to 1.11.14 (#33225)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.11.13
to 1.11.14.
- [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.11.13...v1.11.14)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-17 09:34:58 +08:00
6c049af5c4 FIX: ignore SiteSetting.max_image_size_kb for theme screenshots (#33215)
Theme screenshots have their validations:
https://github.com/discourse/discourse/blob/main/lib/theme_screenshots_handler.rb#L4

Therefore, validations in `UploadCreator` can be ignored. Currently, the
import of system themes is crashing when the value is too low for
`SiteSetting.max_image_size_kb` .
2025-06-17 08:58:37 +08:00
c84e1abd03 UX: reload the page when the default theme is changed (#33217)
When the default theme is changed, reload the page to present new theme
to the admin.


https://github.com/user-attachments/assets/d127ea36-6960-419e-820e-265321dad0cd
2025-06-17 08:58:27 +08:00
a513a1cfb7 UX: Make the theme title fully clickable + accessible (#33205)
### What I changed

- Wrapped the theme title and the pencil icon in a single `DButton` so
the whole thing is clickable
- Added ARIA stuff: heading role, level, and label to help screen
readers know it’s both a title and editable

### Why

Changed it so the entire title acts as the edit trigger, instead of just
the icon.

[Kapture 2025-06-13 at
16.34.12.webm](https://github.com/user-attachments/assets/c44049a0-bfd0-455a-94a3-fe9ec4d387ff)
2025-06-16 16:51:44 -06:00
2364d3ccd0 DEV: Add an InterpolatedTranslation component. (#33082)
A new `<InterpolatedTranslation>` component for interpolating components into translatable strings.

This change also includes a little bit of refactoring in the `i18n` library to make it easier to hook into.
2025-06-17 07:52:06 +10:00
81b851824f FIX: rich editor mention case sensitivity (#33222)
Ensures we match user names and group names with case insensitivity.
2025-06-16 17:50:31 -03:00
47287c888d DEV: updates discourse-emojis to 1.0.41 (#33220)
This will improve support for emojis with diacritics like piñata and côte d'ivoire:

-
8cb7010842
-
5ff5c72aa2
2025-06-16 20:01:06 +02:00
fb9343891c DEV: Rename codemodded class names (#33198) 2025-06-16 16:31:57 +02:00
c222627313 DEV: Allow using %{base_path} in theme setting descriptions (#33180)
This brings them in line with site setting descriptions
2025-06-16 15:04:00 +01:00
0c6c8e9ec7 FEATURE: add plugin outlet to category settings images tab (#33155)
Allows plugins and themes to inject custom content or UI extensions
specifically for the image settings of each category.
2025-06-16 14:55:36 +01:00
b63d5121d6 Build(deps-dev): Bump @swc/core from 1.12.0 to 1.12.1 (#33211) 2025-06-16 15:50:23 +02:00
2f6ac0ec2f Build(deps): Bump faraday-net_http from 3.4.0 to 3.4.1 (#33212) 2025-06-16 15:48:29 +02:00