Commit Graph

59711 Commits

Author SHA1 Message Date
0eb6da387c DEV: add tag hashtag data source style type (#33289)
Follow up from #33284 to add the missing style type value. This value
was originally meant for just categories but it makes things much easier
(and more complete) to add these values for other hashtag data types
like tags/channels etc, especially since they have default `icon` values
already.
2025-06-20 18:08:47 +04:00
bb5c2e7a00 FIX: chat message inline onebox url target (#33288)
Chat inline onebox links should open in a new tab with the help of chat
decorators by appending the `target="_blank"` attribute. I suspect this
may have been accidentally broken during a refactor in #31309

The issue was that the element that we pass into the decorator has
changed, meaning that the selector in the decorator would never find
inline links in cooked messages.
2025-06-20 18:04:37 +04:00
a81eaacb1c Build(deps): Bump rails_failover from 2.2.0 to 2.3.0 (#33263)
Bumps [rails_failover](https://github.com/discourse/rails_failover) from
2.2.0 to 2.3.0.
-
[Changelog](https://github.com/discourse/rails_failover/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/discourse/rails_failover/compare/v2.2.0...v2.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-20 13:17:36 +02:00
63cc658891 UX: apply colour vars to svg (#33287)
Small follow-up for #32669

Replacing hardcoded HEX with css var
2025-06-20 12:24:55 +02:00
61dace2d9c Build(deps): Bump terser from 5.43.0 to 5.43.1 (#33280)
Bumps [terser](https://github.com/terser/terser) from 5.43.0 to 5.43.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.43.0...v5.43.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-20 12:21:17 +02:00
e8c483fd62 Build(deps-dev): Bump @swc/core from 1.12.1 to 1.12.3 (#33279)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.12.1 to
1.12.3.
- [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.1...v1.12.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-20 12:01:26 +02:00
3c5cf90f74 UX: scroll to top of form on error (#33276)
This commit ensures the form errors summary is visible on error.
2025-06-20 11:16:54 +02:00
9dadc0141c FEATURE: add link to "associated accounts" providers (#33275)
This adds a link for each authentication providers that are listed in
/my/preferences/account in the "Associated Accounts" section.

This is particularly useful when Discourse is being used in the PWA or
in the DiscourseMobile app where there's no browser bar available and
the only way to visit the provider's website is to open a browser
window.

That way, they can _just_ click the provider's name.

Internal ref - t/156255

---

**BEFORE**

![Screenshot 2025-06-19 at 21 04
46](https://github.com/user-attachments/assets/3d2be5d0-d857-4b8a-b0a5-5672301c59c6)

**AFTER**

![Screenshot 2025-06-19 at 21 03
39](https://github.com/user-attachments/assets/4c8bc5e9-3c99-4924-8d33-547f567bb346)
2025-06-20 10:22:29 +02:00
1a9f577044 DEV: Don’t check model validity when no changes have been made
When fetching a model using the `model` step in a service, if that model
is an `ActiveRecord` object, we check if it’s in a valid state. While
this is useful when manipulating the model or when we create a new one,
it’s not the case for a model we just pulled from the DB, as it should
be valid.

In some cases, running the validations can be costly (it can lead to N+1
queries if the model validates associated items for example).

This patch introduces a small optimization by checking if the model has
any pending changes on it, thus requiring validation. If that’s not the
case, we just skip the validation part, as the model should be valid
anyway.
2025-06-20 09:09:33 +02:00
a5897d2440 DEV: Create rules for AI Coding Agents (#33282)
This is an initial attempt at creating a useful set of development instructions for AI coding agents.
2025-06-20 16:39:04 +10:00
3b5dc4c478 Build(deps): Bump net-imap from 0.5.8 to 0.5.9 (#33277)
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.5.8 to 0.5.9.
- [Release notes](https://github.com/ruby/net-imap/releases)
- [Commits](https://github.com/ruby/net-imap/compare/v0.5.8...v0.5.9)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-20 14:14:30 +08:00
033a805809 Build(deps-dev): Bump rspec-rails from 8.0.0 to 8.0.1 (#33278)
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 8.0.0 to
8.0.1.
-
[Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md)
-
[Commits](https://github.com/rspec/rspec-rails/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-20 14:13:57 +08:00
f138f78f50 DEV: add channel hashtag style type (#33284)
Adds the missing `style_type` that is used to decorate hashtags in core.

All chat channels currently use an icon by default, so declaring the
style type on the channel hashtag data source makes this more complete.
2025-06-20 10:04:36 +04:00
bbf7a37902 FIX: exclude experimental system theme palettes (#33267)
In this PR, system themes were hidden behind site settings
https://github.com/discourse/discourse/pull/33230

When system theme is hidden, color palettes should be hidden as well.
2025-06-20 13:44:18 +08:00
30b0e38877 FEATURE: Add revamped new and unread topic filter education (#32669)
This commit improves the empty states and education
for the new and unread pages, so they are less overwhelming
and more visually pleasant.
2025-06-20 11:24:07 +10:00
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