Commit Graph

59559 Commits

Author SHA1 Message Date
25e80511f7 UX: rich editor [details] caret hover and padding (#33057)
Improves the styles for the [details] caret pseudo-element on the rich
editor.

Additionally, having `summary` have no `pointer-events` is important so
Firefox doesn't mess with our caret positioning when clicking it.
2025-06-03 15:23:21 -03:00
8873a33b7a FIX: uses text selection when using hide details (#33049)
When hiding details if the user has currently a text selection we want
to use it as the content of the details element.

/t/-/154716/30
2025-06-03 19:53:45 +02:00
10a484fa4e UX: Update theme cards min width (#33045)
This PR allows for three cards per row at medium screen sizes and
placeholder images go all the way to the edges.

### Before
<img
src="https://github.com/user-attachments/assets/4526b39a-dcf8-4d38-ac6f-2179ef920144"
width="400"/>

### After
<img
src="https://github.com/user-attachments/assets/cc81853b-b99e-488b-9244-efc1cb803211"
width="400"/>
2025-06-03 11:31:29 -06:00
221380ac80 UX: Margin top to first onebox in topic (#33054) 2025-06-03 10:49:35 -05:00
b08d5ad7b7 Update translations (#33052) 2025-06-03 17:37:13 +02:00
6e00357ea6 UX: fast topic edit (#32941)
Changes of this commit:
- edit pencil will only show on hover on desktop
- clicking the topic title will display the topic edit UI

https://github.com/user-attachments/assets/58c55351-96ed-4f2d-8bd6-569310901cf0

/t/-/154792
2025-06-03 16:30:30 +02:00
ef9f5ccee1 Build(deps): Bump prosemirror-view from 1.39.3 to 1.40.0 in the prosemirror group (#33040)
Bumps the prosemirror group with 1 update:
[prosemirror-view](https://github.com/prosemirror/prosemirror-view).


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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 16:01:18 +02:00
df1bede9f7 FIX: when new new is enabled, filter dismiss modal to correct type (#33037)
Currently both boxes are always checked, even if you're filtered to new
topics or new posts.

You must have the site setting `Experimental new new view groups` set to
your user's group to see this mode.



![image](https://github.com/user-attachments/assets/f485ad66-7491-4f52-a812-4b5f9dba6d63)

This allows both options to appear, but only selects the current filter:


![image](https://github.com/user-attachments/assets/6a3c1a91-1638-440f-80e3-4d74711d8064)

Turns out this was already implemented, but `subset` was always
undefined. This fixes the arg and adds a couple new specs to cover it.

see /t/155039 for reference
2025-06-03 09:47:06 -04:00
8ac9c6b13c Build(deps): Bump @floating-ui/dom from 1.7.0 to 1.7.1 (#33041)
Bumps
[@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom)
from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
-
[Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
-
[Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.7.1/packages/dom)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 15:30:57 +02:00
f0e72f6206 FIX: handle redirect issue with categoryId rewriting page number (#33009)
### Description
When accessing a category via
`<baseUrl>/c/<categoryId>.json?page={pageNumber}`, it issues a redirect
to `<baseUrl>/c/<categorySlug>/<categoryId>.json?.....`. During this
redirect, any numeric occurrence matching the categoryId in the query
string is also rewritten - including the page parameter - causing
incorrect behavior (e.g., `page=5` becoming `page=community/5`).

This PR fixes the logic ensuring that the query parameters remain
intact.

### How to reproduce?
Try opening this link https://meta.discourse.org/c/10.json?page=10 in
the browser. It will throw a 400 Bad Request error. When we inspect the
url, we will notice the page number has been replaced by the
`slug/categoryId`
2025-06-03 15:45:21 +08:00
9613f657d0 DEV: remove educational tips and associated site settings (#33012)
Removes the composer educational tips for:

- upload avatar
- sequential replies 
- reviving old topic

We are also removing the associated site settings that are now
redundant:

- Disable avatar education message
- Sequential replies threshold
- Warn reviving old topic age
2025-06-03 09:44:35 +04:00
d24b79a004 UX: more consistent search menu spacing (#33036)
This gives the search input in the header dropdown consistent spacing by
adding top padding to the results wrapper (always present), which avoids
issues like this (too little space below while loading):


![image](https://github.com/user-attachments/assets/2b9c0ff2-b0fe-4334-a69c-d3e47cfd86fc)

Also fixes this slight misalignment (`test in all topics and posts` has
an extra space on the left):


![image](https://github.com/user-attachments/assets/831efebd-6fbc-4274-b6a7-dad4c3aebb34)


![image](https://github.com/user-attachments/assets/740b318c-6098-4b05-aad2-cc4feb35e79b)
2025-06-03 15:31:49 +10:00
f819b1ec4d FEATURE: Add option to make <AceEditor /> resizable (#33044)
This commit adds a `@resizable` argument to `<AceEditor />`
and sets it to true always for the FormKit code control.
This allows the user to vertically resize the editor inside
FormKit forms. Horizontal resizing is not allowed at this
time, it's more unpredictable for layout, and the vertical
resizing is mostly what's needed anyway.

Also changes the FormKit code control to use min-height of
250px so the inline style height takes precedence, before
it was a hardcoded !important height.
2025-06-03 15:22:48 +10:00
bdebaf3b1c DEV: Add enable_welcome_banner setting to Interface section (#33043)
This setting didn't have an area. Putting it in Interface & layout.
2025-06-03 09:53:33 +08:00
9a5aa2d8f1 Build(deps): Bump aws-eventstream from 1.3.2 to 1.4.0 (#33039)
Bumps [aws-eventstream](https://github.com/aws/aws-sdk-ruby) from 1.3.2
to 1.4.0.
- [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.2...1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 09:43:43 +08:00
35101c99f6 Build(deps-dev): Bump puppeteer-core from 24.9.0 to 24.10.0 (#33042)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.9.0 to 24.10.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.9.0...puppeteer-core-v24.10.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-06-03 09:43:35 +08:00
e6cae5d879 UX: Onebox changes (#33038) 2025-06-02 20:29:29 -05:00
a48f33fda0 FIX: Ensure copy_data callbacks run even when all rows are skipped (#33002)
Currently, if a batch "copy" of an import step results in all rows being
skipped, the `after_commit_of_skipped_rows` callback is never triggered.
This happens because the callback is nested inside a block that only
runs when at least one row is inserted.

This change ensures the DB copy operation returns both inserted and
skipped rows, allowing the caller to respond appropriately in either
case.

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-06-02 23:07:28 +02:00
9f1dda2f02 DEV: Require created_at on users (#33033)
Add a table-level override to require `created_at` on `users` table
2025-06-02 14:08:38 +00:00
3a01b69b76 UX: make sure search context is kept when navigating (#33016)
Uses a getter to reactively re-render the search context (eg. "in
messages").

Also fixes an issue where although the in:messages suggestion appeared,
it didn't work to add the PM context.
2025-06-02 11:03:02 -03:00
1ee51f2e3b DEV: extract composer toolbar class for future reuse (#32897)
Starts defining a more generic API, so a different toolbar instance can
be used as a replacement on the main toolbar as well as a foundation for
rendering the same toolbar as a floating element.

This toolbar reuse started here for the link toolbar:
https://github.com/discourse/discourse/pull/32583, then got extracted to
this PR.

---------

Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com>
2025-06-02 11:02:52 -03:00
01a35c4243 Build(deps): Bump the babel group with 2 updates (#33026)
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.27.3 to 7.27.4
- [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.27.4/packages/babel-core)

Updates `@babel/standalone` from 7.27.3 to 7.27.4
- [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.27.4/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-06-02 16:01:06 +02:00
b27de48622 UX: Update some delete confirmation dialogs (#33018) 2025-06-02 09:14:58 -04:00
3ff96d6cfc FIX: correctly unescape title for amazon oneboxes (#33010)
Fixes `&amp;` in onebox title and replaces with `&`.
2025-06-02 17:50:13 +05:30
6912025564 FIX: restore category text color field (#32915)
Restores the category text/foreground color field that was removed in
#32015.

We are also retaining the auto text color selection that was introduced
and applying on background color change rather than when the form is
saved. The text color algorithm has been changed from color brightness
to use color difference instead, which appears to be more reliable.

Algorithm for color difference:
https://www.w3.org/TR/AERT/#color-contrast

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-06-02 12:16:38 +04:00
c049296536 DEV: attempts to have a more resilient fake_scroll_down_long (#33025)
This was sometimes causing flakys and also it's better to not have to
rely on sleep.
2025-06-02 09:42:12 +02:00
cd4b6b8fab DEV: allows chat thread sdk to query more messages (#32914)
The changes are:
- Chat Thread SDK can query up to 500 messages
- If you are above this number, we don't raise an error anymore but we
clamp it to 500
- The controller using this service is forced into the old limit of 50
to avoid abuses
2025-06-02 09:29:24 +02:00
fa18df124e Build(deps): Bump benchmark from 0.4.0 to 0.4.1 (#33030)
Bumps [benchmark](https://github.com/ruby/benchmark) from 0.4.0 to
0.4.1.
- [Release notes](https://github.com/ruby/benchmark/releases)
- [Commits](https://github.com/ruby/benchmark/compare/v0.4.0...v0.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 10:28:52 +08:00
eae34ee323 Build(deps): Bump base64 from 0.2.0 to 0.3.0 (#33031)
Bumps [base64](https://github.com/ruby/base64) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/ruby/base64/releases)
- [Commits](https://github.com/ruby/base64/compare/v0.2.0...v0.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 10:22:54 +08:00
1538e47d22 Build(deps): Bump csv from 3.3.4 to 3.3.5 (#33035)
Bumps [csv](https://github.com/ruby/csv) from 3.3.4 to 3.3.5.
- [Release notes](https://github.com/ruby/csv/releases)
- [Changelog](https://github.com/ruby/csv/blob/main/NEWS.md)
- [Commits](https://github.com/ruby/csv/compare/v3.3.4...v3.3.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 09:37:40 +08:00
7a212998b7 Build(deps-dev): Bump parallel_tests from 5.2.0 to 5.3.0 (#33034)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from
5.2.0 to 5.3.0.
-
[Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/grosser/parallel_tests/compare/v5.2.0...v5.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 09:36:40 +08:00
eda82334ba Build(deps): Bump rake from 13.2.1 to 13.3.0 (#33032)
Bumps [rake](https://github.com/ruby/rake) from 13.2.1 to 13.3.0.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rake/compare/v13.2.1...v13.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 09:36:27 +08:00
0115687c1c Build(deps): Bump oj from 3.16.10 to 3.16.11 (#33028)
Bumps [oj](https://github.com/ohler55/oj) from 3.16.10 to 3.16.11.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.16.10...v3.16.11)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 09:35:50 +08:00
eaab4e638d DEV: Remove application code from old migration (#33007)
Application code should not be used in migrations since we want
migrations to be idempotent. Since these migrations were added 4 years
ago, the application code is safe to be removed.

This will allow me to make changes to the
`FileStore::S3Store#update_upload_ACL` without having to worry about
these migrations.
2025-06-02 09:35:15 +08:00
c31035caf5 DEV: Support nullable column property modification (#32978)
By default, rails makes timestamp columns (`created_at` and
`updated_at`) non-nullable, we also have some required core and plugins
columns we wouldn't necessarily want to enforce in the intermediate DB
schema. It'll be better to set the default values for these during
import instead of enforcing these at the converter level.

This change adds support for globally modifying a column’s `nullable`
state, defaulting all `created_at` columns to be `nullable` while
allowing for table level overrides.

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-06-01 22:39:18 +00:00
fc9946f595 DEV: Add converter & importer for permalink_normalizations 2025-05-31 22:17:44 +02:00
8f89e287d3 Revert "UX: Merge onebox experiment into core (#33015)" (#33024)
This reverts commit 1af8ef60ed0f9fe094994f4a503ad6a0e765e638. It caused
multiple oneboxes to lose spacing between them. Reverting while we
investigate.
2025-05-31 09:03:49 +01:00
f82249599a Revert "DEV: Added the ability to use users' names in group mention n… (#33023)
…otifications and mentions shown in emails (#32848)"

This reverts commit e147d2afe6682a85070aecc0775050774f2f81f6. The
original commit has a bug, it replaces multiple usernames mentioned in a
post with the name of the first user in email templates.

Reverting temporarily, will need to re-roll a fix.
2025-05-31 13:58:32 +10:00
a22deb520b DEV: remove setting-component mixin (#33014)
Follow up to https://github.com/discourse/discourse/pull/32958.

This removes the setting-component mixin which has been merged into the
sole parent component still using it.
2025-05-31 06:58:51 +08:00
8660630e01 UX: avoid presence layout shift (#33022)
The space reserved for presence was just slightly too short, which was
causing a layout shift when the indicator appears, this fixes it.


![image](https://github.com/user-attachments/assets/d729c941-09c2-42ec-8e26-11b598697c94)
2025-05-30 17:30:44 -04:00
9ae70ad7cf UX: Scale down the theme title edit size (#33021) 2025-05-30 16:07:01 -05:00
1af8ef60ed UX: Merge onebox experiment into core (#33015) 2025-05-30 16:01:09 -05:00
a55ce02cb9 PERF: Remove <details> polyfill (#33020)
When we first introduced the `discourse-details` plugin, the `<details>`
element was not supported in all browsers, so this `display: none`-based
polyfill had to be used.

Nowadays, there is no need for this. And in fact, the `details[open] >
summary:first-of-type ~ *` selector is showing as our most expensive CSS
selector during repaints.

Removing this `display: none` also means that browser find-in-page will
now be able to correctly find content inside `<details>` in discourse.


![image](https://github.com/user-attachments/assets/e3d943f3-ec63-4c16-9096-44340a4f7df0)
2025-05-30 21:47:09 +01:00
00c4d8b0ba DEV: Make --space-# variables available everywhere (#33017) 2025-05-30 13:25:45 -05:00
6857abc8ba Build(deps-dev): Bump @discourse/lint-configs from 2.20.0 to 2.21.0 (#32983)
Bumps
[@discourse/lint-configs](https://github.com/discourse/lint-configs)
from 2.20.0 to 2.21.0.
- [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: Discourse CI <ci@ci.invalid>
Co-authored-by: David Taylor <david@taylorhq.com>
2025-05-30 19:46:26 +02:00
27c7fcd767 DEV: move setting-component mixin logic into site-setting component (#32958)
This PR moves the SettingComponent logic into SiteSetting component. The
mixin itself will be removed in a separate PR.
2025-05-30 21:43:23 +08:00
38fbb83500 UX: Fix active menu item bottom border (#33013) 2025-05-30 08:39:52 -05:00
b05a079328 UX: Move to regular border radius variable (#33011) 2025-05-30 08:39:27 -05:00
291953c4f0 DEV: Remove unused method (#33008)
Method is not being used anywhere
2025-05-30 15:41:48 +08:00
8eb317b0f9 FIX: improvements for admin search (#33006)
Some adjustments to improve admin search results:
- trim filter phrase and remove multiple spaces
- score for partial label match: "the" should find "Theme and
Components"
- partial keyword score: "custom field" should find "custom fields"
- for keyword and fallback searches, ensure the keyword has at least 3
character to not be flooded by "the", "a", "and" etc.
<img width="728" alt="Screenshot 2025-05-30 at 1 52 38 pm"
src="https://github.com/user-attachments/assets/4d97800d-6ec1-4a54-8ea5-78ceb75b93b8"
/>
<img width="730" alt="Screenshot 2025-05-30 at 1 52 46 pm"
src="https://github.com/user-attachments/assets/ca7baa4e-f19e-4512-ab35-63e594a571cc"
/>
<img width="733" alt="Screenshot 2025-05-30 at 1 52 54 pm"
src="https://github.com/user-attachments/assets/7f5ea85b-11ca-4f59-a564-72364d2a65be"
/>
<img width="721" alt="Screenshot 2025-05-30 at 1 56 18 pm"
src="https://github.com/user-attachments/assets/eb42a293-f14b-4bfa-ad6b-9f63b5fe3303"
/>
2025-05-30 14:52:52 +08:00