57950 Commits

Author SHA1 Message Date
Kelv
441620ce61
DEV: delete nameValidation mixin (#31275)
This mixin is now ready for deletion, all uses of it has been removed
from plugins.
2025-02-12 09:50:13 +08:00
dependabot[bot]
13a5e5b297
Build(deps-dev): Bump puppeteer-core from 24.1.1 to 24.2.0 (#31207)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.1.1 to 24.2.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.1.1...puppeteer-core-v24.2.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-12 02:27:36 +01:00
dependabot[bot]
ae3d4f2146
Build(deps): Bump msgpack from 1.7.5 to 1.8.0 (#31225)
Bumps [msgpack](https://github.com/msgpack/msgpack-ruby) from 1.7.5 to
1.8.0.
-
[Changelog](https://github.com/msgpack/msgpack-ruby/blob/master/ChangeLog)
-
[Commits](https://github.com/msgpack/msgpack-ruby/compare/v1.7.5...v1.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 02:26:30 +01:00
Jarek Radosz
b3b15bc7fc
DEV: Cancel header calculations on destroy (#31294) 2025-02-12 02:03:19 +01:00
dependabot[bot]
b5b6586f07
Build(deps-dev): Bump webmock from 3.24.0 to 3.25.0 (#31227)
Bumps [webmock](https://github.com/bblimke/webmock) from 3.24.0 to
3.25.0.
-
[Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/bblimke/webmock/compare/v3.24.0...v3.25.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 01:15:52 +01:00
dependabot[bot]
ea719408ab
Build(deps-dev): Bump bullet from 8.0.0 to 8.0.1 (#31263)
Bumps [bullet](https://github.com/flyerhzm/bullet) from 8.0.0 to 8.0.1.
- [Changelog](https://github.com/flyerhzm/bullet/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/8.0.0...8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 01:15:34 +01:00
Osama Sayegh
d0498c9e1d
FIX: Limit displayed groups in <GroupChooser /> to 100 groups (#31288)
Follow-up to https://github.com/discourse/discourse/pull/31271

In the linked PR, we made `<GroupChooser />` use the site's preloaded
list of groups instead of fetching the list from the servers every time
the component is triggered. However, when a site has thousands of
groups, the performance issue has shifted from the server to the browser
— `<GroupChooser />` takes several seconds to render in the browser for
a site with thousands of groups and the sites becomes completely
unresponsive while the component is rendering.

This PR changes the `<GroupChooser />` so it limits the displayed groups
to 100, with ability to filter the list to show more groups when there
are more than 100 groups.
2025-02-12 03:14:57 +03:00
dependabot[bot]
cf6bab3d85
Build(deps-dev): Bump rubocop from 1.71.1 to 1.71.2 (#31183)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.71.1 to
1.71.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.71.1...v1.71.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 01:10:44 +01:00
dependabot[bot]
f283acae39
Build(deps): Bump net-smtp from 0.5.0 to 0.5.1 (#31203)
Bumps [net-smtp](https://github.com/ruby/net-smtp) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/ruby/net-smtp/releases)
- [Changelog](https://github.com/ruby/net-smtp/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/net-smtp/compare/v0.5.0...v0.5.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 01:10:26 +01:00
dependabot[bot]
cfa22d09eb
Build(deps-dev): Bump parser from 3.3.7.0 to 3.3.7.1 (#31204)
Bumps [parser](https://github.com/whitequark/parser) from 3.3.7.0 to
3.3.7.1.
-
[Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/whitequark/parser/compare/v3.3.7.0...v3.3.7.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 01:10:04 +01:00
dependabot[bot]
b67d1a0fa2
Build(deps-dev): Bump rspec-rails from 7.1.0 to 7.1.1 (#31223)
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 7.1.0 to
7.1.1.
-
[Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md)
-
[Commits](https://github.com/rspec/rspec-rails/compare/v7.1.0...v7.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 00:19:47 +01:00
Blake Erickson
afda973070
FIX: User profile not loading with an empty export (#31290)
If a user has an export that doesn't have a file it can cause their
profile page to not load.
2025-02-11 16:18:06 -07:00
dependabot[bot]
262575f4e2
Build(deps-dev): Bump rspec-core from 3.13.2 to 3.13.3 (#31222)
Bumps [rspec-core](https://github.com/rspec/rspec-core) from 3.13.2 to
3.13.3.
- [Release notes](https://github.com/rspec/rspec-core/releases)
-
[Changelog](https://github.com/rspec/rspec-core/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-core/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 00:17:43 +01:00
dependabot[bot]
8d4c612775
Build(deps): Bump rdoc from 6.11.0 to 6.12.0 (#31224)
Bumps [rdoc](https://github.com/ruby/rdoc) from 6.11.0 to 6.12.0.
- [Release notes](https://github.com/ruby/rdoc/releases)
- [Changelog](https://github.com/ruby/rdoc/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rdoc/compare/v6.11.0...v6.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 00:17:08 +01:00
Kris
73a3b995f9
UX: remove main-outlet-wrapper margin reset for mobile (#31286)
Reported here
https://meta.discourse.org/t/do-auto-margins-still-need-to-be-unset-on-mobile/351503

This helps better handle some situations where we want to center content
on large screens while using mobile view
2025-02-11 16:16:26 -05:00
Kris
4dc47fae44
DEV: use custom trigger for sidebar more section (#31285)
This uses the new `triggerComponent` functionality to implement a button
without the default `DButton` component classes, which helps themes
avoid applying unintentional styling.
2025-02-11 15:46:37 -05:00
Joffrey JAFFEUX
24b2e353a4
FIX: correctly display label (#31282)
A regression introduced in 32c8aa0aad880bcab372ffd75bce3c857060d721
incorrectly passes label to the trigger component, but also passes
translatedLabel instead of label to the menu.

The existing test was checking for the presence of "label", but it was
actually returning true because the test was showing "en.label". The
test has been modified in consequences.
2025-02-11 20:11:04 +01:00
Osama Sayegh
4db3389f3d
FIX: Don't load all groups when rendering <GroupChooser /> (#31271)
In a few places throughout the app, when we render the `<GroupChooser
/>` component, we fetch the full groups list of the site from the
`/groups/search` endpoint. This is wasteful because the full groups list
is already included in the preloaded data that's sent to the client app
on the initial page load, so we can just use this preloaded list for
`<GroupChooser />` and we can avoid making an HTTP request.

Internal topic: t/147297.
2025-02-11 21:32:02 +03:00
Mark VanLandingham
3e056b5127
FIX: JS error when .header-cloak isn't present (#31281)
With some customizations, this element may not be on the page. Instead
of erroring, just continue on without the cloak.
2025-02-11 12:28:49 -06:00
Joffrey JAFFEUX
32c8aa0aad
DEV: supports triggerTag on DMenu (#31278)
This property allows to have a custom component for the DMenu trigger
instead of using a `DButton` which comes with its own css class for
example.

Example:

```gjs
const myComponent = <template><span ...attributes>test</span></template>;
<DMenu @triggerComponent={{myComponent}}>...</DMenu>
```

⚠️ It's important to pass the attributes otherwise your custom
trigger won't work.
2025-02-11 18:19:00 +01:00
Discourse Translator Bot
e925f9b7e8
Update translations (#31276) 2025-02-11 16:43:08 +01:00
Gerhard Schlager
eb305e0a98
DEV: Update default config for uploads_importer (#31208) 2025-02-11 16:33:15 +01:00
Gerhard Schlager
9279487079
DEV: Use correct method for creating slugs (#31273)
Empty slugs for topics break Discourse. This makes sure that we always
fall back to "topic" as default. And it also uses the configured slug
generation method instead of always using ASCII.
2025-02-11 16:29:08 +01:00
dependabot[bot]
8129be36e6
Build(deps-dev): Bump @discourse/lint-configs from 2.3.1 to 2.4.0 (#31205)
Bumps
[@discourse/lint-configs](https://github.com/discourse/lint-configs)
from 2.3.1 to 2.4.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>
2025-02-11 14:34:25 +00:00
Jarek Radosz
f44827fa3d
DEV: Fix mixed-decls sass deprecation (#31279)
See: https://sass-lang.com/d/mixed-decls

```diff
- WARNING: 253 deprecations encountered while compiling scss.
+ WARNING: 242 deprecations encountered while compiling scss.
```
2025-02-11 15:33:10 +01:00
Jarek Radosz
b290c557b8
DEV: Don't run scripts on pnpm dedupe (#31274) 2025-02-11 13:57:02 +01:00
David Taylor
beb8dc75e9
DEV: Update to OmniAuth 2.0 (#25707) 2025-02-11 11:18:07 +00:00
Loïc Guitaut
a4d34d60e3 DEV: Make Ruby services thread-safe
A previous refactor of the `Service::Base::Step` class introduced a
non thread-safe behavior. `#call` mutates instance variables at runtime,
and since a step instance is the same for any given service class, this
can sometimes lead to `context` being the wrong one for the running
service.

This patch makes use of `Concurrent::ThreadLocalVar` to fix the issue.
2025-02-11 11:18:42 +01:00
Bianca Nenciu
87f8845940
DEV: Split weekly job into multiple smaller jobs (#31260)
The weekly job can take more than 2 hours to run on larger sites. It is
ideal for the jobs to be as small as possible and this is what this
commit attempts.
2025-02-11 10:26:45 +02:00
Martin Brennan
43e8172ebc
UX: Add confirmation to crawler settings (#31269)
Adds a site setting confirmation to the following
settings, since they can be dangerous if changed
incorrectly:

* allowed_crawler_user_agents
* blocked_crawler_user_agents
* slow_down_crawler_user_agents
2025-02-11 13:02:26 +10:00
Ella E.
32704c42d0
UX: Update banner image field to use help text (#30666)
### What's changed?
- Add support for`@helpText` in the FormKit component.
- Updated the about config page to replace `@description` with
`@helpText` for the banner image field

### Before
<img width="525" alt="image"
src="https://github.com/user-attachments/assets/e8cdcca7-1b46-406f-8b6b-815e65dd5d9c"
/>

### After
<img width="256" alt="image"
src="https://github.com/user-attachments/assets/8656b866-5654-4f67-8515-f58a7b2b14c0"
/>


Internal: /t/138358/2
2025-02-10 19:48:31 -07:00
Martin Brennan
f95464ba81
Revert "UX: Hide inner site settings sidebar if admin sidebar enabled (#31047)" (#31267)
This reverts commit 91e9c1c81343990d5ebbb3a3bb7c68ec4445d610.

After feedback, for now we are reverting this change. This is not
permanent, the settings sidebar will be removed again, after we:

* Visually group the settings the same way as the sidebar does
  on All Settings
* Add more settings pages to the main admin sidebar to cover the ~250
  settings not yet represented there
2025-02-11 12:47:40 +10:00
Kris
08b8439e21
DEV: add transformer for default category view setting (#31264)
This allows us to set custom values here, like "Voting" from the topic
voting plugin:
https://github.com/discourse/discourse-topic-voting/pull/232
2025-02-10 16:48:11 -05:00
Angus McLeod
088ac0331e
DEV: Add topic_published event (#31239)
While it is possible derive a topic published event from category id
changes in a `post_edited` or `before_post_publish_changes` event, there
are use cases when a dedicated event is more apposite.
2025-02-10 14:58:58 -05:00
Kris
1d8cdfd5e0
UX: fix horizontal group nav on mobile (#31259)
This fixes the "all groups" link on mobile, follow-up to 50136ee

Before 


![image](https://github.com/user-attachments/assets/c6044ee6-3740-47a7-a006-239980bd7605)


After


![image](https://github.com/user-attachments/assets/9d090046-3131-4a9b-a21c-06c6a47c322b)
2025-02-10 11:43:00 -05:00
Amanda Alves Branquinho
e433be9f61
DEV: Add optional callback in notification dropdown action (#31257)
Modify the component UserNotificationDropdown to receive a function that
will be called after an user is ignored.
2025-02-10 13:26:19 -03:00
Arpit Jalan
85a95e9aa1
FEATURE: add first_post_id to TopicListItemSerializer (#31254)
Will be used in this feature:
https://github.com/discourse/discourse-topic-cards/pull/36
2025-02-10 21:53:05 +05:30
Kris
50136ee4e6
UX: switch group pages to horizontal nav (#31243)
This gets group pages on the same horizontal nav patterns as the user
profile pages. These pages need some more adjustments in general, but
this is a good start!

Before: 

![image](https://github.com/user-attachments/assets/2eaf5504-030f-4c91-a794-f66808fe0576)

![image](https://github.com/user-attachments/assets/5a726208-56ec-437c-8e53-c6edcd2ce772)


After:

![image](https://github.com/user-attachments/assets/f621c371-ac2c-4ab7-af18-d836bcec4c74)

![image](https://github.com/user-attachments/assets/c9eee57e-3e30-4ccb-82a2-29327dae5404)


Before: 

<img
src="https://github.com/user-attachments/assets/b58f1994-8ef8-4a67-9b37-bfee428c343b"
width="350" />

After:

<img
src="https://github.com/user-attachments/assets/013b1af6-ddb9-4a93-bcfe-37b2a9760d8b"
width="350" />
2025-02-10 10:38:31 -05:00
David Taylor
db139534d2
DEV: Drop d-crowd plugin from official list (#31258)
This repo was archived in March 2024 and is no longer supported.

Commit also fixes up the plugin-gem-symlinking logic to support removing
plugins from the list
2025-02-10 15:08:31 +00:00
Jarek Radosz
09bc785fbf
DEV: Fix pnpm dedupe workflow and lock pnpm version (#31244)
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-02-10 14:18:52 +01:00
Kelv
b751742573
FIX: invalid CSP directive sources should allow site to boot with valid CSP directives (#31256)
[Security
patch](5558e72f22)
(for this [CVE](https://nvd.nist.gov/vuln/detail/CVE-2024-54133)) from
rails actionpack was backported from [Rails
8.0.0.1](https://github.com/rails/rails/blob/v8.0.1/actionpack/CHANGELOG.md#rails-8001-december-10-2024)
to previous stable versions including `7-1-stable` / `7-2-stable`.

Any previous version of Discourse upgrading to v3.4.0.beta3 and above
would have observed their sites crashing if they had invalid sources in
their CSP directive extensions.

This fix removes such invalid sources during our build of the CSP, and
logs these at a warning level so devs are able to find out why their CSP
sources were filtered out of the extendable directives.
2025-02-10 20:38:36 +08:00
Ted Johansson
3d11e3ca10
DEV: Require at least one scope for API key granular mode (#31253)
Currently, if creating an API key in "granular" mode, and not selecting any scopes, a globally scoped API key is created. This can be surprising and is not ideal. Having a key with no scopes isn't useful in the first place, so this PR adds client- and server side validations to check that at least one scope is selected if using "granular" mode.
2025-02-10 13:22:08 +08:00
Martin Brennan
7be88bbe8a
FIX: Improvements for uploads:disable_secure_uploads task (#31231)
This commit contains a couple of improvements for this
rake task.

* We no longer limit the uploads to only ones with Post
  upload references, it doesn't matter what the secure uploads
  are linked to, they should all be un-secured
* We now only get distinct uploads from the initial query,
  multiple upload references on the same upload caused
  double ups and confusing counts for the task
* We now also disable the secure_uploads_pm_only site
  setting at the same time
2025-02-10 14:37:42 +10:00
Martin Brennan
ec7c6b1f96
FIX: Incorrect topic per-minute invitation rate limit (#31252)
This fixes an issue where the topic invitation rate limiter
for invites for the 1 minute period was incorrectly using
1 day as the length of time the limit should be applied over.
The default for `max_topic_invitations_per_minute` is 5,
so this would be very easy to exceed, then the user gets
a very confusing warning message saying they have to wait
23 hours to send more invites.

This commit also makes other `RateLimiter` period parameters
more consistent by always using the form `N.PERIOD` instead
of things like `86_400` hardcoded seconds per day.
2025-02-10 13:12:16 +10:00
Sam
8d3a35e25b
DEV: update mini_racer to node 23.6.1 (#31251)
This brings us extremely close to latest
2025-02-10 12:58:34 +11:00
Régis Hanol
541f4ec103
DEV: remove a deprecation notice regarding hard-to-serialize (#31238)
arguments being passed to background jobs.
2025-02-09 15:10:52 +01:00
Régis Hanol
85e82e7be3
DEV: remove another deprecation notice when serializing args (#31240)
to background jobs
2025-02-09 15:10:41 +01:00
Penar Musaraj
54a52e5691
DEV: Improve checking for selected text (#30967)
After you've selected and deselected text, `selection.rangeCount` will
return `true` on future events. Checking for `selection.toString` is
more robust.

Followup to f1bdd86a8c9bec03b962167c37963b1d11d0e5ea
2025-02-07 12:13:39 -05:00
Isaac Janzen
6595b11e25
DEV: Add composer-service-cannot-submit-post transformer (#30903)
- Add `composer-service-cannot-submit-post` transformer to allow for disabling submit based on custom conditions
- Add tests for transformer
- Add a couple helpful appEvents, that plugins can use add custom error popups to plugin-defined fields.
2025-02-07 10:27:26 -06:00
Jan Cernik
42447770bf
FIX: Automatic auth flow with full page login/signup V3 (#31072)
This adds back the fixes from
https://github.com/discourse/discourse/pull/30928 that were reverted by
https://github.com/discourse/discourse/pull/30960.
2025-02-07 10:40:45 -05:00