2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-03 17:21:20 +08:00
Commit graph

59841 commits

Author SHA1 Message Date
Discourse Translator Bot
59367ac03f
Update translations (#33409) 2025-07-02 22:36:37 +02:00
Régis Hanol
2d2ba55271
DEV: add login-required wrapper plugin outlet (#33435)
One can use it in a plugin to override the whole "login-required"
template without having to replace all the different (and smaller)
plugin outlets already available in that template.

Internal ref - t/154909
2025-07-02 21:39:37 +02:00
Joffrey JAFFEUX
a6e35de257
DEV: adds support for startsWith/endsWith validation (#33446)
Usage:

```gjs
<form.Field
  @title="Name
  @name="name"
  @validation="startsWith:foo|endsWith:bar"
  as |field|>
    <field.Input />
</form.Field>
```
2025-07-02 17:21:30 +02:00
Kris
555b69c932
UX: fix title status icon size (#33442) 2025-07-02 09:48:59 -05:00
Kris
73be80d22f
A11Y: autofocus topic map DMenu contents for links, likes, and users - fix links (#33419)
This traps focus for these topic map menus (links, likes, and users)


![image](https://github.com/user-attachments/assets/c56993e7-03f9-47a4-a8a3-6eece4a5fe77)

and also restructures the links in the link menu to avoid `display:
contents;` — unfortunately `display: contents;` can make content within
inaccessible with keyboard nav

So instead I've restructured it to use subgrid, which avoid the issue
without changing the visuals.


![image](https://github.com/user-attachments/assets/edf74a0b-6a0d-4f98-a4f5-0151ef327cb6)
2025-07-02 09:48:21 -04:00
David Taylor
9166076c66
FIX: Run post-adopt decorators correctly in glimmer post-stream (#33440)
This will fix the `lib/lazy-load-images` decorator, which sets the
background color of images while they're loading
2025-07-02 14:13:33 +01:00
Osama Sayegh
31d9d5b078
DEV: Move AdminConfigAreaCard back to the admin bundle (#33429)
Follow up to 0ccf792b91

In the linked commit, I moved the `AdminConfigAreaCard` component out of the
admin bundle and into the main discourse bundle to make the new
`addCardToAdminThemesGrid` API method, introduced in the same commit, work
without breaking the site for non-staff users who don't get the admin
bundle.

However, there's a better way to go about this without forcing us to
move the component file to the main bundle which is to introduce a new
`PluginOutlet` since it effectively does the same thing as the
`addCardToAdminThemesGrid` API method and it's already a well
established pattern for letting plugins customize and add content to
Discourse pages.
2025-07-02 14:03:33 +03:00
Joffrey JAFFEUX
6084c9e7d5
FIX: ensures we have a cooked to work with (#33439)
At this point cooked could be null and checking if it's inside a small
action is useless and would generate an error which wouldn't break
anything but is something we want to avoid.
2025-07-02 12:22:11 +02:00
David Battersby
e91024a221
FIX: render emojis in cooked hashtag text for composer rich text mode (#33395)
Correctly renders emojis within hashtag text (ie. chat channel titles)
in composer rich text mode.
2025-07-02 08:43:31 +01:00
Joffrey JAFFEUX
732c0f47af
FIX: ensures small actions don't trigger post toolbar (#33422) 2025-07-02 08:11:58 +02:00
Krzysztof Kotlarek
052cebce48
FIX: Horizon default color scheme must be user selectable (#33428)
Improvements:
- When import Horizon theme, ensure that default color scheme is marked
as `user_selectable`
- Dark version of the theme is `user_selectable` as well
- When merge remote Horizon into system Horizon, also ensure that
default color scheme is marked as `user_selectable`
2025-07-02 13:40:44 +08:00
Alan Guo Xiang Tan
db49566d90
DEV: Display flag reasons and count for reviewable in refreshed UI (#33408)
This commit adds a header with badges indicating why a reviewable was
created in the refreshed reviewable UI that is currently being hidden
behind the `reviewable_ui_refresh` site setting.

Co-authored-by: Gary <gary@pento.net>
2025-07-02 13:34:31 +08:00
Yuriy Kurant
30450f0449
UX: remove messages section from sidebar (#33358)
Remove the *Messages* section from the sidebar to reduce the sidebar
clutter.

Add a *My Messages* link to the top section of the sidebar.
2025-07-02 12:42:00 +08:00
Gary Pendergast
b47b167b40
FIX: Ensure client-side reviewable claiming data is set correctly (#33405)
`ReviewableClaimedTopic` has an `onClaim` arg, which is used by the calling components to locally mutate the value of `reviewable.claimed_by`.

This was being incorrectly mutated to a `User` model, when it needs to match the `ReviewableClaimedTopicSerializer` output.
2025-07-02 14:22:23 +10:00
Yuriy Kurant
27ebc07f7c
FIX: escapes display:none for subheader in welcome banner for Horizon (#33411)
In Horizon theme all paragraphs in welcome banner are hidden (for some
reason).

Adding exception for `.welcome-banner__subheader` subheader, if it is in
the DOM.
2025-07-02 10:58:42 +08:00
Krzysztof Kotlarek
f40834a679
UI: improvement for the admin system theme (#33406)
List of small changes for the system Horizon theme:
- Remove"Created by: system"
- Remove All Extra Files section
- Move translation to core
- Remove settings editor button
- Remove export button
2025-07-02 10:57:09 +08:00
Linca
863620a948
FIX: Show tip for required selectable field on signup when not selected (#33401)
Dropdown and multiselect components lack `InputTip`, which makes them
not show any reason when validation fails.

This commit also adds a new i18n message for select fields, after this
commit, if a multiselect or dropdown custom field required has no option
selected, it will display a `Please select a value for "XX" field`
validation error when the Signup button is clicked.
2025-07-02 09:54:23 +08:00
dependabot[bot]
794ef61f37
Build(deps-dev): Bump @swc/core from 1.12.7 to 1.12.9 (#33425)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.12.7 to
1.12.9.
- [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.7...v1.12.9)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-02 09:13:39 +08:00
dependabot[bot]
ba98933863
Build(deps-dev): Bump puppeteer-core from 24.11.1 to 24.11.2 (#33427)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.11.1 to 24.11.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.11.1...puppeteer-core-v24.11.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-07-02 09:13:22 +08:00
dependabot[bot]
cfd2720897
Build(deps): Bump @faker-js/faker from 9.8.0 to 9.9.0 (#33426)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.8.0 to
9.9.0.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](https://github.com/faker-js/faker/compare/v9.8.0...v9.9.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-02 09:13:08 +08:00
Juan David Martínez Cubillos
8ffc9dcb70
FIX: UppyUploader issues when authorized_extensions setting is blank but authorized_extensions_for_staff is not (#33423)
**Problem**
An error is showing up for staff members when trying to upload images
and `SiteSetting.authorized_extensions = ""` and
`SiteSetting.authorized_extensions_for_staff != ""` because
`this.currentUser` is not defined in the `UppyUploader` component
2025-07-01 18:39:47 -05:00
Jordan Vidrine
802e5420ce
DEV: Add scss var back (#33417) 2025-07-01 14:33:46 -05:00
Renato Atilio
818511cc28
UX: avoid suppressing non-click events when dragging the grippie (#33415)
Scopes a check introduced on
https://github.com/discourse/discourse/pull/33046 to `mousedown` events,
it was preventing touch events to be used to drag the grippie.

Reported on
[meta.discourse.org](https://meta.discourse.org/t/composer-resizing-problems-while-using-a-tablet/370706).
2025-07-01 15:40:29 -03:00
David Taylor
bccac3ebfb
DEV: Add include_raw to list of forwarded topic query params (#33412) 2025-07-01 19:16:52 +01:00
Jordan Vidrine
e4be2df16a
DEV: Spacing variables (#33383) 2025-07-01 13:15:38 -05:00
Osama Sayegh
0ccf792b91
DEV: Add various APIs and outlets to the themes config area (#33385)
This commit adds plugin outlets throughout the themes and components admin pages to allow plugins to insert and replace various elements on those pages, and adds a plugin API to append custom cards to the themes grid at `/admin/config/customize/themes`.

A refactor has been done to move the `AdminConfigAreaCard` component out of the `admin/` bundle into the main/app bundle to make the plugin API work without breaking the site for non-staff users. If the component file stayed in the admin bundle, the plugin API class, which is in the main bundle, would fail to import from the component file in the admin bundle the required functions when normal users accessed the site because the admin bundle wouldn't be loaded for them.

Internal topic: t/156924.
2025-07-01 15:21:17 +03:00
dependabot[bot]
f35449f810
Build(deps): Bump a11y-dialog from 8.1.3 to 8.1.4 (#33398)
Bumps [a11y-dialog](https://github.com/KittyGiraudel/a11y-dialog) from
8.1.3 to 8.1.4.
- [Release notes](https://github.com/KittyGiraudel/a11y-dialog/releases)
-
[Commits](https://github.com/KittyGiraudel/a11y-dialog/compare/8.1.3...8.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 18:03:09 +10:00
Alan Guo Xiang Tan
bc29e5088e
DEV: Introduce reviewable_ui_refresh site setting (#33404)
This commit introduces an experimental `reviewable_ui_refresh` site
setting of `group_list` type. When a user is part of any group
configured in the site setting, the new reviewable UI will be shown to
the user.

Co-authored-by: Gary <gary@pento.net>
2025-07-01 15:31:26 +08:00
Alan Guo Xiang Tan
eef0b47b43
DEV: Fix broken test (#33403)
Follow-up to 40256ecc1c
2025-07-01 12:56:19 +08:00
Alan Guo Xiang Tan
40256ecc1c
UX: Add flag_post_allowed_groups site setting to flags area (#33402)
### Screenshot

<img width="1125" alt="Screenshot 2025-07-01 at 11 25 35 AM"
src="https://github.com/user-attachments/assets/f0f45d91-8df4-4c6c-ae9d-0eab1ab244bf"
/>

### Reviewer notes 

No tests are this is mostly a UX change which we don't expect to regress
easily.
2025-07-01 11:27:31 +08:00
dependabot[bot]
64b738bc0a
Build(deps-dev): Bump puppeteer-core from 24.10.2 to 24.11.1 (#33388)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.10.2 to 24.11.1.
- [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.2...puppeteer-core-v24.11.1)

---------

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-07-01 10:23:21 +08:00
dependabot[bot]
ab25abaeb3
Build(deps-dev): Bump sqlite3 from 2.7.0 to 2.7.1 (#33400)
Bumps [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) from
2.7.0 to 2.7.1.
- [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.0...v2.7.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 10:21:36 +08:00
Yuriy Kurant
d61309bb6f
UX: adds optional subheader to welcome banner (#33361)
Adds support of an optional subheader to the core welcome banner.

Similarly to header it accepts `logged in` and `anonymous` copies.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-07-01 10:03:16 +08:00
Sam
8294b933d2
FEATURE: implement RFC 8058 for email unsubscribe (#33392)
RFC example is:

```
   List-Unsubscribe: <https://example.com/unsubscribe/opaquepart>
   List-Unsubscribe-Post: List-Unsubscribe=One-Click

   Resulting POST request

   POST /unsubscribe/opaquepart HTTP/1.1
   Host: example.com
   Content-Type: application/x-www-form-urlencoded
   Content-Length: 26

   List-Unsubscribe=One-Click
```

This requires a few changes on our part:

1. CSRF skipping for this very specific POST request
2. Special handling to "guess" what users means on unsubscribe

We opt for the "maximum" amount of unsubscribing per strategy:

- digest - get rid of them all
- mailing list - stop all emails
- topic - stop watching category and topic
2025-07-01 11:01:13 +10:00
Krzysztof Kotlarek
c42333f264
FIX: improve the merge horizons task (#33394)
When the remote horizon color scheme is `user_selectable`, the system
color scheme should be as well.
2025-07-01 08:36:33 +08:00
Mark VanLandingham
b93b3b4a8e
DEV: Pass additional args to header-content__before PluginOutlet (#33397)
This passes a couple additional args to the `header-content__before`.
This is used by a private plugin, to append the sidebar hamburger back
in a specific case.
2025-06-30 16:20:13 -05:00
benj
cbd7acef88
DEV: Updates to correct meta documentation (#33185)
Reported by a customer, quick fix.
2025-06-30 11:18:05 -05:00
David Battersby
e89e2bb961
FEATURE: validate hashtags in composer rich text editor (#33272)
Adds hashtag decoration and validation for composer's rich text editor
mode.
2025-06-30 11:45:49 +01:00
Gary Pendergast
1d92594ba5
FIX: Apply diversity preferences to emoji search results. (#33393)
This change ensures that emoji search results have the appropriate skin tone applied, when a diversity option has been selected.
2025-06-30 18:06:14 +10:00
Natalie Tay
b20d6792bf
FEATURE: Add a hidden setting to limit number of content localization locales (#33378)
We want to add a hidden limit to the number of locales an admin can set
for localization. This is a safe limit to prevent excessive localization
(if each post can be localized to 10 locales, that's 10x the amount of
storage and tokens needed).


t/157677
2025-06-30 15:29:58 +08:00
Krzysztof Kotlarek
39a43f7e76
DEV: rake task to merge the manually installed Horizon (#33355)
Rake task to merge a single installation of Horizon into the system
Horizon.

What task do:
- Set Horizon as `experimental_system_themes` if not yet included;
- Set system Horizon as the default if manual Horizon was the default;
- Set the system Horizon as selectable if the manual Horizon was
selectable;
- Link components from the manual Horizon to the system Horizon;
- Update UserOptions `theme_id`, `color_scheme_id` and `dark_scheme_id`;
- Update the system Horizon color palette to match the manual Horizon
color palette;
- Move ThemeSettings from manual Horizon to system Horizon;
- Move ThemeTranslations from manual Horizon to system Horizon;
- Delete manual Horizon color schemes;
- Delete the manual Horizon.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-06-30 14:40:46 +08:00
Osama Sayegh
12dbbadbc1
DEV: Add modifier for restricting theme creation endpoints (#33313)
This commit adds a new modifier that plugins can hook into to add further
restriction to who can install themes and components via the admin UI. It
isn't possible to use this modifier to open up the theme installation
permissions to more than core allows, e.g. this modifier can't be used
to allow moderators to install themes on the site.

Internal topic: t/156924.
2025-06-30 09:26:02 +03:00
Martin Brennan
d8c855e559
DEV: Introduce AdminNavManager service for admin sidebar and search links (#33357)
Followup d92de3e4d0

We have an ADMIN_NAV_MAP const that was being used in the admin sidebar
and the admin search to generate a list of links that the admin can
see and navigate to.

However, we were modifying this const, which led to inconsistent
behaviour between the admin sidebar and admin search, leading to
flaky tests.

This commit moves the access control of ADMIN_NAV_MAP into a new
service, and introduces a more structured way of adding/changing
links in the nav map that the sidebar and search can use directly.

This commit also removes old unused code from the admin sidebar
state manager used to store a custom admin nav map in localstorage.
2025-06-30 11:02:21 +10:00
Krzysztof Kotlarek
912c4f855a
FEATURE: Enable system Horizon (#33374)
Enable Horizon theme for everyone.
2025-06-30 07:23:02 +08:00
Krzysztof Kotlarek
5ddc23b030
DEV: final import of horizon (#33390) 2025-06-30 07:19:41 +08:00
Mark VanLandingham
de5d29c7ff
DEV: Add support for textarea form fields in FormKit page object (#33382)
At the moment, the `value` method doesn't work for textareas. This adds
support :)
2025-06-27 18:31:43 -05:00
Kris
27f545203d
DEV: add class to logout dialog (#33379)
This adds a class to the dialog that appears when a user is notified
that they were logged out, which will allow some custom styles to be
added.


![image](https://github.com/user-attachments/assets/02b37164-61f1-4663-bcbf-f205e06b22b3)
2025-06-27 12:26:08 -04:00
Kris
70dbb95041
UX: minor adjustments to participant group badge (#33368)
These were a bit too large relative to tags and had some extra space...


Before:

![image](https://github.com/user-attachments/assets/f32ba42d-40cd-4ab3-bef4-fa49cd579563)


After:

![image](https://github.com/user-attachments/assets/747f5897-5a48-40e5-ac26-79ad2008ef84)
2025-06-27 08:53:07 -04:00
Kris
5ab18c7d27
UX: delete components without full reload to maintain pagination (#33364)
Reported here:
https://meta.discourse.org/t/components-list-not-showing-all-components-after-deleting-one/371784

Deleting a component reloads the component list, but doesn't maintain
pagination if the admin loaded multiple pages of components... so you
can end up with only a partial list after delete.

This instead removes the component from the array without a reload, so
it maintains the current list state.
2025-06-27 08:52:57 -04:00
Renato Atilio
20f5b3f754
UX: move Quote whole post from main toolbar to more menu (#33366) 2025-06-27 06:52:33 -03:00