58573 Commits

Author SHA1 Message Date
Jarek Radosz
3d2a6322d0
DEV: Update lint-configs and auto-fix issues (#31485) 2025-02-24 23:32:31 +01:00
dependabot[bot]
2561f4f431
Build(deps-dev): Bump puppeteer-core from 24.2.1 to 24.3.0 (#31487)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.2.1 to 24.3.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.2.1...puppeteer-core-v24.3.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-02-24 23:21:06 +01:00
David Taylor
109fc428d8
DEV: Clear extra-locales cache between tests (#31488) 2025-02-24 22:10:43 +00:00
Blake Erickson
db3db9fe41
DEV: Log site setting changes from the rails console (#31353)
When using the rails console to change site settings log them to the
staff actions logs so that there is a record.
2025-02-24 14:57:01 -07:00
dependabot[bot]
f744852f10
Build(deps-dev): Bump rubocop-rails from 2.30.1 to 2.30.2 (#31484)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from
2.30.1 to 2.30.2.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
-
[Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop-rails/compare/v2.30.1...v2.30.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 22:27:03 +01:00
dependabot[bot]
7b6284d6f2
Build(deps): Bump version_gem from 1.1.5 to 1.1.6 (#31483)
Bumps [version_gem](https://gitlab.com/oauth-xx/version_gem) from 1.1.5
to 1.1.6.
-
[Changelog](https://gitlab.com/oauth-xx/version_gem/blob/1.1-stable/CHANGELOG.md)
-
[Commits](https://gitlab.com/oauth-xx/version_gem/compare/v1.1.5...v1.1.6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 22:26:54 +01:00
dependabot[bot]
7e37aa007f
Build(deps): Bump excon from 1.2.3 to 1.2.4 (#31482)
Bumps [excon](https://github.com/excon/excon) from 1.2.3 to 1.2.4.
- [Changelog](https://github.com/excon/excon/blob/master/changelog.txt)
- [Commits](https://github.com/excon/excon/compare/v1.2.3...v1.2.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 22:26:44 +01:00
benj
795413e6fd
FIX: Falls back to username if name is empty (#31481)
Quick fix after https://github.com/discourse/discourse/pull/31292

Ensures if a user's name field is empty that it will fall back to
username.
2025-02-24 14:04:39 -06:00
David Taylor
1f5cce705c
FIX: Include locale in extra-locales URLs (#31480)
Previously the rendered locale was based on the current session's
locale. Now that we're routing requests via the CDN, we can't rely on
the user's session, and should instead include the locale name in the
URL. Also adds a `.js` suffix for parity with our other JS assets.
2025-02-24 17:20:46 +00:00
Sebastian
2062e4eb90
2FA Backup Code Download: Use CRLF for Windows-compatibility (#29400)
Currently LF is used, making the backup codes indistinguishable for Windows users. 

Instead, use CRLF which is compatible for Windows as well as Linux and macOS.

https://meta.discourse.org/t/-/331940
2025-02-24 16:32:57 +01:00
David Taylor
12291f745c
PERF: Move extra-locale digest from query-param to path (#31479)
CDNs are often configured to strip query params, which means that the
`?v=` parameter wasn't reaching the Rails app, and therefore the
cache-control header was not being set correctly. Having a 40 character
sha1 digest in the **path** is the approach we take for other similar
assets like stylesheets and theme-javascripts.

Also adds a spec for the fix in 573fbeef64f052decc47e740cbe01a3c298c20b5
2025-02-24 14:09:15 +00:00
David Battersby
44aa0eda27
UX: add automation script description for pm sender (#31478)
Adds a description to highlight the need for sender to have correct
permissions when sending PM. Without the correct permissions the PM is
not sent and a message is added to the site logs.
2025-02-24 15:54:41 +04:00
David Taylor
573fbeef64
FIX: Include hostname in extra-locales URLs (#31477)
Followup to 1b5e4b6b0fef9811839490f2ee3b9f31d5fbed3b

When running through a CDN in a multisite environment, the site hostname
needs to be included in the path or query or the URL so that the
'current db' can be set correctly by rails multisite. Without this, the
response will assume the default site in the cluster.
2025-02-24 10:55:37 +00:00
David Battersby
342ab6f082
FIX: delayed chat summary email (#31255)
Updates the chat summary email to account for:

- unread mentions in category channels (same as before)
- unread direct messages (now excluding threads)
- unread watched thread replies (for both channels and DM channels)

We have also reduced the window from 1 week down to 1 day for all 3
criteria. The DM unreads query is now properly selecting the first
unread message within the window (rather than the first message
regardless of read status).
2025-02-24 14:25:52 +04:00
Martin Brennan
18c8a8ffca
UX: Fix flags config page translations (#31476)
Followup e26a1175d7c33746bddbc858ad89e68cc14beefe


![image](https://github.com/user-attachments/assets/7228be1c-e3fc-4261-95a8-2fbb96b776bb)
2025-02-24 16:29:53 +10:00
benj
0289054126
FIX: Ensures multi-like notifs respect prioritize_full_name_in_ux setting (#31292)
Some loose ends from the addition of the `prioritize_full_name_in_ux`
site setting. Singular Like works as expected, but not the consolidated
notifs.

This [core PR](https://github.com/discourse/discourse/pull/31346) is
connected to this.

Before (with site setting on):
<img width="354" alt="Screenshot 2025-02-17 at 3 55 17 PM"
src="https://github.com/user-attachments/assets/3c2b37d9-201d-481f-8fc3-4bf7aa17941c"
/>

After (with site setting on):
<img width="293" alt="Screenshot 2025-02-17 at 3 55 07 PM"
src="https://github.com/user-attachments/assets/230c9f4c-c9fc-4151-a8d7-add1b3625eae"
/>
2025-02-24 16:52:21 +11:00
Alan Guo Xiang Tan
6284ec9933
Bump version to v3.5.0.beta2-dev 2025-02-24 12:55:00 +08:00
Alan Guo Xiang Tan
4441274456
Bump version to v3.5.0.beta1 2025-02-24 12:54:59 +08:00
Discourse Translator Bot
122e1384bc
Update translations (#31470) 2025-02-24 15:11:55 +11:00
dependabot[bot]
0a2591280f
Build(deps): Bump version_gem from 1.1.4 to 1.1.5 (#31462)
Bumps [version_gem](https://gitlab.com/oauth-xx/version_gem) from 1.1.4
to 1.1.5.
-
[Changelog](https://gitlab.com/oauth-xx/version_gem/blob/1.1-stable/CHANGELOG.md)
-
[Commits](https://gitlab.com/oauth-xx/version_gem/compare/v1.1.4...v1.1.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 09:28:26 +08:00
Krzysztof Kotlarek
d50bba3bdc
DEV: Allow SiteSetting::Update service to bulk update (#31438)
Previously, the SiteSetting::Update service allowed to update of a
single site setting. In the About controller, we were using the loop
through all settings -
https://github.com/discourse/discourse/blob/main/app/controllers/admin/config/about_controller.rb#L39

It is suboptimal because if the 3 first settings are saved and the
fourth is invalid, we will end with partially updated data.

Changing SiteSetting::Update to accept hash means that we will check
upfront if none of the settings are hidden or invalid and update all or
none.

Custom policies are used to report which settings are failing.
2025-02-24 11:09:44 +11:00
dependabot[bot]
6e72f4efe4
Build(deps-dev): Bump the embroider group with 3 updates (#31463)
Bumps the embroider group with 3 updates:
[@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat),
[@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core)
and
[@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack).


Updates `@embroider/compat` from 3.8.2 to 3.8.3
- [Release notes](https://github.com/embroider-build/embroider/releases)
-
[Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

Updates `@embroider/core` from 3.5.1 to 3.5.2
- [Release notes](https://github.com/embroider-build/embroider/releases)
-
[Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/core)

Updates `@embroider/webpack` from 4.0.10 to 4.1.0
- [Release notes](https://github.com/embroider-build/embroider/releases)
-
[Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/webpack)

---------

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-02-23 23:59:49 +01:00
dependabot[bot]
88bdfcd657
Build(deps): Bump ace-builds from 1.38.0 to 1.39.0 (#31465)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.38.0 to
1.39.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.38.0...v1.39.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-23 23:20:04 +01:00
dependabot[bot]
3e5d423919
Build(deps-dev): Bump jsuites from 5.9.0 to 5.9.1 (#31464)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.9.0 to 5.9.1.
- [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-02-23 23:19:33 +01:00
dependabot[bot]
618be71d92
Build(deps-dev): Bump lefthook from 1.10.10 to 1.11.0 (#31467)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.10.10
to 1.11.0.
- [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.10.10...v1.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-23 23:18:17 +01:00
dependabot[bot]
93e2d34598
Build(deps-dev): Bump selenium-webdriver from 4.29.0 to 4.29.1 (#31461) 2025-02-23 22:48:02 +01:00
Jarek Radosz
c592edbe34
DEV: Update discourse_dev_assets and faker (#31436) 2025-02-22 10:25:56 +01:00
Jarek Radosz
59406fb286
DEV: Remove an obsolete gem (#31459) 2025-02-22 10:25:33 +01:00
Joffrey JAFFEUX
cb257ff658
DEV: allows to add a draft without persisting it (#31457)
On chat setup we get the initial state of drafts for the current users,
we need to add them to the drafts manager, but we don't need to store
them again on the backend.

This commit adds a persist (boolean) parameter to the
`ChatDraftsManager.add` service which when set to true will only add the
draft on the frontend and not send it to the backend.

No test, as the behavior is already tested and unchanged, this is only a
performance improvement.
2025-02-22 01:29:12 +01:00
Jarek Radosz
eb1ef04ed5
UX: Replace solid face-smile emoji picker icon with a regular one (#31421)
Before/After

<img width="101" alt="image"
src="https://github.com/user-attachments/assets/8cb670db-882b-43b2-b7e0-7306591f238a"
/> <img width="101" alt="image"
src="https://github.com/user-attachments/assets/6e0c9f6c-40ad-4914-ba71-7d0ef022bb76"
/>
2025-02-21 22:25:42 +01:00
Joffrey JAFFEUX
4fec23ebc5
FIX: prevents sidebar to scroll when opening channel (#31454)
This has been a very hard to track and reproduce bug, but after a lot of
profiling I detected that a scroll was showing in the trace just after a
RemoveChild in div.sidebar-sections.

I suspect the performance of this is bad due to a difficulty to
reconciliate object identity and using key seems to help here as I was
not able to reproduce the bug after.
2025-02-21 21:02:26 +01:00
Renato Atilio
4f0ab65b5b
FEATURE: revert/re-add import quote toolbar button (#31449)
This PR reverts the removal of the import quote toolbar button that
happened in https://github.com/discourse/discourse/pull/30815.

It re-adds the previously existing implementation without changes.
2025-02-21 14:45:56 -03:00
Arpit Jalan
9bb6d09d1a
DEV: implements register_modifier(:serialize_topic_op_likes_data) (#31376)
This commit will allow plugin developers to enable/disable the topic op
likes data in serializer.

Usage:

```
register_modifier(:serialize_topic_op_likes_data) { |enabled| true }
```
2025-02-21 22:43:49 +05:30
dependabot[bot]
34665825c9
Build(deps-dev): Bump the embroider group with 4 updates (#31450)
Bumps the embroider group with 4 updates:
[@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat),
[@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core),
[@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros)
and
[@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack).


Updates `@embroider/compat` from 3.8.1 to 3.8.2
- [Release notes](https://github.com/embroider-build/embroider/releases)
-
[Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

Updates `@embroider/core` from 3.5.0 to 3.5.1
- [Release notes](https://github.com/embroider-build/embroider/releases)
-
[Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/core)

Updates `@embroider/macros` from 1.16.10 to 1.16.11
- [Release notes](https://github.com/embroider-build/embroider/releases)
-
[Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/macros)

Updates `@embroider/webpack` from 4.0.9 to 4.0.10
- [Release notes](https://github.com/embroider-build/embroider/releases)
-
[Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/webpack)

---------

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-02-21 17:17:52 +01:00
dependabot[bot]
8c670234f4
Build(deps-dev): Bump @discourse/lint-configs from 2.5.0 to 2.6.0 (#31451)
Bumps
[@discourse/lint-configs](https://github.com/discourse/lint-configs)
from 2.5.0 to 2.6.0.
- [Commits](https://github.com/discourse/lint-configs/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-02-21 17:17:35 +01:00
dependabot[bot]
d98aa03fa1
Build(deps-dev): Bump rubocop-discourse from 3.9.3 to 3.10.0 (#31453)
Bumps
[rubocop-discourse](https://github.com/discourse/rubocop-discourse) from
3.9.3 to 3.10.0.
-
[Commits](https://github.com/discourse/rubocop-discourse/compare/v3.9.3...v3.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-21 17:17:26 +01:00
dependabot[bot]
d53b997b2d
Build(deps): Bump stringio from 3.1.4 to 3.1.5 (#31452)
Bumps [stringio](https://github.com/ruby/stringio) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/ruby/stringio/releases)
- [Changelog](https://github.com/ruby/stringio/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/stringio/compare/v3.1.4...v3.1.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-21 17:17:09 +01:00
David Taylor
3b9718577e
DEV: Move admin SCSS files to their own directory (#31417)
This makes it clearer that admin css is compiled to a separate bundle.
This is a first step towards moving the 'admin' parts out of the main
mobile/desktop bundles.
2025-02-21 15:14:17 +00:00
David Taylor
1b5e4b6b0f
PERF: Cache all extra-locale bundles and use CDN (#31445)
Code/translations for the admin panel and wizard are not considered
sensitive, so there's no need for access control checks here. Once
they're removed, we can cache in NGINX and the CDN, and thereby improve
server and client-load performance.
2025-02-21 14:48:42 +00:00
David Taylor
c22ce1385f
DEV: Remove unneeded -webkit prefixes from css (#31448)
Now we have autoprefixer, we don't need to do this manually
2025-02-21 14:48:20 +00:00
Jarek Radosz
1507f177a5
DEV: Remove no-op -webkit-overflow-scrolling (#31429)
afaict it doesn't do anything since iOS 13?
2025-02-21 15:47:35 +01:00
Kelv
3ab39f3e4c
DEV: replace passwordValidation mixin in InvitesShowController (#31442)
This replaces the password validation mixin with a helper class in the
invites-show controller class.
2025-02-21 22:14:43 +08:00
Joffrey JAFFEUX
d55a113242
FIX: prevent sidebar scroll on chat composer focus (#31446)
This issue has been impossible to repro locally so far, but we have
reports of switching from one channel to another causing the sidebar to
scroll to the bottom.

Looking at the trace of events, calling `blurAndFocus` is the last
function call before it happens.
2025-02-21 13:35:09 +01:00
David Taylor
00907363d4
DEV: Drop ember-cli-based SCSS and locale compilation (#31407)
This totally separate SCSS and i18n compilation pipelines only existed
so that we could run `ember exam` in CI without starting Rails.

Now that our CI has such heavy caching of Ruby dependencies and database
migrations, the speed benefit of this is not worth the cost of
maintaining these separate pipelines.

Therefore, this commit removes that system, and updates CI to use
`bin/rake qunit:test`. That will start up a Rails server and proxy
stylesheet/locale requests to it. This strategy was already used for our
theme and plugin qunit test runs.
2025-02-21 11:15:04 +00:00
David Taylor
4461256f9e
FEATURE: Allow a gjs initializer to be authored in local themes (#31423)
Previously, the only way to author js/hbs via the admin panel was to use
`<script>` tags. This strategy is not pretty, and doesn't provide access
to proper ES module imports or gjs `<template>` syntax.

Our recommendation for most themes is still that they should be authored
using a proper IDE, the `discourse_theme` CLI, and version-controlled
using git. However, we understand that this isn't a good fit for
everyone, and that there's still a place for simple
admin-panel-ui-authored themes.

This commit introduces a "JS" tab in the admin theme editor, which
corresponds to a file named
`discourse/api-initializers/theme-initializer.gjs` in the theme. This
means that everyone will be able to move towards the more modern
syntaxes, and away from the old `<script>` patterns.
2025-02-21 09:59:41 +00:00
Gary Pendergast
d0881e6fef
FEATURE: Type reactions in chat (#31439)
This change allows you to add a reaction to the most recent message, by sending a reaction message.

A reaction message can be formatted as `+{emoji}` (eg, `+❤️`), or as `+{emoji_code}` (eg, `+❤️`).
2025-02-21 17:43:28 +11:00
Martin Brennan
e26a1175d7
FEATURE: Initial version of experimental admin search (#31299)
This feature allows admins to find what they are
looking for in the admin interface via a search modal.
This replaces the admin sidebar filter
as the focus of the Ctrl+/ command, but the sidebar
filter can also still be used. Perhaps at some point
we may remove it or change the shortcut.

The search modal presents the following data for filtering:

* A list of all admin pages, the same as the sidebar,
   except also showing "third level" pages like
   "Email > Skipped"
* All site settings
* Themes
* Components
* Reports

Admins can also filter which types of items are shown in the modal,
for example hiding Settings if they know they are looking for a Page.

In this PR, I also have the following fixes:

* Site setting filters now clear when moving between
   filtered site setting pages, previously it was super
   sticky from Ember
* Many translations were moved around, instead of being
   in various namespaces for the sidebar links and the admin
   page titles and descriptions, now everything is under
   `admin.config` namespace, this makes it way easier to reuse
   this text for pages, search, and sidebar, and if you change it
   in one place then it is changed everywhere.

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-02-21 11:59:24 +10:00
Joffrey JAFFEUX
a77d469eeb
UX: close thread panel with a single escape (#31426)
Before this commit we were requiring two escapes:
- one to un-focus composer
- one to close panel
2025-02-21 00:10:02 +01:00
Jarek Radosz
c81d257961
DEV: The annual aws gems update (#31428) 2025-02-20 23:56:30 +01:00
dependabot[bot]
902225a937
Build(deps-dev): Bump selenium-devtools from 0.132.0 to 0.133.0 (#31432) 2025-02-20 23:31:52 +01:00