Commit Graph

59008 Commits

Author SHA1 Message Date
58332eaec2 Build(deps): Bump faraday from 2.13.0 to 2.13.1 (#32481)
Bumps [faraday](https://github.com/lostisland/faraday) from 2.13.0 to
2.13.1.
- [Release notes](https://github.com/lostisland/faraday/releases)
-
[Changelog](https://github.com/lostisland/faraday/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/lostisland/faraday/compare/v2.13.0...v2.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-28 01:24:56 +02:00
8e24d6a724 Build(deps): Bump json from 2.11.2 to 2.11.3 (#32482)
Bumps [json](https://github.com/ruby/json) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/ruby/json/releases)
- [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md)
- [Commits](https://github.com/ruby/json/commits/v2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-28 01:24:49 +02:00
948d9c096d Build(deps-dev): Bump shoulda-matchers from 6.4.0 to 6.5.0 (#32480)
Bumps [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers)
from 6.4.0 to 6.5.0.
- [Release
notes](https://github.com/thoughtbot/shoulda-matchers/releases)
-
[Changelog](https://github.com/thoughtbot/shoulda-matchers/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/thoughtbot/shoulda-matchers/compare/v6.4.0...v6.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-28 01:18:06 +02:00
fbc2cfb618 DEV: Refactor moment.js loading (#32337)
- Load moment and moment-timezone-with-data via webpack import instead
of including copies in every locale file

- Fetch static files from node_modules instead of `vendor/`

This cuts the size of locale-specific JS files in half, since they no
longer include moment itself.
2025-04-26 13:52:07 +01:00
13ea673d18 UX: fix rich editor placeholder being cut on mobile (#32474)
After adjusting an overflow on the rich editor placeholder, it started
being cut on mobile, as the parent paragraph can be smaller than the
area the placeholder takes.

This fixes it by returning the `position: relative` to the
`.ProseMirror` editor, which also fixes some weird positioning errors
for "fake" cursors (gap cursor, codemark cursor, drop cursor) and
absolute-positioned elements that relied upon the editor being
`position: relative`.
2025-04-26 08:22:06 -03:00
0b5067132b Build(deps-dev): Bump @swc/core from 1.11.21 to 1.11.22 (#32427)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.11.21 to
1.11.22.
- [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.11.21...v1.11.22)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-26 10:52:00 +01:00
aafbde2080 DEV: Convert final hbs to gjs and enable require-strict-mode lint (#32473) 2025-04-26 10:48:43 +01:00
acc11cc9aa DEV: Remove final {{action uses and enable lint rule (#32348) 2025-04-25 21:25:06 +01:00
ca658a8bb0 A11Y: add H1 tags for screenreaders on discovery routes (#32422)
Over the years we've received multiple pieces of feedback around our
lack of meaningful H1 tags on our topic lists.

This adds an `<H1>`, hidden with `.sr-only`, for screenreaders that
describes the content of our discovery routes. I've tried to keep these
structured in a way that's somewhat consistent and uses natural
language.

The translations could probably be more efficiently structured, but I
think we need a good amount of flexibility here for translators to
change the sentence structure.

Ultimately this means people using screenreaders will know which page
they're on while navigating headings... and without having to parse
through our navigation.

For example (made visible to demonstrate):


![image](https://github.com/user-attachments/assets/ae397317-b167-44b9-9dfa-79ddd8f9dfda)


![image](https://github.com/user-attachments/assets/fbdb8c49-03ed-40af-ae21-c7eb841f3d3e)


![image](https://github.com/user-attachments/assets/8f36da9d-04cb-4c6b-a4c3-baffbecc64e5)


![image](https://github.com/user-attachments/assets/fc9f3f8d-35a1-4953-84cf-337a00077e26)
2025-04-25 15:08:37 -04:00
ccbf88eb98 DEV: remove wrapping span from full-page-search-below-search-info outlet (#32472)
This span renders even when the plugin outlet isn't being used, so it
can get in the way. I did a quick search and don't see it targeted
anywhere obvious (it would be difficult to do without a unique class
anyway)
2025-04-25 14:50:23 -04:00
e3c3cfe083 UX: Unhide the rich_editor site setting (#32455)
This will show the experimental rich_editor setting and admins
can turn it on for their site. It is still marked experimental
because there are some features missing, but it works well for
95% of cases.


---------

Co-authored-by: Renato Atilio <renato@discourse.org>
2025-04-25 15:00:21 -03:00
d166746aa2 Build(deps-dev): Bump webpack from 5.99.5 to 5.99.6 (#32374)
Bumps [webpack](https://github.com/webpack/webpack) from 5.99.5 to
5.99.6.
- [Release notes](https://github.com/webpack/webpack/releases)
-
[Commits](https://github.com/webpack/webpack/compare/v5.99.5...v5.99.6)

---------

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-04-25 16:20:59 +01:00
6a1dc50895 DEV: Stop running core annotations check as a standalone job (#32470)
Merging the core annotation check into the core backend job reduces the
number of runners required per workflow from 15 to 14. Before this
change, the core annotations job occupies a runner for about 1 min
30 secs in order to spend 9 seconds running the core annotations check.
2025-04-25 23:18:55 +08:00
bc94909763 DEV: Bump tests workflow build job timeout for plugin system tests (#32469)
While the step to run plugin system tests has been set with a timeout of
30 minutes, the overall job timeout was only set to 20 minutes. As a
result, we are starting to see the plugin system tests job fail due to
the job exceeding the 20 minutes timeout.

### Reviewer notes 

Example of plugin system tests exceeding 20 minutes timeout:
https://github.com/discourse/discourse/actions/runs/14665943355/job/41160611627
2025-04-25 16:55:11 +02:00
920d854717 UX: adjust search blurb text (#32467)
Before:

![image](https://github.com/user-attachments/assets/72ada716-4a4a-4f91-9d7e-07b2ab89e72a)


After: 

![image](https://github.com/user-attachments/assets/cd7622be-94cd-47d4-8d0a-8efbd05ec324)
2025-04-25 10:30:59 -04:00
ec07291cf6 Build(deps): Bump @csstools/postcss-light-dark-function from 2.0.7 to 2.0.8 (#32375)
Bumps
[@csstools/postcss-light-dark-function](https://github.com/csstools/postcss-plugins/tree/HEAD/plugins/postcss-light-dark-function)
from 2.0.7 to 2.0.8.
-
[Changelog](https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-light-dark-function/CHANGELOG.md)
-
[Commits](https://github.com/csstools/postcss-plugins/commits/HEAD/plugins/postcss-light-dark-function)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-25 14:37:07 +01:00
483d5dadff Build(deps): Bump rqrcode_core from 1.2.0 to 2.0.0 (#32454)
Bumps [rqrcode_core](https://github.com/whomwah/rqrcode_core) from 1.2.0
to 2.0.0.
- [Release notes](https://github.com/whomwah/rqrcode_core/releases)
-
[Changelog](https://github.com/whomwah/rqrcode_core/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/whomwah/rqrcode_core/compare/v1.2.0...v2.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-25 14:36:31 +01:00
0f9d1b9b3d Build(deps-dev): Bump puppeteer-core from 24.7.1 to 24.7.2 (#32451)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.7.1 to 24.7.2.
- [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.7.1...puppeteer-core-v24.7.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-04-25 14:36:26 +01:00
a345d00bf4 Build(deps): Bump json from 2.10.2 to 2.11.2 (#32453)
Bumps [json](https://github.com/ruby/json) from 2.10.2 to 2.11.2.
- [Release notes](https://github.com/ruby/json/releases)
- [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md)
- [Commits](https://github.com/ruby/json/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-25 14:36:21 +01:00
ebeabd081b Build(deps-dev): Bump esbuild from 0.25.2 to 0.25.3 (#32430)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.2 to 0.25.3.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.2...v0.25.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-25 14:36:09 +01:00
4c689ab82c Build(deps): Bump ace-builds from 1.39.1 to 1.40.1 (#32426)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.39.1 to
1.40.1.
- [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.39.1...v1.40.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-25 14:35:59 +01:00
75d70f9b6f Build(deps): Bump the prosemirror group with 4 updates (#32406)
Bumps the prosemirror group with 4 updates:
[prosemirror-dropcursor](https://github.com/prosemirror/prosemirror-dropcursor),
[prosemirror-model](https://github.com/prosemirror/prosemirror-model),
[prosemirror-transform](https://github.com/prosemirror/prosemirror-transform)
and [prosemirror-view](https://github.com/prosemirror/prosemirror-view).


Updates `prosemirror-dropcursor` from 1.8.1 to 1.8.2
-
[Changelog](https://github.com/ProseMirror/prosemirror-dropcursor/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/prosemirror/prosemirror-dropcursor/compare/1.8.1...1.8.2)

Updates `prosemirror-model` from 1.25.0 to 1.25.1
-
[Changelog](https://github.com/ProseMirror/prosemirror-model/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/prosemirror/prosemirror-model/compare/1.25.0...1.25.1)

Updates `prosemirror-transform` from 1.10.3 to 1.10.4
-
[Changelog](https://github.com/ProseMirror/prosemirror-transform/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/prosemirror/prosemirror-transform/compare/1.10.3...1.10.4)

Updates `prosemirror-view` from 1.39.1 to 1.39.2
-
[Changelog](https://github.com/ProseMirror/prosemirror-view/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/prosemirror/prosemirror-view/compare/1.39.1...1.39.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-25 14:30:26 +01:00
a7de718acd DEV: make category title badges optional (#32394)
Allows themes and components to opt out of category title badge styling
when using the `CategoryTitleLink`.

Using `@unstyled` allows the previous text only category name that we
had prior to #32109:

```
<CategoryTitleLink @category={{c}} @unstyled={{true}} />
```
2025-04-25 15:26:16 +04:00
b590a0d7a2 DEV: [gjs-codemod] Add to git-blame-ignore-revs 2025-04-25 11:58:46 +01:00
e41897a306 DEV: [gjs-codemod] Convert final core components/routes to gjs 2025-04-25 11:06:24 +01:00
e401d795c6 DEV: [gjs-codemod] merge js and hbs 2025-04-25 11:05:20 +01:00
2a47848453 DEV: [gjs-codemod] renamed hbs to gjs 2025-04-25 11:05:18 +01:00
a9ddbde3f6 DEV: [gjs-codemod] renamed js to gjs 2025-04-25 11:05:17 +01:00
a0c0923a80 Build(deps-dev): Bump @discourse/lint-configs from 2.12.0 to 2.13.2 (#32323)
Bumps
[@discourse/lint-configs](https://github.com/discourse/lint-configs)
from 2.12.0 to 2.13.2.
- [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: David Taylor <david@taylorhq.com>
2025-04-25 10:32:18 +01:00
b85654e425 Revert "FIX: Also show localized categories for users who are not logged in (#32463)
Related #32460

This reverts commit 5a4f3b3ab8c81282e17430784bc90d73a3bbce72.
2025-04-25 16:49:44 +08:00
b2c4d430b9 DEV: remove buffered-content mixin (#32417)
Follow up from https://github.com/discourse/discourse/pull/31926.

This replaces the one remaining usage in core of the buffered-content
mixin, and removes the mixin file.
2025-04-25 16:07:07 +08:00
5a4f3b3ab8 FIX: Also show localized categories for users who are not logged in (#32460)
In https://github.com/discourse/discourse/pull/32380, we started showing
localized categories. However we missed out anon users.

This commit ensures the site cache is also localized.
2025-04-25 15:40:35 +08:00
b6281d0c52 DEV: Introduce with_security_key system test helper (#32459)
Instead of having each test go incur the overhead of having to go
through the actual user flow to register a security key, we can generate
the WebAuthn credentials on the server side and adds it to the virtual
authenticator.
2025-04-25 15:40:07 +08:00
2dfafe3fd2 DEV: Report runtime duration of each parallel test process (#32457)
This information is generally useful to know and it simple for us to
instrument.
2025-04-25 15:23:53 +08:00
27ebf5f41a FIX: add category title badges to boxed layout (#32395)
This was missed when adding category badges in #32109. Category title
badges are now added when the site setting for `Desktop category page
style` or `Mobile category page style` is set to either:

- Boxes with Subcategories
- Boxes with Featured Topics
2025-04-25 11:20:41 +04:00
1d7c1eca27 DEV: Move SiteSettingFilter to admin namespace (#32458)
100% lift-and-shift of SiteSettingFilter into the admin JS namespace, where it is exclusively used.
2025-04-25 14:13:49 +08:00
3f845c6cdd UX: Better differentiation for dark-mode (#32450) 2025-04-24 16:29:00 -05:00
0ef80077e4 DEV: Pass toggleNavigationMenu to above sidebar PluginOutlet (#32449) 2025-04-24 13:31:54 -05:00
fcf2ba8c8a UX: rich editor placeholder edge case (#32448) 2025-04-24 14:48:38 -03:00
588caa60b9 UX: Add missing discourse-table SVG icon (#32447)
Meta:
https://meta.discourse.org/t/icon-missing-in-admin-panel-after-updating-discourse-today/363295

The `discourse-table` icon usage was introduced in
464726d973.
However, the SVG doesn't exist in core, but instead in the [AI
plugin](https://github.com/discourse/discourse-ai/blob/main/svg-icons/icons-sprite.svg?short_path=9d0511c).

The PR adds this SVG icon to the core.
2025-04-24 13:45:24 -04:00
8533e2017e UX: Locale and name shouldn't be "optional" (#32446)
## 🔍 Overview
The validation was already working and you can't submit localizations
without name and locale, but we want to add the client-side validation
and ensure the "optional" label is removed from the form.

## 📸 Screenshots

### ←Before
![Screenshot 2025-04-24 at 10 08
54](https://github.com/user-attachments/assets/088e7281-b03c-4c7f-8454-451c0cb53348)

### → After
![Screenshot 2025-04-24 at 10 07
35](https://github.com/user-attachments/assets/3a6e4b1f-714c-44c8-acae-bb96f63bf9f6)
2025-04-24 10:28:38 -07:00
a31a2d9a9f UX: Remove position & z-index style (#32445) 2025-04-24 12:15:19 -05:00
4e62990648 UX: Fix content from not showing above composer (#32443) 2025-04-24 12:03:28 -05:00
c38b50994d PERF: Enable brotli in NGINX (#32333)
This enables on-the-fly brotli compression at level 4 for all responses
which we currently gzip. This level should provide slightly improved
file sizes when compared to gzip, as well as slightly faster processing
times. This is the [level which Cloudflare
use](https://blog.cloudflare.com/results-experimenting-brotli/) for
dynamic responses.

When compared to our existing gzip level-5 configuration, our own
experiments confirm that it provides slightly faster compression, with
slightly smaller file sizes.

For static assets which are cached by CDNs/browsers, we use brotli level
6 for an even better compression ratio.
2025-04-24 15:45:13 +01:00
fe12500767 UX: Do not let composer affect chat window height (#32423) 2025-04-24 09:32:28 -05:00
bc6dae07ee DEV: Don't attempt to install minio binary in CI (#32438)
The binary is already preinstalled in the Docker image so we don't have
to attempt to install it again.

### Reviewer notes

Installing the minio binary is taking more than 45 seconds consistently
causing the test to timeout:
https://github.com/discourse/discourse/actions/runs/14638755310/job/41075932169

<img width="1091" alt="Screenshot 2025-04-24 at 6 15 48 PM"
src="https://github.com/user-attachments/assets/ec746740-fe46-4ef8-8a76-c210be1e3204"
/>
2025-04-24 18:58:58 +08:00
ed2740d0ca FIX: correctly reset panel when resizing window (#32437)
The problem is mainly that we also have a css animation made from js
which was setting a different width for the panel, so the `style.width =
"auto"` was not overriding this part. This animation happens in a parent
component after `didResizeContainer` is called, so it could be fine most
of the times, but the simpler change is to ensure, panel resize, or
window resize ends up in the same codepath so whatever the developer
decides to do in `didResizeContainer` hook will be applied in both
cases.

No test as it's fairly hard to test and would require a complex system
spec setup.

It avoids this situation where the side panel is larger than viewport
after window resize:
![Screenshot 2025-04-24 at 11 58
09](https://github.com/user-attachments/assets/8b58793a-32dc-4bc8-9989-7498e458c059)
2025-04-24 20:31:55 +10:00
199d7fb074 DEV: Reduce runtime of spec/system/(login|signup)_spec.rb (#32436)
This commit applies a similar optimisation as
d0d755ad8c478db45e3298df9de1cdabe59d9592.

Basically, the `full_page_login` site setting is going to be dropped
this week and these extra system tests we are running due to this site
setting is accounting for a significant percentage of the overall
runtime for core system tests.

### Reviewer notes

The PR to remove the `full_page_login` site setting is at
https://github.com/discourse/discourse/pull/32189 and scheduled to be
merged by us on 29th April.
2025-04-24 17:55:29 +08:00
ce76d7aaa7 DEV: Avoid unnecessary redirect in system tests when visiting a topic (#32418)
Visiting `/t/-/<topic_id>` results in an extra redirect request.
2025-04-24 16:59:08 +08:00
86f35b6a17 DEV: More linting fix (#32435) 2025-04-24 16:30:13 +08:00