Commit Graph

58346 Commits

Author SHA1 Message Date
18c46ab0e8 DEV: Fix flaky signup spec (#31743)
- Remove `wait: 0` and base flow on site setting instead
- Ensure full-page-login has actually opened before running `go_back` -
otherwise we'll end up going back to `about:blank`
2025-03-11 10:56:59 +00:00
275da81f98 DEV: Symlinking fonts is not an error, output to stdout (#31741) 2025-03-11 11:44:22 +01:00
95922fe96b UX: scope btn states to touch devices (#31731)
Buttons used in the dMenu mobile (touch device) variant should not:
* show states like hover, or focus
* should never have round borders because the component is full-width
2025-03-11 11:14:57 +01:00
7ad42e0488 FIX: Show total members count when deleting a group (#31699)
When deleting a group, we show a confirmation dialog that includes the
group members count that will lose access to the group alongside other
information. However, there's currently an issue where the members count
shown in the dialog is the count of members that have been loaded in the
Members tab of the group. If you filter the members list and then click
delete, the count you currently see is the number of members that match
the filter, not the total members count.

This happens because the dialog uses the length of the members list
(`members.length`) instead of the `user_count` attribute of the group.

Internal topic: t/148832.
2025-03-11 12:46:32 +03:00
6d92165ae7 UX: Improve image upload component (#31668)
### Before
<img width="785" alt="image"
src="https://github.com/user-attachments/assets/0e9c7f5d-a53d-4768-b53e-2c2957a54625"
/>

### After
<img width="736" alt="image"
src="https://github.com/user-attachments/assets/bc3e41aa-60d0-4659-a3c3-74783402641a"
/>
2025-03-10 23:03:39 -06:00
38920724a0 DEV: Refactor reports index into service (#31667)
This list of all reports is needed in the admin search
controller as well, so this commit refactors it into
a service, adds specs, and also updates the admin
search code to use this new service & avoid a second
AJAX call to the server.
2025-03-11 14:36:06 +10:00
89a297fde3 FIX: Use filename as alt for hotlinked image uploads (#31651)
Currently, when converting raw hotlinked image urls to image upload
markdown, the `alt` attribute is left blank.
This change sets the `alt` to the original filename (which means it will
also appear in the lightbox).
This adds more context and accessibility to the image and is consistent
with how regular uploaded images default to use the filename.

For example:
`http://foo.bar/screenshot.jpg` becomes
`![screenshot](upload://bEs9WFJErcB8y7m1Ye5JopTWeX3.jpeg)`
2025-03-11 14:45:06 +11:00
0dc39fd560 UX: Show scope mode in API key list (#31605)
**Note:** Do not merge before the backfill (#31606) is merged.

### What is this change?

We're now storing the selected API key scope mode in the back-end, and
can display it in the API key list.

**Screenshot:**

<img width="551" alt="Screenshot 2025-03-04 at 7 27 42 PM"
src="https://github.com/user-attachments/assets/9f234242-cfaa-4a2c-93e9-740770bd9944"
/>
2025-03-11 10:00:42 +08:00
f2365fd98b DEV: Backfill API key scope modes (#31606)
### What is this change?

Follow-up to #31601. This will be used for display in the admin API keys
UI.
2025-03-11 10:00:27 +08:00
54771b5949 FIX: remove admin_sidebar_enabled_groups setting (#31693)
Old no sidebar admin panel is deprecated and admin sidebar is not
experimental anymore. Therefore, old setting should be deleted.
2025-03-11 11:41:38 +11:00
a5b2db4cd8 Build(deps): Bump rack from 2.2.12 to 2.2.13 (#31738)
Bumps [rack](https://github.com/rack/rack) from 2.2.12 to 2.2.13.
- [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.12...v2.2.13)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 23:36:43 +01:00
de9ee0f1a5 Build(deps-dev): Bump esbuild from 0.25.0 to 0.25.1 (#31736)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.0 to 0.25.1.
- [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.0...v0.25.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 23:36:22 +01:00
ecebe22864 Build(deps): Bump redis-client from 0.23.2 to 0.24.0 (#31737)
Bumps [redis-client](https://github.com/redis-rb/redis-client) from
0.23.2 to 0.24.0.
-
[Changelog](https://github.com/redis-rb/redis-client/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/redis-rb/redis-client/compare/v0.23.2...v0.24.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 23:36:14 +01:00
083d2eb35b UX: show timeline when composer preview is hidden (#31708)
This updates the timeline behavior so that when the composer preview is
closed, the full timeline is rendered.

Before: 


![image](https://github.com/user-attachments/assets/3eee00d6-3e8d-4db7-a3df-47efa791b95a)


After: 


![image](https://github.com/user-attachments/assets/399e3c7a-4723-4cdf-96b6-0acc734c3977)

When the preview is shown again, we recalculate and switch back to the
timeline if needed


![image](https://github.com/user-attachments/assets/ca4557de-7311-4903-8900-4c2598d0b58f)
2025-03-10 16:44:16 -04:00
263b6a65c2 Add plugin outlet for google-search (#31733)
Used by https://github.com/notriddle/discourse-duckduckgo-search
2025-03-10 20:36:06 +00:00
137e8a0fa0 DEV: ensures PostTextSelection is destroyed (#31730)
Due to an ember optimisation navigating from one topic to another was
not correctly playing the lifecycle of `PostTextSelection` which is
relying on the `willDestroy` event to occur.

This fix will avoid the following bug:
- select some text in a post
- click on a suggested topic at the bottom of the topic
- the post toolbar is still visible
2025-03-10 20:57:54 +01:00
cf3dde8c62 DEV: Fix smoke test when full_page_login is enabled (#31732)
Smoke test worked only when `full_page_login` site setting was disabled
as it expected specific elements from the login modal to exist. This
commit replaces those selectors with more specific ones (prefer IDs over
classes), but which are present in both the modal or the full page.
2025-03-10 21:09:04 +02:00
25048b5a8d DEV: Update lint-configs and rubocop-discourse (#31728)
…and autofix issues

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-03-10 19:52:19 +01:00
329e1055cf DEV: merge mobile topic.scss styles into common directory (#31712)
This eliminates the mobile topic.scss file by moving its styles into the
relevant common files with breakpoints, and also removes some unused
legacy styles. There should be no major visual changes as a result.
2025-03-10 11:31:15 -04:00
3dbbb940de DEV: Upgrade Sidekiq to v7.3.9 2025-03-10 15:02:48 +01:00
19acb61834 DEV: Remove unnecessary require (#31727)
`DistributedMutex` is eager loaded in production/test and autoloaded in
development.
2025-03-10 16:56:56 +08:00
85e525a8d7 DEV: Try to deflake homepage specs (#31725) 2025-03-10 09:15:14 +08:00
7da4fe82b6 FIX: redirect to parent tag when synonym page visited (#31688)
When a synonym page is visited, the user should be redirected to the
parent tag.
2025-03-10 09:45:38 +11:00
2237a0b0d5 Build(deps): Bump css_parser from 1.21.0 to 1.21.1 (#31721)
Bumps [css_parser](https://github.com/premailer/css_parser) from 1.21.0
to 1.21.1.
-
[Changelog](https://github.com/premailer/css_parser/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/premailer/css_parser/compare/v1.21.0...v1.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 23:23:49 +01:00
9bc844112d Build(deps-dev): Bump parallel_tests from 5.0.1 to 5.1.0 (#31720)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from
5.0.1 to 5.1.0.
-
[Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/grosser/parallel_tests/compare/v5.0.1...v5.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 23:23:32 +01:00
bf9c22c8e3 Build(deps-dev): Bump webmock from 3.25.0 to 3.25.1 (#31722)
Bumps [webmock](https://github.com/bblimke/webmock) from 3.25.0 to
3.25.1.
-
[Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/bblimke/webmock/compare/v3.25.0...v3.25.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 23:22:56 +01:00
3cab4afd28 Build(deps-dev): Bump @swc/core from 1.11.7 to 1.11.8 (#31723)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.11.7 to
1.11.8.
- [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.7...v1.11.8)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 23:22:33 +01:00
1d1db19775 Build(deps): Bump autoprefixer from 10.4.20 to 10.4.21 (#31724)
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from
10.4.20 to 10.4.21.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
-
[Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/postcss/autoprefixer/compare/10.4.20...10.4.21)

---------

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-09 23:22:23 +01:00
Sam
50310ea96d FEATURE: improve post_created_edited automation triggers (#31694)
- Allow deciding if we include or exclude sub categories
- Allow filtering to only look at PMs or Topics
- Allow selection of multiple categories
- Migrations to carry all data into new structure

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-03-08 08:18:30 +11:00
c6a3e40d1f UX: hide tag separator for box/bullet styles (#31709)
This is a follow-up to
55a3a4e69e,
the tag separator should be hidden for box/bullet tag styles
2025-03-07 13:09:03 -05:00
e124b54c84 Build(deps): Bump @faker-js/faker from 9.5.1 to 9.6.0 (#31705)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.5.1 to
9.6.0.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](https://github.com/faker-js/faker/compare/v9.5.1...v9.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 17:28:33 +01:00
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