Commit Graph

58199 Commits

Author SHA1 Message Date
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
05685d430f FIX: Make permalink search work even when there're 100+ permalinks (#31354)
Permalink search regressed in
https://github.com/discourse/discourse/pull/30633 where the search
implementation was changed from server side to client side. Prior to
that change, we included a `filter` param in the request to make the
server find permalinks that matched the given filter and return the
results limited to 100 records. However, with that change, we stopped
sending the `filter` param with the request, which made the server
always return the same 100 records which would then be filtered on the
client side. That means if a site has more than 100 records, any records
that don't make it in the first 100 will never be found using search.

Meta topic:
https://meta.discourse.org/t/permalinks-no-longer-has-a-way-to-search-or-show-all-permalinks/351922?u=osama
2025-02-16 00:19:16 +03:00
aeb3d717dc FIX: Don't show &nbsp; in date to button (#31352) 2025-02-14 16:53:38 -05:00
878514af6e DEV: Add ability to set disabled option on report filters (#31351)
This update adds the ability to conditionally control the `disabled`
property of the input on report filters.
2025-02-14 12:13:33 -08:00
f76d88063d FIX: Missing link to deleted post in /my/deleted-posts (#31342)
## 🔍 Overview
A regression in https://github.com/discourse/discourse/pull/30604,
resulted in the title/link for deleted posts not being shown. This fix
ensures that the title is once again shown.

## 📸 Screenshots

### ← Before
![Screenshot 2025-02-13 at 14 14
08](https://github.com/user-attachments/assets/17da8119-e476-4458-bc19-3f55efac91b2)

### → After
![Screenshot 2025-02-13 at 14 13
42](https://github.com/user-attachments/assets/ba2389ba-6cad-4641-a2cb-d2a13c10c233)
2025-02-14 09:50:42 -08:00
b01d4b1951 DEV: More targeted cleanup in plugin registry specs (#31333)
When running core specs with `LOAD_PLUGINS=1`,
`DiscoursePluginRegistry.reset!` throws a warning. Using specific
cleanup ensures that doesn't happen.
2025-02-14 10:28:29 -05:00
e5eeb642b9 DEV: include expandPinned in topic-list-main-link-bottom outlet (#31334)
Requested on Meta, seems reasonable:
https://meta.discourse.org/t/modify-topicexcerpt-template/352136
2025-02-14 09:37:07 -05:00
a0f681b256 DEV: Refactor chat HTML decorating (#31309)
Uses the new `<DecoratedHtml` component, which takes care of the full
decorate/render lifecycle. That means we can drop all the custom
modifiers/debouncing which chat was doing. It also naturally adds
support for `helper.renderGlimmer` in chat decorations.

This should resolve a number of subtle bugs related to chat message
decorations.
2025-02-14 11:34:39 +00:00
b2b9657a0b FIX: Image uploads in site-settings and profile (#31350)
Followup to 310cd513d88e3670c7008682ae4b35414084a17d. The `uploadDone`
callback returns the whole upload object, so we need to extract the URL
from it in these cases.
2025-02-14 11:02:10 +00:00
7779cf1e90 FIX: prevents double set in the same computation (#31348)
The current code was doing:
- initial value for `showPreview`
- setting another default value in `_setupPreview`

The fix is to move all the computation in one initial step when
initializing the property.
2025-02-14 11:52:55 +01:00
04531f1443 FIX: relative date format consistency (#31349)
This changes makes relative date formats consistent for both tiny and
medium formats.

Previously we were removing 12 hours from the date for medium format
when it was more than 2520 minutes (42 hours) but not for tiny date
formats.
2025-02-14 14:17:48 +04:00
54b1e3195c DEV: Refactor composer preview rendering (#31308)
- Switch to use new `<DecoratedHtml` component (including
`renderGlimmer` support)

- Updates click handling to use `{{on` modifier instead of manual event
listener setup/teardown
2025-02-14 09:50:02 +00:00
35084d3089 DEV: Refactor PostList cooked HTML rendering (#31307)
- Remove JQuery

- Move decoration into `components/post-item`, instead of managing it
from the top-level user-stream component

- Use new `DecoratedHtml` component
2025-02-14 09:46:32 +00:00
b471e3d5ba FEATURE: Allow showing only experiments on "What's new?" (#31347)
This commit allows admins to filter the list of feature
feed items on the "What's new?" page to _only_ show experiments.

This is useful to both find existing experiments they may have
enabled, and to get a better overview of new ones they would
like to try.

This will eventually not be required when we build a dedicated
config page for experiments.
2025-02-14 13:30:37 +10:00
2763e1726e FEATURE: display process information on flag modal (#31300)
Information about the process is displayed on top of the flag modal.

In addition `allow_tl0_and_anonymous_users_to_flag_illegal_content` site
setting was renamed to `allow_all_users_to_flag_illegal_content` as it
is more descriptive.

<img width="629" alt="Screenshot 2025-02-12 at 3 58 12 pm"
src="https://github.com/user-attachments/assets/67c74ebc-6771-490d-b2c4-cbec25db8128"
/>
<img width="642" alt="Screenshot 2025-02-12 at 3 58 04 pm"
src="https://github.com/user-attachments/assets/5e4b8c84-601a-40c2-812f-b73d2b88a549"
/>
2025-02-14 11:26:20 +11:00
fa8945fee2 UX: remove old menu border hack (#31344)
We used to hide the bottom border of the header buttons when menu panels
were open (so they'd appear connected), but this is no longer
necessary... so all this vestigial CSS does is sometimes create a stray
line like this:


![image](https://github.com/user-attachments/assets/12357bf3-2bc7-4604-8b76-7e54460a4175)
2025-02-13 18:04:47 -05:00
be513ed9a3 DEV: Fix all mixed-decls sass deprecations (#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-13 23:58:19 +01:00
8c9514b4ba Build(deps-dev): Bump webpack from 5.97.1 to 5.98.0 (#31336)
Bumps [webpack](https://github.com/webpack/webpack) from 5.97.1 to
5.98.0.
- [Release notes](https://github.com/webpack/webpack/releases)
-
[Commits](https://github.com/webpack/webpack/compare/v5.97.1...v5.98.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-13 23:53:58 +01:00