Commit Graph

35355 Commits

Author SHA1 Message Date
1ba8c0dcdc FIX: Back to themes page not working when theme has enabled components (#33048) 2025-06-04 08:59:50 +08:00
599404de31 DEV: Add a ReviewableNote model, and tie it into the Reviewable model. (#33047)
As part of the review queue refresh, we'll be adding the ability for moderators to make notes on individual reviewable items. As a first step, this change adds the new model and associated backend code.
2025-06-04 09:33:02 +10:00
d4644733a5 Build(deps): Bump @babel/standalone from 7.27.4 to 7.27.5 in the babel group (#33062)
Bumps the babel group with 1 update:
[@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.27.4 to 7.27.5
- [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.5/packages/babel-standalone)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-04 01:07:57 +02:00
88ce76bd16 DEV: Added the ability to use users' names in group mention notifications and mentions shown in emails (#33055)
**Description**
These changes were introduced in a previous PR but were reverted due to
a bug when several users were mentioned in a response. This PR
reintroduces the changes along with a fix to the issue.

This is part of a series of changes to allow customers to display users'
names instead of the user's username.

When a user belongs to a group that has been mentioned by another user.
It shows the name of the user that mentioned the group.

[Previous
commit](e147d2afe6)

**Before**


![imagen](https://github.com/user-attachments/assets/b62224fb-9b69-4603-be00-e7aa61d9b33c)

**After**


![imagen](https://github.com/user-attachments/assets/8495cb63-6530-4d86-a51c-f0510d48f6c7)

When a email is sent to the user when mentioned in a post 

**Before**



![imagen](https://github.com/user-attachments/assets/94e674da-085a-41cb-8145-ba6fbe3636ce)

**After**


![imagen](https://github.com/user-attachments/assets/490cb365-bf85-4745-93b9-e47048b2f02e)
2025-06-03 15:49:55 -05: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
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
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
e6cae5d879 UX: Onebox changes (#33038) 2025-06-02 20:29:29 -05: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
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
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
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
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
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
ecc64e3925 DEV: Remove UploadFixer and uploads:fix_all_extensions rake task (#33004)
The code being removed here was added 7 years ago and is stale at this
point. We don't even know if it is safe to run since no tests have been
written for it. Therefore, it is safer for us to remove it than to spend
time reviewing it.
2025-05-30 14:11:55 +08:00
da0b303568 Build(deps): Bump postcss from 8.5.3 to 8.5.4 (#32997)
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.3 to 8.5.4.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.3...8.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-30 11:35:59 +08:00
9e4a08d08f UX: Polishing borders, border-radius, input, and spacing (#32995) 2025-05-29 16:43:57 -05:00
22595a8c94 UX: fix mobile positioning for content editable (rich editor) (#32993)
Uses the same hack that the markdown editor (`textarea`) uses to avoid
iOS shifting the mobile composer, when using the rich editor/ a content
editable.
2025-05-29 17:05:16 -03:00
921835dfbe DEV: Exclude synonyms from tag chooser choices in Form Templates and order them alphabetically (#32974) 2025-05-29 10:15:20 -05:00
be3b557882 DEV: Correct typo in script-tag-discourse-plugin deprecation (#32990) 2025-05-29 15:35:55 +01:00
fd2d8d0860 DEV: Warn admins for decorate-plugin-outlet deprecation (#32989) 2025-05-29 14:36:01 +01:00
0142d352a8 UX: Add hover state to theme cards (#32980)
Added a subtle hover border to theme cards for better visual feedback.
Cursor stays default since the card itself isn’t clickable.

### Before
Nada
<img width="591" alt="image"
src="https://github.com/user-attachments/assets/d1df6b46-0557-4dfa-af68-166b2b721595"
/>


### After
Applies `--tertiary-medium` on hover
<img width="585" alt="image"
src="https://github.com/user-attachments/assets/1e08f638-738f-40bc-948e-17912b634c0f"
/>
2025-05-28 21:53:25 -06:00
ce6e8a9809 FEATURE: Show language switcher for anons (#32965)
Related: 
- https://github.com/discourse/discourse-translator/pull/308
- https://github.com/discourse/discourse/pull/32920 (setting introduced)

Moving the switcher to core, as the setting is now in core.
2025-05-29 11:37:20 +08:00
09a457f2ab FIX: Topic timeline in mobile is not usable due to full height (#32986)
Bug introduced in 5cb19734e0
2025-05-29 10:23:51 +08:00
cafea26dc0 UX: add gap to sidebar items (#32981) 2025-05-28 14:52:02 -05:00
67b89fcebd UX: Decrease spacing between content sections in theme-card UI (#32977) 2025-05-28 11:54:12 -05:00
e147d2afe6 DEV: Added the ability to use users' names in group mention notifications and mentions shown in emails (#32848)
**Description**
This is part of a series of changes to allow customers to dsiplay users'
names instead of the users' username.

When a user belongs to a group that has been mentioned by another user.
It shows the name of the user that mentioned the group.

**Before**

![imagen](https://github.com/user-attachments/assets/b62224fb-9b69-4603-be00-e7aa61d9b33c)

**After**

![imagen](https://github.com/user-attachments/assets/8495cb63-6530-4d86-a51c-f0510d48f6c7)

When a email is sent to the user when mentioned in a post 

**Before**


![imagen](https://github.com/user-attachments/assets/94e674da-085a-41cb-8145-ba6fbe3636ce)

**After**

![imagen](https://github.com/user-attachments/assets/490cb365-bf85-4745-93b9-e47048b2f02e)
2025-05-28 10:07:06 -05:00
89d5cca2af UX: fix padding (#32973) 2025-05-28 08:44:36 -05:00
55d59c523a DEV: Make curry-component available for themes/plugins (#32967) 2025-05-28 11:02:10 +01:00
3812db5d23 Build(deps): Bump the babel group with 2 updates (#32947)
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.1 to 7.27.3
- [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.3/packages/babel-core)

Updates `@babel/standalone` from 7.27.2 to 7.27.3
- [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.3/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-05-28 11:57:41 +02:00
ff04406a27 Build(deps): Bump terser from 5.39.2 to 5.40.0 (#32948)
Bumps [terser](https://github.com/terser/terser) from 5.39.2 to 5.40.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.39.2...v5.40.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-28 11:46:07 +02:00
f4d4f371e6 UX: fix border-radius on image upload inputs (#32935)
Noticed problems on themes that use border-radius (like Horizon), where
these get the button radius applied, which is too large since, despite
**functioning** like a button, they are essentially inputs and lean more
toward the input styling. Also removed `btn-default` as this element
couldn't be further from a default button if it tried.

| Before | After |
|--------|--------|
| ![CleanShot 2025-05-27 at 11 43
42@2x](https://github.com/user-attachments/assets/fa0aa793-e812-40ed-b142-f47158e2d01b)
| ![CleanShot 2025-05-27 at 11 42
01@2x](https://github.com/user-attachments/assets/bba289e7-3707-4725-925e-a993fec32da8)
|

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-05-28 08:58:21 +02:00
435088f62c DEV: Add locale column to categories (#32962)
Previously we had omitted determining the locale of categories, as
unlike posts, categories are usually single words and are usually only
translated once.

Since there is no locale, a category called "Staff" would also have an
English translation. With LLMs that perform poorly, we see that
translating "Staff" to English may result in something entirely
different (like "Personnelle" or "Personal").

Thus adding locale support to categories can mitigate this issue due to
the uncertainty.
2025-05-28 13:49:26 +08:00