Commit Graph

59781 Commits

Author SHA1 Message Date
2dcfb49de3 FIX: improves post toolbar behavior (#33342)
This commit is applying different techniques to make selecting text of a
post less error prone:
- ensure we only ever show the toolbar when the common ancestor of a
range is cooked
- ensures the menu is not interfering with text selection

The situation was very bad on android but it should also improve other
devices.

Note that one visual change of this commit is that the fast edit menu is
now a standalone modal.
2025-06-26 10:07:26 +02:00
Sam
e180c62d2e FEATURE: new search order for read topics (#33353)
Introduces order:read and r to search through recently read topics

Also applies to filter route
2025-06-26 17:02:52 +10:00
d92de3e4d0 FIX: Admin search not including plugin pages (#33356)
Followup 4fe85fdb53d32a4ceda2fffcadbf22d2cbf5de7e

It's not ideal, but currently the admin-sidebar modifies ADMIN_NAV_MAP,
and the admin search data source relies on this modification to include
plugin pages in search.

This commit removes the cloneJSON added in the previous one and adds a
test to ensure this doesn't regress.

A followup commit will do some refactoring to stop this behaviour of
modifying the global ADMIN_NAV_MAP.
2025-06-26 13:35:13 +10:00
4fe85fdb53 DEV: Fix flaky AdminSearchDataSource tests (#33346)
and remove unnecessary code
2025-06-26 01:51:29 +02:00
8c5d98bf06 Build(deps-dev): Bump rspec-core from 3.13.4 to 3.13.5 (#33352)
Bumps [rspec-core](https://github.com/rspec/rspec) from 3.13.4 to
3.13.5.
-
[Changelog](https://github.com/rspec/rspec/blob/rspec-core-v3.13.5/rspec-core/Changelog.md)
-
[Commits](https://github.com/rspec/rspec/compare/rspec-core-v3.13.4...rspec-core-v3.13.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-26 00:53:21 +02:00
c79c1d63d0 DEV: Import user avatars from IntermediateDB (#33319)
This also enhances the converter step, which stores the Gravatar if it is
set and used. It also fixes the import of uploads which didn't use the
correct user ID.

---------

Co-authored-by: Selase Krakani <849886+s3lase@users.noreply.github.com>
2025-06-25 23:37:27 +02:00
cf387d320f DEV: remove unused sidebar section-message component (#33351)
Long ago (~2 years), we had a sidebar section with text content. This
contained "about" content for anonymous visitors. We no longer have this
section so this component is completely unused.
2025-06-25 17:14:51 -04:00
00c97178d5 FIX: Don't allow submitting bulk topic actions without a notification… (#33292)
… level

See report https://meta.discourse.org/t/-/371074

---------

Co-authored-by: Blake Erickson <blake@discourse.org>
2025-06-25 14:48:36 -06:00
32aec6fca7 FIX: Chat video thumbnails on iOS (#33349)
Turns out we do need the iOS check, not just the safari check.

Follow up to: #33199
2025-06-25 14:00:28 -06:00
237abe4c96 DEV: Update eye icon behavior for secret site settings (#33345)
Previously it always had a slash through it. Now it has a slash if
clicking it will hide the site setting, and no slash if clicking it will
show the site setting.


![image](https://github.com/user-attachments/assets/28dbed34-7a1a-4932-99c2-58f0f5f215a5)

![image](https://github.com/user-attachments/assets/d55069d6-065e-4522-b615-71a8c69f82bc)
2025-06-25 10:23:22 -05:00
cd0f1afafc Build(deps): Bump mini_racer from 0.18.1 to 0.19.0 (#33334)
Bumps [mini_racer](https://github.com/discourse/mini_racer) from 0.18.1
to 0.19.0.
- [Changelog](https://github.com/rubyjs/mini_racer/blob/main/CHANGELOG)
-
[Commits](https://github.com/discourse/mini_racer/compare/v0.18.1...v0.19.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-25 16:20:50 +02:00
448dc2601b REFACTOR: move mobile/signup-progress-bar CSS into common/signup-progress-bar (#33331)
This concerns these green dots for progress on signup. 
 
Most of the mobile CSS was redundant due to some previous design
changes, so this is largely removing the contents of that file.


Desktop:

![image](https://github.com/user-attachments/assets/0894e0b2-2145-4d13-a85b-b1b7caf64363)

Mobile:

![image](https://github.com/user-attachments/assets/8d2acbfc-6935-4bcd-acef-91a44820ebaa)
2025-06-25 09:33:23 -04:00
398dcaa8af REFACTOR: move mobile/modal-overrides CSS into common/modal-overrides (#33332)
This is largely a 1:1 move with no visual changes, but I noticed an
issue with the mobile change owner modal so I've also added a fix for
that:

Before (dropdown obscured): 

![image](https://github.com/user-attachments/assets/b6654227-291d-4731-9b97-a1bcc3483b84)

After:

![image](https://github.com/user-attachments/assets/1ef55afa-bc8f-4d2a-9a66-03dd1ffc47b9)
2025-06-25 09:33:14 -04:00
85aad95be9 DEV: Display correctly the items in the post action summary (#33330)
- Refactored the `actions-summary` widget and its related test to
directly use a `post` model instance, ensuring more consistent data
handling. Updated relevant rendering and widget registration logic to
align with the changes.
- Fix displaying the user that deleted the post
- Fix the post action text displayed
2025-06-25 09:15:43 -03:00
404dcc7623 DEV: Add badges converter and importer steps (#33019)
This adds converter(just Discourse for now) and importer steps for
`badges`
2025-06-25 13:15:24 +02:00
8ae070c91e Build(deps-dev): Bump mime-types-data from 3.2025.0617 to 3.2025.0624 (#33335)
Bumps [mime-types-data](https://github.com/mime-types/mime-types-data)
from 3.2025.0617 to 3.2025.0624.
-
[Changelog](https://github.com/mime-types/mime-types-data/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/mime-types/mime-types-data/compare/v3.2025.0617...v3.2025.0624)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-25 13:11:05 +02:00
eb804d4f1c Build(deps-dev): Bump @swc/core from 1.12.5 to 1.12.6 (#33333)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.12.5 to
1.12.6.
- [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.12.5...v1.12.6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-25 13:10:41 +02:00
22093826d7 FIX: Make theme relative selectors save (#33344)
The parent component of `ThemeSettingRelativesSelectorComponent`,
`SiteSettingComponent`, has recently been migrated from being a legacy
component to a Glimmer component (in
https://github.com/discourse/discourse/pull/33255), but we missed
updating the child class to use Glimmer's patterns, namely how arguments
are accessed in Glimmer components (`this.args.foo` vs `this.foo`).
2025-06-25 14:06:13 +03:00
5e8b92b789 UX: Updated gear to plus icon in discobot tutorial (#33343)
Discobot advanced tutorial needed the gear icon replaced by the new plus
icon.
Related to #32918
2025-06-25 12:07:23 +02:00
c74366c595 UX: display active state on rich editor toolbar (#33296)
Highlights the active formatting state in the toolbar based on the
current cursor position/selection.


![image](https://github.com/user-attachments/assets/383d71c1-bf42-4353-b16b-bf16ae3b321f)

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2025-06-25 06:50:00 -03:00
99ab4608dc FIX: Ignore recent posts offset in search when before/after filters are used (#33323)
There exists a hidden `search_recent_regular_posts_offset_post_id` site
setting which is used to optimize the searching of recent posts through
the use of a partial index. However, we do not want this optimization to
apply when the `before` and `after` advanced search filters are used
since the partial index only contains the most recent posts 1 million
posts and the `before`/`after` filter may be searching for posts that
falls outside of the
most recent posts range.
2025-06-25 15:23:08 +08:00
684569c30e PERF: Avoid slow preloading in SiteSerializer (#33283)
`SiteSerializer#post_action_types` and `SiteSerializer#topic_flag_types`
both call the `Flag.used_flag_ids` method which executes queries that
becomes very slow on sites with alot of records in either the
`post_actions` or `reviewable_scores` table.

On the `post_actions` table, we execute `SELECT DISTINCT
post_action_type_id FROM post_actions`. On the `reviewable_scores`
table, we execute `SELECT DISTINCT reviewable_scope_type FROM
reviewable_scopes`. The problem with both queries is that it requires
the PG planner to scan through every single row in those tables.

For our use case, all we actually need is to check if a flag is being
referenced by a record in either the `post_actions` or
`reviewable_scores` tables. This commit updates the `Flag.used_flag_ids`
to accept a `flag_ids`
argument and use the argument to check whether the flag ids are
referenced in the `post_action_type_id` or `reviewable_scope_type`
foreign keys.
2025-06-25 15:03:34 +08:00
b9628ad40a DEV: Update uploads:sync_access_control rake task to remove ACLs (#33286)
The `uploads:sync_access_control` rake task should reset the access
control
of all s3 objects linked to an upload record. This means that if the
`s3_use_acls` site setting has been disabled, the rake task should
remove the existing ACL that has been set previously.
2025-06-25 15:03:05 +08:00
3a9d2ac491 DEV: Skip admin search data source label test (#33324)
This is too flaky on CI
2025-06-25 16:53:40 +10:00
1d1743152b FIX: Add humanized setting names for theme setting serializer (#33341)
Followup 5b236ccc0774e3b0f5e0b34c99c1c36d9ea9604e, a change here
made it so the theme setting name was no longer showing on the
UI, this commit fixes the issue by making sure it's sent from
the server in the same way as site setting humanized names.
2025-06-25 16:53:28 +10:00
3eb252c9d1 Bump version to v3.5.0.beta8-dev 2025-06-25 10:52:27 +08:00
fd2f543a08 Bump version to v3.5.0.beta7 v3.5.0.beta7 beta latest-release 2025-06-25 10:52:27 +08:00
0b1dd04550 SECURITY: Don't display user's old whispers if not in allowed group
Before this change, users were able to see their own whispers even if
they are no longer in the groups specified by the `whispers_allowed_groups` site setting.

This commit fixes that by disallowing users to see their own whispers if
they are no longer part of any `whispers_allowed_groups`.
2025-06-25 10:25:44 +08:00
b03d2ae808 FIX: correctly displaying the failure error message
when a provider was submitted as a query param.

Internal ref - t/155006
2025-06-25 10:25:41 +08:00
2fa0dc58d4 DEV: Allow multiple users to have the same email in IntermediateDB (#33318)
The import script will merge the users based on email
2025-06-24 22:59:00 +02:00
b31189e0b4 DEV: Add --reset option to import command (#33317)
It deletes the MappingDB before executing the import. That's useful
during development when you repeat the import multiple times.
2025-06-24 22:58:32 +02:00
61033eed4c FIX: Hide secret admin fields by default (#33255)
Fixed the refs to the `setting` argument and refactored more of the component over to glimmer style, added test against regression
2025-06-24 13:36:59 -05:00
9603cfb781 DEV: Move creation of user archive PM with upload to its own function (#33328)
...so I can override it in a customer plugin.

The goal here is to be able to create the same user data export but
provide the results by uploading to an s3 bucket instead of sending a PM
to the user.
2025-06-24 10:30:36 -05:00
8ac57fc272 FIX: make topic optional in render-tags so reviewables can use discourseTags (#33181)
We lost the comma separator for tags in reviewables after 55a3a4e

This gets it back by using `discourseTags` in `ReviewableTags` — to
support this I made the topic optional in `renderTags` because queued
posts don't pass the full topic


Before:


![image](https://github.com/user-attachments/assets/2302d946-a3d9-46dc-bf26-8a9b9e720980)

After:


![image](https://github.com/user-attachments/assets/49824676-a4a0-41dd-b6ae-e4d7b419070c)


![image](https://github.com/user-attachments/assets/20493467-15a0-4072-a452-fac319ae222e)
2025-06-24 11:23:49 -04:00
5eaa876898 DEV: Add bypass_time_window arg to SendPushNotification job (#33293)
This PR allows `bypass_time_window` to be passed to the
`SendPushNotification` job, to continue sending a PN, even if the user
has been active recently.
2025-06-24 09:43:54 -05:00
541c6cc1d7 Update translations (#33326) 2025-06-24 16:29:13 +02:00
a6d3597758 FIX: Return the post's raw when GET /post (#33325)
Previously, there was no way to edit post localizations, so the
`post.raw` was always returning the localized value. With localization
UI and endpoints now, we want to always return the original raw and the
composer to reflect the original value.

https://github.com/discourse/discourse/pull/33184 will handle the
decision to show the post edit composer or the post localization
composer.
2025-06-24 22:11:02 +08:00
cef46d612f DEV: Add "UI" as a humanizable acronym (#33322)
Site settings with the acronym "ui" in them will now have it formatted as "UI".
2025-06-24 15:42:35 +10:00
113bff5d0d DEV: Make admin search data source tests more reliable (#33321)
Also fix some issues in the source, wasn't returning a promise
with the early return.

Saw this in the CI log failures:

> ℹ️ Hint: when the assertion failed, the Ember runloop was not in a
settled state. Maybe you missed an `await` further up the test? Or maybe
you need to manually add `await settled()` before your assertion?
(hasPendingTimers, hasRunLoop, isRenderPending)
2025-06-24 15:41:57 +10:00
5b236ccc07 DEV: Move site setting name humanization to server side (#33311)
This commit moves the humanization of site setting names from the client
side to the server side, since this is becoming more widely used and
will be useful for specs to be able to access the same humanized name
formatting without duplicating the logic on the server.

There are only a couple of places in the admin UI that we send this
down in the JSON, the `site.sitSettings` object does not include these
humanized names as they are not needed.
2025-06-24 13:20:29 +10:00
f69dbcd2c1 FIX: Make Ctrl+K shortcut work consistently in RTE, and not always show chat channel switcher
Followup fb7fa2902cf685ee9d4002e5448b4817f2dbef98,
prevent opening the chat channel selector with Ctrl/Meta+K
in any inputs except the chat composer, most of the time you
do not want this, but especially in the topic composer.

In that case, you want the link insert modal to open.
2025-06-24 12:20:00 +10:00
475baff2bb FEATURE: Hide topic if OP is hidden (#33201)
Before this change, topics with a hidden OP were still visible, we only
checked if all posts were hidden to change visibility of the topic.

With this change, if the OP is flagged and is hidden the topic will also
be hidden.

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2025-06-24 11:44:38 +10:00
e4eab8cc5f FIX: Correct new_user_posting_on_first_day? logic (#33303)
All the way back in bc52bdfa1280ba08e6fb1931c26e18aa7fee9f7f we changed
the definition of new_user_posting_on_first_day? to return true if the
user was TL0 unconditionally. However this changes the logic of
the method, and essentially makes it "lie". Yes TL0 may be considered
a new user in other places, but in this method specifically we want
to check it's their "first day" of posting, not just that they are TL0.

The intent per these commits:

* 487c20959c874666db726d69c00abe139ba1aeab
* 5aa1272f05fc0de0b08577707d3370d10fafdd51
* 9834d1150300de26ffc35cb6af9a3ac91666e216

Was consider any user < TL2 who hadn't made their first post yet
as a new user posting on their first day. If they had made a post
>= 24 hours ago, they were no longer considered a new user posting
on their first day.

This commit restores that logic and also cleans up the spec and
guardian check to be clearer.
2025-06-24 08:05:51 +10:00
4cf4225f3d DEV: Introduce state handling for post cooked HTML decorators (#33200)
This PR introduces explicit state management for decorators as part of
the quote controls refactor. The legacy quote controls logic has been
migrated to a new Glimmer component, and state handling for decorator
functions associated with post content rendering is now formalized and
standardized.

### Key Points

- **Decorator State Introduction:**  
- Introduces explicit state objects for use within post and cooked-html
decorators, replacing previous ad-hoc or implicit state tracking.
- Uses `TrackedMap` for state management, improving reactivity and
ensuring consistent, predictable updates when decorator state changes.

- **Component Refactor:**  
- The quote controls logic is now fully encapsulated in a Glimmer
component, leveraging the new decorator state handling for cleaner, more
maintainable code.
  - Legacy implementations have been removed to reduce technical debt.

- **Context and Data Handling:**  
- Decorators and components now receive state and context as explicit
parameters, standardizing the interface and improving code readability.
- Direct properties (such as `post`, `highlightTerm`, and
`ignoredUsers`) replace the previous `data` object, simplifying context
management.

- **Other Improvements:**  
  - Enhanced error handling for async content.
- Improved extensibility by supporting custom wrapper elements in quoted
content.
  - Added functionality to highlight original quoted text.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-06-23 18:13:49 -03:00
38cf7cdbea FIX: improvements to keyboard shortcuts from toolbar API (#33290)
## 🔍 Overview

This update fixes a few issues related to keyboard shortcuts from the
toolbar API and the textarea text manipulation:
- it converts the keymap return value from `itsatrap` format to
`ProseMirror` format so that the default is prevented, thus allowing for
custom keyboard shortcuts to work inside the editor without triggering
system defaults.
- pushes a fix where the keyboard shortcut could get triggered even when
the `condition` value returned `false` whenever it had a custom
shortcut.
- fixes an issue in the markdown textarea editor where selecting text
and tabbing works but also focuses the next element
2025-06-23 09:59:20 -07:00
5bca4c30d9 UX: fix tag suggestion alignment (#33315)
Before:

![image](https://github.com/user-attachments/assets/fbadbb06-e267-41bc-9cb5-41c32819f95b)


After: 

![image](https://github.com/user-attachments/assets/fe2bb8fd-bcd4-4bb4-a9fd-6225da99004b)
2025-06-23 11:50:55 -04:00
e241de51cd FIX: correctly follow enable_emoji_shortcuts in chat (#33297)
Prior to this fix, this setting would have no effect in chat.
2025-06-23 17:42:24 +02:00
Sam
f0f75b1a63 DEV: implement missing icons (#33310)
missing icons
2025-06-23 17:42:12 +02:00
43fb58ee08 UX: consistent sizing for configure default nav links (#33314)
Before:

![image](https://github.com/user-attachments/assets/f01356eb-c6ca-4fdd-910e-61cc25eff49c)


After: 

![image](https://github.com/user-attachments/assets/a048f018-e198-43cd-9ce7-8cbf57f4f492)


To match the sizing with tags: 


![image](https://github.com/user-attachments/assets/d6071d33-00d2-4460-9338-6eb3e53dd92f)
2025-06-23 11:24:19 -04:00
d81faa1226 FIX: Do not set locale when replying and also default to none (#33312)
This PR relates to the locale setting in the composer and fixes 2
quirks:
- When replying to a post, the composer sets the locale of the new post
in composer to the locale of the post being replied. This PR defaults
the value to "none"
- When creating a new post, the composer sets the locale to the user's
locale. However we are seeing the behaviour that users do not write in
the locale they set their profile to. This PR defaults the value to
"none"
2025-06-23 21:11:03 +08:00