Commit Graph

58324 Commits

Author SHA1 Message Date
593f4f7592 Build(deps-dev): Bump ember-exam from 9.0.0 to 9.1.0 (#31660)
Bumps [ember-exam](https://github.com/ember-cli/ember-exam) from 9.0.0
to 9.1.0.
- [Release notes](https://github.com/ember-cli/ember-exam/releases)
-
[Changelog](https://github.com/ember-cli/ember-exam/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-exam/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 23:40:29 +01:00
1a25f99e13 Build(deps): Bump google-protobuf from 4.29.3 to 4.30.0 (#31658)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf)
from 4.29.3 to 4.30.0.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
-
[Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits/v4.30.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 23:38:58 +01:00
e29c235281 Build(deps-dev): Bump parallel_tests from 5.0.0 to 5.0.1 (#31657)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from
5.0.0 to 5.0.1.
-
[Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/grosser/parallel_tests/compare/v5.0.0...v5.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 23:37:28 +01:00
7e65cdbc9a DEV: discourse-emojis 1.0.31 (#31655)
This gems bring a whole improved fluentui emoji set. Each image has been
recomputed to optimize the size of the emoji and remove useless margins.

For this reason the version has been bumped.

Other notable change: the emoji yo-yo can now be called "yoyo".
2025-03-05 21:49:18 +01:00
faa985bf28 DEV: Add search_result_view app event to SearchMenu (#31632)
For plugins/themes to be able to hook into after search result review is
rendered
2025-03-05 12:20:56 -06:00
f9e4ac94f5 DEV: Add a new behavior transformer to topic list item click (#31653)
- Add the behavior transformer `topic-list-item-click` to allow the
customization for the click behavior on the topic list item.
2025-03-05 15:15:17 -03:00
299b1b42ec DEV: Reduce the use of self/set in tests (#31648)
still lots to update but it's a start
2025-03-05 13:10:20 +01:00
0684ac64f2 DEV: Remove the deprecated componentTest helper (#31649) 2025-03-05 12:50:12 +01:00
95939ca499 DEV: set field type in control wrapper (#31647)
Calling `<field.Calendar>` will ultimately call `componentFor` which
will mutate the type of the field. Problem is the way we use a hash to
define all the available controls, would work correctly on first render,
but because of the mutation in `componentFor` if something would trigger
a re-render it would have to evaluate all the `componentFor` calls, and
the last one would "win" (currently calendar), which would mean that a
field rendered as custom would for example become calendar.

The easiest repro was:

```gjs
<Form as |form|>
  <form.field as |field|>
    {{log field}}
    <field.Custom>
      Hello world
    </field.Custom>
  </form.field>
</Form>
```

The fix for now is to mutate the value at the point where the component
is actually rendered, in control-wrapper.

A possibly more correct longer term fix could be to change the API, to
set the type on the field when defined in the template, and render a
generic component which would use this type to know what to render:

```gjs
<form.field @type="calendar" as |field|>
  <field.Control @someCalendarOption="bar" />
</form.field>
```
2025-03-05 11:43:53 +01:00
ba262733a6 A11Y: Improve contrast for FormKit help text and optional text (#31645) 2025-03-04 22:29:15 -07:00
305039b1c3 DEV: ensure Rails application default headers are present in responses (#31619)
Follow up from https://github.com/discourse/discourse/pull/31559.

We expect some standard headers to be added from
`Rails.application.config.action_dispatch.default_headers` for
responses, however these were found to be removed in some error paths. 
For more detail on this behaviour, refer to https://github.com/discourse/discourse/pull/31619#issuecomment-2699644232.

This PR adds those headers back if they aren't there, with the caveats
that we don't add headers that are irrelevant for non-HTML responses,
and neither do we add X-Frame-Options which is intentionally removed for
embeddables.
2025-03-05 13:19:09 +08:00
63213398bf UX: Add left border to indented field and update caret for consistency (#31643)
* Added a subtle left border to the indented field to improve visual
hierarchy
* Updated the caret to align with other expandable elements for
consistency
2025-03-05 14:29:51 +11:00
e4401e587e FIX: Ensure queued posts with watched words are processed correctly. (#31641)
This change ensures that queued posts that have ended up in the review queue due to matched a watched word display correctly.

It also improves the data checking to ensure that any other reviewables with watched words don't break the review queue, either.
2025-03-05 13:59:42 +11:00
223b40de1c FEATURE: Store composer version and device info on post stat (#31600)
We are developing our new composer, and it would be useful
if we could know how posts are being created by members.

To this end, we are going to start storing the following
on post_stats, which are created at the same time as a post
is created:

* writing_device - Based on `BrowserDetection.device`, which in
  turn is based on user agent. Will store .e.g iphone, android,
  mac, windows etc.
* writing_user_agent - Stores the full user agent (truncated at
  400 chars) of the device/browser the member used to write the post.
* composer_version - Either `1` for our old composer, or
  `2` if the new rich composer is enabled in site settings and
  the user has toggled it on
2025-03-05 12:48:32 +10:00
702a2a9cbc UX: display html tags in silence reason (#31598)
Allow HTML tags in silence reason. Tags must be stripped for title
attribute.

Before

![image](https://github.com/user-attachments/assets/05d9819a-9dbf-46b2-b9c5-88187ca9af5b)


After
<img width="1079" alt="Screenshot 2025-03-04 at 11 39 05 am"
src="https://github.com/user-attachments/assets/2bb41deb-227c-47a8-b840-b0316a764252"
/>
<img width="1096" alt="Screenshot 2025-03-04 at 11 39 22 am"
src="https://github.com/user-attachments/assets/02e27fc0-317e-43df-bce8-6b68e48ac40e"
/>
2025-03-05 12:43:03 +11:00
828fcb1ad3 DEV: Add rake task to bulk delete posts (#31642)
Same as #31576, but in that one I added some support files that turned out to be unnecessary and broke the build. So this is the re-do. 🙏
2025-03-05 09:31:23 +08:00
Sam
503645dc34 DEV: bump to major release of mini_racer (#31640)
Only notable changes is that we added
internal support for TimeWithZone which
was absent from previous release

We also improved error messages for T_OBJECT
2025-03-05 12:06:36 +11:00
72ba574d6f DEV: Convert tests using the gjs codemod (#31625)
```sh
pnpm dlx @embroider/template-tag-codemod@alpha --relativeLocalPaths=false --nativeRouteTemplates=false --nativeLexicalThis=false --templateInsertion="end"
```
2025-03-05 01:37:30 +01:00
28e00d9bfe DEV: Update lint-configs and autofix issues (#31620)
This updates us to Prettier 3.x
2025-03-05 01:20:16 +01:00
f8b30ffd06 Build(deps-dev): Bump @swc/core from 1.11.5 to 1.11.7 (#31636)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.11.5 to
1.11.7.
- [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.5...v1.11.7)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 00:26:30 +01:00
143550a93b Build(deps-dev): Bump babel-import-util from 3.0.0 to 3.0.1 (#31635)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from
3.0.0 to 3.0.1.
- [Release notes](https://github.com/ef4/babel-import-util/releases)
-
[Changelog](https://github.com/ef4/babel-import-util/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ef4/babel-import-util/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-03-05 00:03:22 +01:00
c1d9887ead FIX: only show small user list if users has length (#31631)
Need to check length here so we're not exposing the component when there
are no users, fixes:
https://meta.discourse.org/t/expanding-topic-actions-displays-who-liked-the-posts-but-nobody-has-liked-it/355225

follow-up to
5312550bf9
2025-03-04 16:50:41 -05:00
1e1fae38b5 Build(deps-dev): Bump parallel_tests from 4.9.1 to 5.0.0 (#31630)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from
4.9.1 to 5.0.0.
-
[Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/grosser/parallel_tests/compare/v4.9.1...v5.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-04 22:47:56 +01:00
ba3f1577d4 Build(deps-dev): Bump rubocop-discourse from 3.10.0 to 3.11.0 (#31627)
Bumps
[rubocop-discourse](https://github.com/discourse/rubocop-discourse) from
3.10.0 to 3.11.0.
-
[Commits](https://github.com/discourse/rubocop-discourse/compare/v3.10.0...v3.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-04 22:40:10 +01:00
1f93d3e36e Build(deps-dev): Bump rubocop-rails from 2.30.2 to 2.30.3 (#31628)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from
2.30.2 to 2.30.3.
- [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.2...v2.30.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-04 22:39:22 +01:00
b270d541ff Build(deps-dev): Bump rubocop from 1.73.1 to 1.73.2 (#31629)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.73.1 to
1.73.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.73.1...v1.73.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-04 22:39:03 +01:00
2ab00c5b37 DEV: Add apply_modifier on group's mentionable scope (#31565)
This PR adds DiscoursePluginRegistry.apply_modifier on group's
mentionable scope.
2025-03-04 15:36:55 -06:00
d93f8c1d43 Build(deps): Bump rack from 2.2.11 to 2.2.12 (#31626)
Bumps [rack](https://github.com/rack/rack) from 2.2.11 to 2.2.12.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.11...v2.2.12)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-04 22:35:17 +01:00
dde1b523b6 DEV: Update template-override deprecation (#31623)
- Update Meta topic URLs

- Add theme/plugin identification to deprecation

- Enable admin warning banner

- Enable overriding of gjs component templates, to unblock core upgrade
work between now and final removal of the template override feature

https://meta.discourse.org/t/355668
2025-03-04 18:49:49 +00:00
2041eaf89d DEV: Drop PluginOutlet parentView and DButton string actions (#31624)
These have been deprecated, with admin warnings, for some time
2025-03-04 18:48:56 +00:00
3160ad8fb0 DEV: Convert d-button test classes to native syntax (#31622) 2025-03-04 18:44:07 +01:00
150edff1cf DEV: Use an inline require to avoid a circular import (#31615) 2025-03-04 17:34:44 +01:00
b0cf0f89be DEV: Inline the test templates (#31614)
in preparation for running the gjs codemod
2025-03-04 17:34:22 +01:00
5aa47a26ee DEV: Remove unused modal code (#31613) 2025-03-04 17:24:17 +01:00
4b3044565d DEV: Check Gemfile.lock is up to date on CI 2025-03-04 16:29:50 +01:00
b467fe1347 Update translations (#31617) 2025-03-04 16:12:11 +01:00
9f51f64803 FEATURE: add table rich editor extension (#31153)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `table` node and its descendants – `table_head`, `table_body`,
`table_row`, `table_header_cell`, `table_cell` –, its Markdown
serializing/parsing logic, and a plugin to use the first body **row** of
a head-less table as the **header** when pasting `text/html`.
2025-03-04 11:45:19 -03:00
225f90b1c9 FEATURE: add strikethrough rich editor extension (#31152)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `strikethrough` mark, its Markdown serializing/parsing logic, and
a `~~text~~` input rule.
2025-03-04 11:42:42 -03:00
ddcbffc8c6 FEATURE: add quote rich editor extension (#31151)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `quote` node, its Markdown serializing/parsing logic, and a
plugin to select the node when the quote header is clicked.
2025-03-04 11:39:54 -03:00
7210d29c18 FEATURE: add link rich editor extension (#31150)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Replaces the ProseMirror's default `link` mark to support
Discourse-specific features, its Markdown serializing/parsing logic, a
`[caption](link)` input rule, and a plugin to auto-linkify URLs when
they're pasted as `text/plain` or `text/html`.
2025-03-04 11:37:09 -03:00
18a639916b FEATURE: add image rich editor extension (#31146)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds an `image` node, its Markdown serializing/parsing logic, and a
plugin to auto-resolve `upload://hash` short urls.
2025-03-04 11:34:19 -03:00
6168636de8 FEATURE: add emoji rich editor extension (#31144)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds an `emoji` node, its Markdown serializing/parsing logic, and input
rules for `:emoji:`s and `:-)` emoticon replacements.

[prosemirror-markdown's
heading](99b6f0a6c3/src/schema.ts (L30))
only allows `(text | image)*` content, we override it to allow `inline*`
to be compatible with all our inline (including emoji) nodes.
2025-03-04 11:31:47 -03:00
5a21f74716 FEATURE: add mention rich editor extension (#31142)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `mention` node, its Markdown serializing/parsing logic, and a
`@mention` input rule.
2025-03-04 11:20:44 -03:00
b43e465669 FEATURE: add hashtag rich editor extension (#31141)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `hashtag` node, its Markdown serializing/parsing logic, and a
`#hashtag` input rule.
2025-03-04 10:56:25 -03:00
02e471cc2a DEV: bump discourse-emojis 1.0.30 (#31609)
This update bring a few renames to avoid long names.
2025-03-04 14:53:47 +01:00
519be0f0b8 FEATURE: add underline rich editor extension (#31139)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds an `underline` mark, its Markdown serializing/parsing logic, an
`[u]` input rule, and a (Ctrl/Cmd)-U keymap.
2025-03-04 10:37:36 -03:00
0c818fea50 DEV: Relax Ruby version constraint to ~> 3.3 (#31610)
This change allows updates to any 3.x version, while still restricting
major updates to 4.x.
2025-03-04 14:23:49 +01:00
7d4e4e9422 Revert "DEV: Add rake task to bulk delete posts" (#31607)
Breaks the build. Need to update the spec.
2025-03-04 20:54:03 +08:00
1c4d2db0ea DEV: Remove password validation mixin (#31579)
This removes the PasswordValidation mixin that is no longer used
anywhere else.
2025-03-04 18:44:37 +08:00
42c4427cb1 DEV: Add rake task to bulk delete posts (#31576)
This PR adds a destroy:posts rake task that can be used to hard-delete a list of posts. Useful for dealing with large amounts of spam that has been soft deleted and needs to go.

Notes:

Works on both non-deleted and soft-deleted posts. (We might want to change this to work on only soft-deleted posts?)
Works exclusively on post IDs. We can't mix topic and post IDs as they might clash, and we have no way of resolving that ambiguity.
Accepts either a rake-style array of IDs or, more conveniently, you can pipe the argument in through STDIN.
Added a confirmation step since it's a fairly destructive operation.
2025-03-04 17:29:38 +08:00