This PR relates to the locale setting in the composer and fixes 2
quirks:
- When replying to a post, the composer sets the locale of the new post
in composer to the locale of the post being replied. This PR defaults
the value to "none"
- When creating a new post, the composer sets the locale to the user's
locale. However we are seeing the behaviour that users do not write in
the locale they set their profile to. This PR defaults the value to
"none"
- improve the contract a little
- use `model` where possible
- extract message existence logic to a dedicated policy, allowing easier
testing.
- remove unused code
- refactor specs to follow current guidelines/best practices
Fixes an issue where the admin search results was showing
breadcrumbs with a double up of the parent label. For example,
we would show "Plugins > Plugins > AI > Usage" or
"Advanced > Advanced > Backups > Logs".
Also adds a missing translation for the chat incoming webhooks
page.
This change adds an API for retrieving the current value of a component within a FormKit form. It makes use of the existing `@onRegisterApi` parameter, adding a `get()` method to match the existing `set()` method.
The FormKit textarea component was using `@field.value` as inner content, preventing dynamic updates to the `textarea` value through the form API.
This change moves the `textarea` value to being set in the `value` attribute, instead.
Followup 30b0e38877af703606042cf1a2997a9a06582c32
Changes margin to padding for topic filter empty state to prevent the
"See X new or updated topics" banner from overlapping with the empty
state
when there are no topics in the filter.
This commit starts to introduce services to replace actions in the
ThemesController. We will start with the low langing fruit:
* Create
* Destroy
* BulkDestroy
* GetTranslations
Endpoints like #import and #update will be much harder.
Also, the https://github.com/discourse/discourse-theme-creator plugin
overrides some of these controller actions directly, so we need
to be careful.
In an upcoming pr #33092 that adds support for aws-sdk-mediaconvert it
requires
that we bump aws-sdk-core to 3.225.0
```
+ aws-sdk-mediaconvert (1.160.0)
+ aws-sdk-core (~> 3, >= 3.225.0)
```
but in doing so there are apparently some api changes and it requires
changes
in core to support the new version. I thought it would best to break out
these
changes in a separate PR as to not muddy up the mediaconvert pr that is
already
quite large.
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.
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.
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**

**AFTER**

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.
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.
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.
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.
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
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"
/> |