Commit Graph

58565 Commits

Author SHA1 Message Date
f2255a4e5a Build(deps-dev): Bump lint-to-the-future from 2.6.2 to 2.6.3 (#31704)
Bumps
[lint-to-the-future](https://github.com/mansona/lint-to-the-future) from
2.6.2 to 2.6.3.
- [Release
notes](https://github.com/mansona/lint-to-the-future/releases)
-
[Changelog](https://github.com/mansona/lint-to-the-future/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mansona/lint-to-the-future/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 17:10:42 +01:00
98b010b1e0 Build(deps-dev): Bump lefthook from 1.11.2 to 1.11.3 (#31703)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.11.2
to 1.11.3.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
-
[Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/evilmartians/lefthook/compare/v1.11.2...v1.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 17:10:34 +01:00
6c595c3264 DEV: Relax node requirement to v20 (#31701)
Dependabot doesn't support 22 yet 😢
2025-03-07 14:02:40 +00:00
55a3a4e69e FEATURE: customizable tag separator with value transformer in proper HTML (#31674)
We were using CSS to add commas between tags like this: 


![image](https://github.com/user-attachments/assets/9de36cd1-35c5-4778-acb6-a39fb0dfaf48)


but this is kind of a hacky way to add content and we've also ended up
with a separate encoding issue side-effect


<img width="400"
src="https://github.com/user-attachments/assets/dc155c69-1a3c-4f88-952c-fe1756e4cffe"
/>


So this avoids that whole thing by adding the commas in the HTML
properly — this also unlocks a bonus feature of using our value
transformer system so it's easy to change the separator like this:

```js
import { apiInitializer } from "discourse/lib/api";

export default apiInitializer((api) => {
  api.registerValueTransformer("tag-separator", ({ value, context }) => {
    return "|"
  });
});
```

to get: 


![image](https://github.com/user-attachments/assets/289bcbe1-f93d-4bb3-856d-8a16a471b3b7)
2025-03-07 08:59:06 -05:00
908cd542c9 UX: adjust progress bar position when composer preview is hidden (#31679)
this adjusts the topic progress bar when the composer is open and the
preview is hidden, so it properly aligns:

Before:

![image](https://github.com/user-attachments/assets/7cb1868b-c608-4e02-820b-5120cc55090f)


After:

![image](https://github.com/user-attachments/assets/4f791f17-b309-4047-9085-2c3f0e34ad99)
2025-03-07 08:52:24 -05:00
9903837280 Build(deps-dev): Bump puppeteer-core from 24.3.1 to 24.4.0 (#31681)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.3.1 to 24.4.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.3.1...puppeteer-core-v24.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 14:33:14 +01:00
340441e17e DEV: discourse-emojis 1.0.37 (#31698)
Changes:

- symlinks aliases instead of copies
- symlinks fallbacks instead of copies
- tada is main emoji instead of party_popper
- removed emoji with accents and just use the non accent version
- smiley is main emoji instead of grinning_face_with_big_eyes
2025-03-07 13:13:22 +01:00
914543dbb9 FIX: dont allow channel non-members to write messages in threads (#31697)
Prevents channel non-members from seeing the composer in threads. Since
they do not have the correct permissions to post within the channel, we
should show the join channel CTA in place of the chat composer.
2025-03-07 15:50:30 +04:00
5bab18e3ea DEV: Reapply refactor of Nginx config file (#30385)
This commit reverts commit b600288 "FIX: Simplify nginx config change
(#30383)" and fixes it by repeating the `proxy_set_header` lines in the
`@discourse` block.

Our previous understanding of this was incomplete: `proxy_set_header`
only has an effect when `proxy_pass` is *directly* used.

In our Nginx configuration file, we have two paths to get from the
`location /` main block to the upstream:

1: `location /` → `proxy_pass http://discourse` → `upstream discourse`
2: `location /` → `try_files @discourse` → `proxy_pass http://discourse`
→ `upstream discourse`

In the first case, the `proxy_set_header` directives from the `location
/` block (or one of its sub-blocks) takes effect and the headers are set
as expected.

In the second case, the `proxy_set_header` directives from the `location
/` block are *not used* since `proxy_pass` was not used from that
location.

Only the `proxy_set_header` directives from the `location @discourse`
block are considered since that is the configuration block that calls
`proxy_pass`
2025-03-07 13:05:17 +02:00
594afdf6aa DEV: Bump minimum node version to 22 (#31696)
Node 18 will soon be out of its support period, and many of our
dependencies are now requiring node 22
2025-03-07 09:52:37 +00:00
a9904de2b1 DEV: Bump devcontainer image (#31695)
Includes a node upgrade, which is required for latest prettier
2025-03-07 09:51:50 +00:00
1404a169ca FIX: Zlib may raise BufError during asset:precompile (#31398)
According to Zlib documentation, this is not a fatal error. In this case
we attempt to deflate the asset three times before giving up.

Sprockets will be replaced in the long term and this is an acceptable fix.
2025-03-07 09:08:06 +02:00
4bb1e0d113 FIX: loop detection works as expected and does not need logging (#31686)
Logging creates impression that something is not working while
everything is working as expected.
2025-03-07 16:41:29 +11:00
e87bfad23b Revert "DEV: Replace Rinku native gem with PrettyText" (#31692)
Reverts discourse/discourse#31557

This is causing excessive spacing due to the addition of empty `<p>`
tags. Revert first while we fix that.
2025-03-07 12:01:22 +10:00
e77e5bd3cc FIX: If a tag has a description, use it for the meta description. (#31689)
When a tag has a description defined, we should use that in the `<meta
name="description"...` tag on the tagged topic list page. This matches
the behaviour on the equivalent category pages.
2025-03-07 12:53:54 +11:00
245fc89dc0 FIX: Authenticated x.com oneboxes failing (#31690)
Fixes the same issue that
e9387e238c
did for twitter.com, but for x.com. Since they redirect
on our first FinalDestination call with onebox, the request
fails even with `twitter_consumer_secret` and `twitter_consumer_key`
settings set.
2025-03-07 11:18:02 +10:00
b9e037471e FEATURE: add typographer-replacements rich editor extension (#31182)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds input rules to support the same [custom typographer
replacements](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse-markdown-it/src/features/custom-typographer-replacements.js)
we support when cooking.
2025-03-06 20:56:55 -03:00
71303a509f FEATURE: add html-block rich editor extension (#31181)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds an `html_block` node and its parsing/serialization logic.

It's rendered as a code block with HTML syntax highlighting, and
serialized as-is to the Markdown output.
2025-03-06 20:52:18 -03:00
03429b0f8f FEATURE: add html-inline rich editor extension (#31180)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds an `html_inline` node for a subset for allowed HTML, its
parsing/serializing logic, and an input rule to auto-trigger the node
creation when a `<allowedtag>` is typed.

Not related to the above, but I also renamed the tests that don't define
a template from `gjs` to `js`.
2025-03-06 20:47:46 -03:00
a5cacde681 FEATURE: add code-block rich editor extension (#31179)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Extends the ProseMirror-markdown `code-block` node by integrating our
existing HighlightJS pipeline for code highlighting and adding a node
view with a `<select>` to change the language of the block.

We're also adding the markdown paste extension, which handles converting
pasted text/plain to rich content if it contains Markdown.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-03-06 20:43:33 -03:00
991379b9a4 Build(deps-dev): Bump redcarpet from 3.6.0 to 3.6.1 (#31509)
Bumps [redcarpet](https://github.com/vmg/redcarpet) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/vmg/redcarpet/releases)
- [Changelog](https://github.com/vmg/redcarpet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vmg/redcarpet/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 00:20:54 +01:00
915e72033d DEV: Move bulk-select-enabled from body to topic-list element (#31687)
Followup to 41eb83a40185e43feb964288a5ebc5a903f05e13
2025-03-06 23:12:10 +00:00
dd87d23876 Build(deps-dev): Bump rubocop-factory_bot from 2.26.1 to 2.27.0 (#31683)
Bumps
[rubocop-factory_bot](https://github.com/rubocop/rubocop-factory_bot)
from 2.26.1 to 2.27.0.
- [Release
notes](https://github.com/rubocop/rubocop-factory_bot/releases)
-
[Changelog](https://github.com/rubocop/rubocop-factory_bot/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop-factory_bot/compare/v2.26.1...v2.27.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 00:07:37 +01:00
23dd5c20d3 Build(deps-dev): Bump ember-cli-deprecation-workflow from 3.1.0 to 3.2.0 (#31682)
Bumps
[ember-cli-deprecation-workflow](https://github.com/ember-cli/ember-cli-deprecation-workflow)
from 3.1.0 to 3.2.0.
- [Release
notes](https://github.com/ember-cli/ember-cli-deprecation-workflow/releases)
-
[Changelog](https://github.com/ember-cli/ember-cli-deprecation-workflow/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/ember-cli/ember-cli-deprecation-workflow/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 23:56:17 +01:00
0976e4ad18 Build(deps-dev): Bump ember-cli from 6.2.2 to 6.2.3 (#31680)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 6.2.2 to
6.2.3.
- [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.2...v6.2.3)

---------

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-06 23:55:16 +01:00
1abc5870c3 Build(deps): Bump aws-eventstream from 1.3.1 to 1.3.2 (#31684)
Bumps [aws-eventstream](https://github.com/aws/aws-sdk-ruby) from 1.3.1
to 1.3.2.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
-
[Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-eventstream/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 23:23:36 +01:00
1b95a8e1e0 DEV: replace zero width space character in chat typing indicator (#31675)
We were using a zero width space added by CSS here, but have run into
occasional encoding issues for some reason? a couple people have
reported getting this instead of an empty space:


![image](https://github.com/user-attachments/assets/da39b5f5-61b0-423c-ae3e-18169e4f2f71)

I can't repro the issue, but we can avoid it by removing this space in
CSS — setting the container height to `1em` along with `line-height:
normal` should make it consistent with the height of the text within.

In the blame it seems this static height on the container was added
after the pseudo hack, and achieves the same goal when I test it across
a Firefox/Chrome/Safari
2025-03-06 15:53:50 -05:00
41eb83a401 DEV: Add body class when bulk select is enabled (#31677) 2025-03-06 14:53:32 -06:00
5b092d4466 FIX: ensures emoji picker loader is centered (#31676)
before:
![Screenshot 2025-03-06 at 21 04
32](https://github.com/user-attachments/assets/080d188b-f3ad-48a6-aee7-e8d4be36d407)

after:
![Screenshot 2025-03-06 at 21 04
28](https://github.com/user-attachments/assets/6e131e66-7cc4-45e3-a783-d2774dbf92b4)
2025-03-06 21:19:01 +01:00
dc9269eee5 FEATURE: Handle youtube live url format (#31673)
Meta:
https://meta.discourse.org/t/youtube-autoembeds-for-live-streams/350920

This PR supports YouTube live URLs, such as:
`https://www.youtube.com/live/eJemwqO0SDw`.


![image](https://github.com/user-attachments/assets/b7e57857-5676-4dcf-862e-1e4b4e594009)

![image](https://github.com/user-attachments/assets/f5e6f2d0-a158-41c6-bc20-0642868dbef8)
2025-03-06 15:43:38 -03:00
0e8d36d080 DEV: Fixup theme detection for template-override deprecation (#31672) 2025-03-06 16:46:06 +00:00
fb76696f45 UX: removes per channel context of favorites emojis (#31671)
This was confusing users.
2025-03-06 16:07:58 +01:00
ac736ec0ca DEV: merge mobile stylesheets into common with breakpoints (#31656)
This is the beginning of a longer process to merge our stylesheets under
the common directory.

I also converted a SCSS variable to a CSS custom property along the way.

In the case of the lightbox styles, this seemed more appropriate to
distinguish by primary input type (touch vs mouse) rather than
breakpoint sizes.
2025-03-06 08:44:54 -05:00
9dd26a3954 DEV: discourse-emojis 1.0.32 (#31669)
This gems bring a whole improved fluentui emoji set. Each image has been
recomputed to optimise the size of the emoji and remove useless margins.

For this reason the version has been bumped.

Other changes:
- not loading rake task dependencies in production
- renamed yo_yo/yo-yo to yoyo
2025-03-06 10:35:04 +01:00
3b8b21631b UX: Remove fa- prefix in svg_icon_subset setting description (#31581)
Based on the discussion in
https://github.com/discourse/discourse-social-share/pull/24#discussion_r1975633090
I think "fa-" is no longer needed in core either.
2025-03-06 17:27:48 +11:00
c6b4a09ad9 UX: remove padding in admin card section (#31666)
Before
<img width="1064" alt="Screenshot 2025-03-06 at 3 05 55 pm"
src="https://github.com/user-attachments/assets/38acc2cd-1204-42ec-aac7-18dfee32e8bc"
/>


After
<img width="949" alt="Screenshot 2025-03-06 at 3 06 44 pm"
src="https://github.com/user-attachments/assets/ded3c81f-8057-483d-b997-d1983ccf1318"
/>
2025-03-06 16:35:25 +11:00
ba19430286 DEV: Add a PluginOutlet for mobile-view topic activity number (#31567)
This commit adds a PluginOutlet for activity number in mobile view, so I
can override it with my theme component.

Why?
======

In this theme component
https://meta.discourse.org/t/show-both-op-and-last-reply-on-mobile/267944,
I need to add an avatar to the post time to indicate the last poster.


![image](https://github.com/user-attachments/assets/a33ff8ed-50c6-4bc4-a093-115578ad9bad)

Without this outlet, I can't do this, having to rewrite the entire
`item.gjs`, or use some vanilla JavaScript tricks to do it.

---------

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2025-03-06 10:50:43 +08:00
f024bc4c6f FIX: Ensure the reviewable.type_source migration is run post-deploy. (#31663)
When the upgrade process from 29a8c6ee498999f114f933d2de2b46989a407660 is run, there's a deployment race condition where old code can write a Reviewable to the database without a `type_source` (incorrectly defaulting it to "unknown").

This change adds a post-deploy migration script that populates any such Reviewables with the correct `type_source` value.
2025-03-06 12:12:46 +11:00
bbc1c2726c Revert "DEV: discourse-emojis 1.0.31 (#31655)" (#31662)
This reverts commit 7e65cdbc9aa86677a2f6f7a8d4f1b8e87da07ff1.

It broke the production build, as it's trying to load
`selenium-webdriver` (a dev dep) in the production env.
2025-03-06 00:40:01 +01:00
6882453ab7 UX: card section toggle (#31644)
Demo

https://github.com/user-attachments/assets/17e2b6d9-ba49-4312-85d9-6ff2ccad2290
2025-03-06 10:31:29 +11:00
f6860dcb92 DEV: Remove installing minio binaries in tests workflow (#31652)
In the `discourse/discourse_test:release` base image, the minio binaries
are already being installed and updated on a daily basis. There is also
no
real need for us to have to run the latest minio binaries once it is
released. As such, we can drop the step in the `tests` workflow.
2025-03-06 10:04:07 +11:00
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