Commit Graph

58066 Commits

Author SHA1 Message Date
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
29a8c6ee49 DEV: Add a new type_source field to the Reviewable model. (#31325)
This change adds a new `type_source` field to the `Reviewable` model, indicating whether the Reviewable type was registered by `core`, a plugin, or an `unknown` source.

When a plugin that registered a Reviewable type is disabled, this allows us to tell the user which plugin they need to re-enable to handle any orphan reviewable items.
2025-02-20 09:09:47 +11:00
dd5901d51e Build(deps-dev): Bump zeitwerk from 2.7.1 to 2.7.2 (#31405)
Bumps [zeitwerk](https://github.com/fxn/zeitwerk) from 2.7.1 to 2.7.2.
- [Changelog](https://github.com/fxn/zeitwerk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fxn/zeitwerk/compare/v2.7.1...v2.7.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-19 21:40:06 +01:00
3d9e075bbf Build(deps-dev): Bump chrome-remote-interface from 0.33.2 to 0.33.3 (#31404)
Bumps
[chrome-remote-interface](https://github.com/cyrus-and/chrome-remote-interface)
from 0.33.2 to 0.33.3.
-
[Commits](https://github.com/cyrus-and/chrome-remote-interface/compare/v0.33.2...v0.33.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-19 21:39:55 +01:00
c841db1c1d Build(deps): Bump message_bus from 4.3.8 to 4.3.9 (#31403)
Bumps [message_bus](https://github.com/discourse/message_bus) from 4.3.8
to 4.3.9.
-
[Changelog](https://github.com/discourse/message_bus/blob/main/CHANGELOG)
-
[Commits](https://github.com/discourse/message_bus/compare/v4.3.8...v4.3.9)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-19 21:39:45 +01:00
65101cf936 Build(deps-dev): Bump ember-cli from 6.2.0 to 6.2.2 (#31401)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 6.2.0 to
6.2.2.
- [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/compare/v6.2.0...v6.2.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-02-19 21:39:35 +01:00
e1a1f379ce Build(deps-dev): Bump parallel_tests from 4.9.0 to 4.9.1 (#31402)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from
4.9.0 to 4.9.1.
-
[Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/grosser/parallel_tests/compare/v4.9.0...v4.9.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-19 21:39:26 +01:00
78f663a1c8 Build(deps-dev): Bump message-bus-client from 4.3.8 to 4.3.9 (#31400)
Bumps [message-bus-client](https://github.com/discourse/message_bus)
from 4.3.8 to 4.3.9.
-
[Changelog](https://github.com/discourse/message_bus/blob/main/CHANGELOG)
-
[Commits](https://github.com/discourse/message_bus/compare/v4.3.8...v4.3.9)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-19 21:39:17 +01:00
6524e72088 UX: increase limit in chat channel fetcher (#31406)
Increases the number of chat channels loading to prevent missing
notifications for channels beyond the current limit.
2025-02-19 23:51:46 +04:00
4b42be0e18 Build(deps-dev): Bump @swc/core from 1.10.16 to 1.10.18 (#31399)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.16 to
1.10.18.
- [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.10.16...v1.10.18)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-19 20:23:05 +01:00
0abc33c5a2 DEV: Ensure sidebar sections are collapsable in mobile view (#31383) 2025-02-19 16:05:43 -03:00
3e22fc8ba2 DEV: Update sass gems/package (#31396)
…and temporarily silence the new deprecations: color-functions, import, global-builtin.
2025-02-19 20:04:17 +01:00
9bebbee01b DEV: Update linting setup (#31392) 2025-02-19 19:27:25 +01:00
c1ee4e120e DEV: remove empty outlet wrapper to prevent it from occupying layout space (#31391)
The `toggle-summary` class is specific to our use in the AI plugin, so
I've moved it there in
https://github.com/discourse/discourse-ai/pull/1136...

This wrapper was occupying some space even though it was empty in the PM
topic map, so it's better to not have it.

This also allows us to remove some sub-optimal CSS that was adding a gap
based on content within it. Without the empty wrapper, we can always
have the gap present.
2025-02-19 12:58:21 -05:00
f0d231355e DEV: Ensure only one csrftoken request is running simultaneously (#31390)
Before this, triggering two ajax requests close together would 'race' to
create a csrf-token, and only one would succeed
2025-02-19 17:43:55 +00:00
8be39c5bf0 FIX: Improve group name validation (#31315)
This commit improves a few aspects regarding group name validation:

- `min_username_length` and `max_username_length` are validated with the
  shortest and longest names of users and groups

- skip validation of the group name when the group is an automatic one
2025-02-19 19:33:46 +02:00
b9f6a7e61d Build(deps): Bump nokogiri from 1.18.2 to 1.18.3 (#31388)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.18.2
to 1.18.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
-
[Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.18.3/CHANGELOG.md)
-
[Commits](https://github.com/sparklemotion/nokogiri/compare/v1.18.2...v1.18.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-19 15:04:13 +01:00
90d6747248 DEV: Remove unused 'advanced' theme editor mode (#31387)
This mode was introduced briefly in 2019, and allowed editing theme
settings/translations/extra-css from the admin panel UI. But then we
decided that making it possible to edit these fields via the UI
conflicted with our recommendation of using a proper IDE,
discourse_theme, and version-controlled themes. The feature was disabled
in core, and theme-creator uses a monkey-patch to expose it.

Even for the current use in theme creator, there are now major styling
and functionality issues, because this feature is not visible or tested
in core. For example: it doesn't allow editing 'extra JS' fields, which
are arguably the most common.

This commit removes the code for this 'advanced' mode, in advance of
some more extensive modernization of this component/model.
2025-02-19 12:28:34 +00:00
a0e1a12161 FIX: Wikipedia onebox images and sections (#31384)
Both article images and section extraction were
not working for wikipedia oneboxes, this commit
fixes both and updates our spec fixture responses
to use the new HTML
2025-02-19 14:29:17 +10:00
143a824449 FIX: Language parser matches with dashes or underscores (#31381)
Our language parser now incorrectly matches underscored locales:

```
[1] pry(main)> HttpLanguageParser.parse("zh-CN")
=> "zh_CN"
[2] pry(main)> HttpLanguageParser.parse("zh_CN")
=> "en_GB"
```

This commit makes sure the input can be agnostic of `-` or `_`
2025-02-19 11:55:14 +08:00
b47e429b26 DEV: Fix mixed-decls sass deprecations in plugins (#31356)
A follow-up to #31343.

```
WARNING: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

More info: https://sass-lang.com/d/mixed-decls
```
2025-02-18 20:04:51 +01:00
46c568a85d DEV: Remove unnecessary scss mixins (#31355) 2025-02-18 15:45:18 +01:00
41c80959c7 FIX: Ensure revoke_ungranted_titles! works with user_ids (#31371)
When `revoke_ungranted_titles!` was invoked, the optional list of
`user_ids` was not passed from the argument list to the query. This
resulted in an exception because the placeholder `:user_ids` existed in
the query.
2025-02-18 15:55:48 +02:00
b37b51d15f Update translations (#31377) 2025-02-18 14:51:47 +01:00
aa66917df6 Build(deps-dev): Bump extralite-bundle from 2.8.2 to 2.10 (#31374)
Bumps [extralite-bundle](https://github.com/digital-fabric/extralite)
from 2.8.2 to 2.10.
-
[Changelog](https://github.com/digital-fabric/extralite/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digital-fabric/extralite/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 23:28:10 +01:00
64c9c7ce15 Build(deps-dev): Bump rubocop-rails from 2.30.0 to 2.30.1 (#31373)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from
2.30.0 to 2.30.1.
- [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.0...v2.30.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 23:27:35 +01:00
6899dd5488 Build(deps-dev): Bump rubocop from 1.72.1 to 1.72.2 (#31372)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.72.1 to
1.72.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.72.1...v1.72.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 23:27:19 +01:00
1a7d2667c4 DEV: Add the AsyncContent component (#31101)
Co-authored-by: David Taylor <david@taylorhq.com>
2025-02-17 18:38:51 -03:00
43ececd22d FIX: Adds further support for 'prioritize_full_name_in_ux' setting (#31346)
This sets the stage for being able to consolidate Like notifications
using full names. It also is crucial to this [Reactions plugin
PR](https://github.com/discourse/discourse/pull/31292).

The Like consolidation PR will come after these.
2025-02-17 12:09:18 -06:00
4ec3cb754d DEV: Add mobile_view toggle to dev-tools toolbar (#31369)
Meta: https://meta.discourse.org/t/introducing-discourse-developer-toolbar/346215/15
2025-02-17 16:59:04 +00:00
402ec6bf5c PERF: Defer consolePrefix() calculation for transformers (#31367)
`consolePrefix()` is an expensive operation (it throws a synthetic
error, then parses the backtrace), so we should only do it when
absolutely necessary

On the topic-list page, this provides a 3-4% improvement in "init to
render" times.
2025-02-17 14:58:17 +00:00
140775d505 DEV: Enable RSpec/InstanceVariable rule for models 2025-02-17 10:00:08 +01:00
566c772980 DEV: replace UsernameValidation mixin with helper in InvitesShowController and CreateAccount (#31330)
Follows up: https://github.com/discourse/discourse/pull/31107

This PR replaces the use of the UsernameValidation mixin with the helper
class for the InvitesShowController and CreateAccount modal component,
and deletes the mixin.
2025-02-17 07:52:30 +08:00
049bbf6883 Build(deps-dev): Bump rubocop-rspec from 3.4.0 to 3.5.0 (#31364)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from
3.4.0 to 3.5.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
-
[Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop-rspec/compare/v3.4.0...v3.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-16 23:40:05 +01:00
edc7569a21 Build(deps-dev): Bump rubocop-rails from 2.29.1 to 2.30.0 (#31362)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from
2.29.1 to 2.30.0.
- [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.29.1...v2.30.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-16 22:51:46 +01:00
4b3e5002c0 Build(deps): Bump stringio from 3.1.2 to 3.1.3 (#31363)
Bumps [stringio](https://github.com/ruby/stringio) from 3.1.2 to 3.1.3.
- [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.2...v3.1.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-16 22:50:23 +01:00
496da4d68a Build(deps-dev): Bump rubocop from 1.71.2 to 1.72.1 (#31361)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.71.2 to
1.72.1.
- [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.71.2...v1.72.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-16 22:50:08 +01:00
ab09c4307b Build(deps-dev): Bump puppeteer-core from 24.2.0 to 24.2.1 (#31359)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.2.0 to 24.2.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.2.0...puppeteer-core-v24.2.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-02-16 22:49:59 +01:00
94ab81ecca Build(deps): Bump rexml from 3.4.0 to 3.4.1 (#31360)
Bumps [rexml](https://github.com/ruby/rexml) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.4.0...v3.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-16 22:49:49 +01:00
5252fe81f2 Build(deps): Bump the babel group with 2 updates (#31358)
Bumps the babel group with 2 updates:
[@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core)
and
[@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/core` from 7.26.8 to 7.26.9
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/babel/babel/commits/v7.26.9/packages/babel-core)

Updates `@babel/standalone` from 7.26.8 to 7.26.9
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/babel/babel/commits/v7.26.9/packages/babel-standalone)

---------

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-16 22:49:33 +01:00