Commit Graph

58105 Commits

Author SHA1 Message Date
122e1384bc Update translations (#31470) 2025-02-24 15:11:55 +11:00
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
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
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
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
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
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
93e2d34598 Build(deps-dev): Bump selenium-webdriver from 4.29.0 to 4.29.1 (#31461) 2025-02-23 22:48:02 +01:00
c592edbe34 DEV: Update discourse_dev_assets and faker (#31436) 2025-02-22 10:25:56 +01:00
59406fb286 DEV: Remove an obsolete gem (#31459) 2025-02-22 10:25:33 +01:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
c81d257961 DEV: The annual aws gems update (#31428) 2025-02-20 23:56:30 +01:00
902225a937 Build(deps-dev): Bump selenium-devtools from 0.132.0 to 0.133.0 (#31432) 2025-02-20 23:31:52 +01:00
3520059ca9 Build(deps-dev): Bump sqlite3 from 2.5.0 to 2.6.0 (#31434) 2025-02-20 23:31:22 +01:00
0f567e4bd3 DEV: Clarify class when excerpt is present (#31427) 2025-02-20 16:23:36 -06:00
3b881a2b35 Build(deps-dev): Bump selenium-webdriver from 4.28.0 to 4.29.0 (#31431) 2025-02-20 23:08:02 +01:00
e72c42585e Build(deps): Bump stringio from 3.1.3 to 3.1.4 (#31430) 2025-02-20 23:07:18 +01:00
006b5b13d9 DEV: Update/add plugin outlets to ParentCategoryRow to remove template overrides (#31395)
Description

We need to add these plugin modifiers as part of changes made to remove
template overrides
2025-02-20 15:40:00 -05:00
d1f3b2fc45 FIX: Drafts should not have an expand button (#31424)
## 🔍 Overview

Currently editing a long post and it existing as a draft in the user
stream results in the expand post button being shown in the stream.
However, expanding does nothing and results in errors because it cannot
make the request. This update applies a fix to ensure that long drafts
on edits do not have an expand button

## 📸 Screenshots

### ←Before
![Screenshot 2025-02-20 at 11 14
32](https://github.com/user-attachments/assets/c090d025-6efb-458b-bb6b-4d12e0b214ae)

### →After
![Screenshot 2025-02-20 at 11 14
48](https://github.com/user-attachments/assets/077a1a6a-c6f3-445a-9d65-357acab195f7)
2025-02-20 12:28:49 -08:00
7aac73126c UX: triggers upload dialog on doubleclick (#31425)
When making a double click on the [+] button next to the chat composer,
the upload dialog will now be displayed.

No test as it's hard to test with capybara and is not an important
behavior.
2025-02-20 21:08:59 +01:00
834ea70b1c DEV: Improve postcss error handling (#31420)
Followup to 087e8e4bdb53f71930ec5c930c463c37dd2bd58d

- Fixes the variable-prefixer so it doesn't explode when the input is
unparseable
- Add URL polyfills so that postcss can print its errors properly
- Catch postcss errors in the same way as sass errors
2025-02-20 16:48:22 +00:00
a26138b501 DEV: Fix mixed-decls in mobile user-card scss (#31418) 2025-02-20 15:45:59 +01:00
087e8e4bdb DEV: Introduce postcss for autoprefix and light-dark() polyfill (#31393)
Introduces PostCSS at the end of our CSS compilation pipeline. For now,
just adds autoprefixer and light-dark polyfill.
2025-02-20 14:40:27 +00:00
1b33a9900f DEV: Fixup db:reset (#31242)
In this case, db:create is run as part of another command, so it's not
in the argument list.

Followup to 30bea2563121308fce1bffb7b1e43c07e4a39839
2025-02-20 12:32:45 +00:00
23cfab8f19 FIX: Recover from failing automations (#31413)
If Jobs::DiscourseAutomation::Tracker fails during execution of a
pending automation, then the remaining automation were no longer
executed.

Automation may fail for various reasons: a person has PMs disabled, rate
limit is reached, etc.
2025-02-20 12:45:06 +02:00
29d06f1243 DEV: replace passwordValidation mixin in PasswordResetController (#31412)
This replaces the password validation mixin with a helper class in the
password-reset controller class.
Also removes the redundant flag `passwordValidationVisible` that is
already fully dependent on whether `passwordValidation` has a `reason`.
2025-02-20 18:23:41 +08:00
6ae33d63af FIX: Lightbox chat uploads immediately after optimize (#31414)
When a message is first sent, the original upload URL is used for a
split-second before it's replaced by the optimised thumbnail. Using
`didInsert` didn't re-run on any changes to the uploads. Switching to a
proper modifier, and checking the length of the uploads array within it,
will ensure that it is re-run whenever the uploads change.
2025-02-20 10:21:53 +00:00
6bd1bc3866 Build(deps): Bump @ember/string from 4.0.0 to 4.0.1 (#31409)
Bumps [@ember/string](https://github.com/emberjs/ember-string) from
4.0.0 to 4.0.1.
- [Release notes](https://github.com/emberjs/ember-string/releases)
-
[Changelog](https://github.com/emberjs/ember-string/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-string/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-20 10:32:19 +01:00
287e8eae42 FIX: Correct errors in uploads:sync_s3_acls rake task (#31411)
This is a follow up to a9eefd1b4849573452581c113cfcbdd4420fb3c2.

### Reviewer notes

This rake task is quite annoying to test so I don't think the time
trying to figure out how to test it is worth it. This does not sit in a
critical path anyway so I think the lack of tests here is OK.
2025-02-20 16:16:27 +08:00
b5147a4634 FEATURE: Allow admins to remove users from chat DMs (#31366)
This feature allows admins to remove users from channels.
2025-02-20 15:16:57 +08:00
b8a4b11cbb DEV: use PasswordValidationHelper instead of mixin for signup controller (#31380)
This introduces a helper class for password validation logic, and
replaces the mixin in the signup controller class. All properties that
impact password validation in that class are also converted to
autotracked ones.
2025-02-20 10:01:28 +08:00