Commit Graph
60445 Commits
Author SHA1 Message Date
Jordan VidrineandJarek Radosz dbc14ffbf2 DEV: Markup refactor (#34098)
This PR:

- removes DButton from being needed in the filter-tip list
- simplifies some of the CSS as well.
- normalized the font sizes in the tip list

|before|after|
|--|--|
|<img width="1956" height="796" alt="CleanShot 2025-08-05 at 09 17
51@2x"
src="https://github.com/user-attachments/assets/c4fca721-3c23-4535-93e2-9da5cf80b763"
/>|<img width="1976" height="924" alt="CleanShot 2025-08-05 at 09 17
17@2x"
src="https://github.com/user-attachments/assets/03dcf528-bd75-42b4-a651-b5fa122eff43"
/>|

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2025-08-06 08:58:38 +10:00
Sam 949645d190 DEV: attempt to de-flake concurrent spec (#34087)
Note, if this does now work we may have to simply skip in CI

Concurrent tests depend on timing of background threads and if scheduler
is overwhelmed stuff can take inconsistent amounts of time.
2025-08-06 08:57:42 +10:00
Kris 383760759b FEATURE: Add toggle for PM gists to Discourse AI (#34107)
This allows gists to appear in PM inboxes as well, and adds a spec for
gists (didn't have one previously).

The PM and public topic list gist preferences are stored separately, as
there may be cases where you'd want one and not the other.

<img width="2222" height="916" alt="image"
src="https://github.com/user-attachments/assets/f9792e30-ab65-452b-b8e1-7407d9d181e2"
/>
2025-08-05 16:22:54 -04:00
Jordan Vidrine d197e4e824 DEV: Apply styles to all category boxes (#34106) 2025-08-05 15:08:15 -05:00
David Taylor 2cdd4be030 DEV: Resolve d-toast.duration deprecation in bulk-topic-actions (#34104) 2025-08-05 19:47:03 +01:00
Kris f044719517 UX: Horizon theme, fix d-toc class on smaller screens (#34105)
Follow-up to
https://github.com/discourse/discourse/commit/7404e3f526fee93471a39a7f62cbb87bc76214ab,
The new `grid-template-columns: auto 8em;` style is too specific and was
overriding this on mobile, moving the query fixes it

Before: 
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/7ea096f5-d9f7-4cce-b254-54e365060a33"
/>


After: 
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/519e8689-abb3-4fe9-b196-4da85507766b"
/>
2025-08-05 14:30:27 -04:00
Sérgio Saquetim c6782e8434 DEV: Ensure user status tracking in poster-name is updated (#34086)
This commit refactors how user status is tracked in the `poster-name`
component. The previous implementation used lifecycle hooks and a custom
refresh method to start and stop tracking the user's status. The new
approach leverages the `helperFn` pattern to directly manage tracking
based on the component's lifecycle and its user argument. This change
improves reliability and code clarity, ensuring user status is tracked
and cleaned up appropriately without manual refresh logic.
2025-08-05 14:34:51 -03:00
chapoi 19fbb8295d UX: expose shift buttons for lists on touch-devices (#34102)
Meta request.

Makes sense to expose the buttons on touch-devices, otherwise it gets
very tricky to use.

| Before | After |
|--------|--------|
| <img width="1126" height="798" alt="CleanShot 2025-08-05 at 18 56
24@2x"
src="https://github.com/user-attachments/assets/f81f9213-1e5a-4b6e-bb85-0922faa1016f"
/> | <img width="1126" height="798" alt="CleanShot 2025-08-05 at 18 55
55@2x"
src="https://github.com/user-attachments/assets/da167903-dbc6-41ea-8d56-208949d9227c"
/> |
2025-08-05 18:59:05 +02:00
Roman Rizzi 7624d71ec5 FIX: 'custom' prefix was removed. Cleanup llm_report's model field (#34099) 2025-08-05 13:11:40 -03:00
benjandBennett Dungan 72e4e53fda FEATURE: add option to hide IP addresses from moderators (#33682)
# Hide IP Addresses from Moderators When `moderators_view_ips` is
Disabled

## Summary 
Feature Request Link -
https://meta.discourse.org/t/option-to-hide-ip-addresses-from-moderators/207715/51
This PR implements a feature to **hide IP addresses from moderators**
when the `moderators_view_ips` site setting is disabled. Previously,
moderators could view IPs in multiple locations across the admin UI.
This update ensures that IP addresses are visible to moderators when the
setting allows it.

## Changes Implemented  

### Backend Updates
- **Added `moderators_view_ips` site setting** in `site_settings.yml`
- **Updated `CurrentUserSerializer`** to include `can_see_ip` field
based on the user’s role and site setting.
- **Modified `AdminUserSerializer`** to restrict IP address visibility.
- **Updated `UsersController`** to prevent IP addresses from being
included in API responses.
- **Restricted IPs in `ScreenedIpAddressesController`** by throwing
`Discourse::InvalidAccess` if the user lacks permission.

### Frontend Updates
- **Hid "Screened IPs" tab** in `/admin/logs` when `moderators_view_ips`
is disabled.
- **Blocked direct access to `/admin/logs/screened_ip_addresses`** for
unauthorized users.
- **Updated `user-index.hbs` and `logs.hbs`** to conditionally hide IP
fields.

### UI Screenshots

New option for Admins in the Admin Security settings dashboard:
![Screenshot 2025-02-21 at 5 32
00 PM](https://github.com/user-attachments/assets/5b315434-7724-4cb9-a3dc-d88750df00a6)


Moderator's view before:
![Screenshot 2025-02-21 at 5 25
41 PM](https://github.com/user-attachments/assets/0fb269e2-db40-488b-b11d-8bdfbe2a5245)
Moderator's view after:
![Screenshot 2025-02-21 at 5 26
59 PM](https://github.com/user-attachments/assets/efb848b0-1d7f-4ec9-8238-d8ee4eddbbe1)

Moderator's view before:
![Screenshot 2025-02-21 at 5 23
52 PM](https://github.com/user-attachments/assets/226e6d63-df3e-45d0-833f-de52593a086e)
Moderator's view after:
![Screenshot 2025-02-21 at 5 23
15 PM](https://github.com/user-attachments/assets/af313af2-2329-46d1-827d-290243c320e5)

---------

Co-authored-by: Bennett Dungan <bennettdungan@gmail.com>
2025-08-05 10:09:02 -05:00
Rafael dos Santos Silva c2dfc495f6 FEATURE: Make HyDE optional in AI search (#34074) 2025-08-05 11:50:16 -03:00
Kris 37ebaf4c3c DEV: merge post-action-feedback CSS into common file (#34080)
Concerns this button feedback

<img width="190" height="152" alt="image"
src="https://github.com/user-attachments/assets/805a9258-2130-4e2e-99d4-50d9638c825b"
/>



This change is pretty straightforward, the desktop css includes all
styling for the `.post-action-feedback-alert`, so that can be simply
moved to common. The mobile alert was removed by
https://github.com/discourse/discourse/pull/31375 (because we open a
link modal instead)... so the mobile styles aren't actually applied
anywhere (no plugins either).
2025-08-05 10:44:26 -04:00
Jordan Vidrine 9bd4ac4ba8 UX: Sidebar changes & css cleanup (#34097) 2025-08-05 09:38:08 -05:00
Jordan Vidrine c9e3a3122c UX: subcategory image tweaks (#34083) 2025-08-05 08:47:14 -05:00
chapoi 4ffef9cd9f UX: use success colour for solved icon in topic list (#34092)
For increased clarity when scanning the topic list

| Before | After |
|--------|--------|
| <img width="678" height="243" alt="CleanShot 2025-08-05 at 09 57 01"
src="https://github.com/user-attachments/assets/72e25e99-40a2-4b3b-94c8-6cdedb006fef"
/> | <img width="678" height="243" alt="CleanShot 2025-08-05 at 09 56
41"
src="https://github.com/user-attachments/assets/b31c1b87-8620-4db2-9c4e-b1f1be038f73"
/> |
2025-08-05 15:36:16 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> eeecbe4ffd Build(deps-dev): Bump capybara-playwright-driver from 0.5.6 to 0.5.7 (#34096)
Bumps
[capybara-playwright-driver](https://github.com/YusukeIwaki/capybara-playwright-driver)
from 0.5.6 to 0.5.7.
-
[Commits](https://github.com/YusukeIwaki/capybara-playwright-driver/compare/0.5.6...0.5.7)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-05 15:08:50 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 0c3d386b98 Build(deps-dev): Bump annotaterb from 4.17.0 to 4.18.0 (#34095)
Bumps [annotaterb](https://github.com/drwl/annotaterb) from 4.17.0 to
4.18.0.
- [Changelog](https://github.com/drwl/annotaterb/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/drwl/annotaterb/compare/v4.17.0...v4.18.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-05 15:00:15 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 37423e39ee Build(deps-dev): Bump rubocop from 1.79.1 to 1.79.2 (#34094)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.79.1 to
1.79.2.
- [Release notes](https://github.com/rubocop/rubocop/releases)
-
[Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop/compare/v1.79.1...v1.79.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-05 14:59:24 +02:00
chapoi 7404e3f526 UX: Horizon > apply small styling fixes for discotoc plugin (#33826)
Reset the `.container .post` grid to default, so the discotoc area isn't
too cramped. [only applies when the discotoc plugin is active]
Also applies some fixes (mini reposition + removal/reduction of
border-radius) to the timeline toggle button.

<img width="1128" height="780" alt="CleanShot 2025-07-24 at 16 56 38@2x"
src="https://github.com/user-attachments/assets/b3d8d37f-44e0-4ba1-b21a-68788a573d6f"
/>

⬇️ 

<img width="1128" height="780" alt="CleanShot 2025-07-24 at 16 55 15@2x"
src="https://github.com/user-attachments/assets/143aa58d-d578-4d77-a861-de45f3cd5fcc"
/>
2025-08-05 14:10:25 +02:00
Martin Brennan 37d1849de6 UX: Resize dmenu width for filter on window resize (#34091)
Since we don't have native floatkit/dmenu functionality (yet) to
make the menu stick to the width of the element, this is a
stopgap solution to make sure the menu stays the same width
as the filter input whether resizing the window or hiding/showing
the menu.
2025-08-05 17:44:06 +10:00
Natalie Tay c61a6f83e7 FEATURE: Localize topic titles in notifications and bookmarks (#34059)
Localizes topic titles in these areas
- user notification
- bookmarks

This commit also updates the user notification bookmark list to use fancy
title instead of title, similar to the other user notification tabs.
2025-08-05 12:12:22 +08:00
Jordan VidrineandMartin Brennan acf3d73e63 UX: Add category badges to category filter tip results (#34078)
This PR adds category badges to be shown in the filter tips menu.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-08-05 13:46:18 +10:00
Krzysztof Kotlarek 025f5ba1e1 DEV: temporarily disable flaky color palette spec (#34088) 2025-08-05 11:27:55 +08:00
Kelv c648160d3f DEV: use floatkit autocomplete for chat composer (#33980)
This PR ports the floatkit-based autocomplete system to chat composer
under a site setting, providing consistent UX across both regular and
chat composers.

### Key Changes

* Adds floatkit_autocomplete_chat_composer setting (defaults to true)
* Adds `fixedTextareaPosition` option and
`createVirtualElementAtTextarea` to DAutocompleteModifier to allow for
positioning of the autocomplete menu relative to the whole textarea
bounds instead of following the cursor - this is better for chat UI &
aligns with current behaviour
2025-08-05 10:43:58 +08:00
Martin Brennan c3e4dd4db6 DEV: Convert FilterTips to use DMenu and refactor components (#33999)
* Use DMenu for the filter tips UI
* Move the input, filtering, and DMenu into the same
`FilterNavigationMenu` component to avoid input event listener
shenanigans
* General renaming, refactors, adding comments
* Move searching/suggestion logic for specific types of filter out into
`FilterSuggestions` lib to avoid cluttering the component
2025-08-05 12:10:40 +10:00
Gary Pendergast 0802135037 DEV: Monkey patch a from_described_class helper in RSpec::Mocks (#34021)
This change adds a new `from_described_class` helper to `RSpec::Mocks`, allowing stubs to only be used when called from the described class in a given spec.

The practical application of this helper is to handle flaky specs, where other code can call the mocks before the test target can.
2025-08-05 12:03:42 +10:00
Jeff Wong 9562465329 FIX: partial migrations (#34085) 2025-08-04 18:07:09 -07:00
Sam 3d9fbd1ddd FIX: do not perform null translation (#34084) 2025-08-04 16:53:16 -07:00
Roman Rizzi a5b0c3bc06 FIX: Make sure strings are correctly escaped before seeding a persona for triage scripts (#34082) 2025-08-05 09:00:02 +10:00
Sérgio Saquetim f57cb094c3 DEV: Simplify post decorators by removing afterAdopt handling (#34020)
Consolidated all decorator logic into a single `decorate` method,
eliminating the complexity of separate `beforeAdopt` and `afterAdopt`
options. Streamlined related API and component logic for consistency and
maintainability.
2025-08-04 17:51:15 -03:00
Sérgio Saquetim e10517edd6 DEV: Ensure poll with @mentions and user statuses renders without errors (#34014)
This commit ensures that polls including @mentions of users with active user
statuses are rendered correctly without errors. It introduces a document
validation check before rendering components, adds fixtures for polls
with mentions, and provides acceptance tests to verify proper rendering
of polls containing @mentions.
2025-08-04 17:50:47 -03:00
Sérgio Saquetim 2223606cca DEV: Add value transformer for post edits indicator labels (#34075)
Introduced the `post-meta-data-edits-indicator-label` transformer to
enable customization of post edits indicator labels. Added integration
tests to validate customization and default behavior.
2025-08-04 17:50:16 -03:00
chapoi c79c5566d1 DEV: add text area option to custom user fields (#34072)
Meta feature request
https://meta.discourse.org/t/is-it-possible-to-have-a-multi-line-longer-text-field-in-the-signup-form/257642/7

This commit adds the option to use a textarea as a custom field:
<img width="1430" height="1520" alt="CleanShot 2025-08-04 at 19 06
45@2x"
src="https://github.com/user-attachments/assets/f827a473-1493-479a-903f-cc2b719e5e87"
/>

### Shown on profile:
<img width="690" height="433" alt="image"
src="https://github.com/user-attachments/assets/c9f386a3-0ca9-4402-9f4e-c3564f347a1c"
/>

### Shown on usercard (not particularly recommended):
<img width="1300" height="670" alt="CleanShot 2025-08-04 at 19 07 22@2x"
src="https://github.com/user-attachments/assets/a9b981cb-afd2-4402-a350-553604b5d070"
/>

### Shown on signup screen
<img width="976" height="1404" alt="CleanShot 2025-08-04 at 19 41 17@2x"
src="https://github.com/user-attachments/assets/548b0bd5-fc6f-4300-94a5-ff1d945a1f43"
/>
2025-08-04 22:12:37 +02:00
Kris 27c9608391 FIX: update fallback style for category-link helper (#34076)
The category-link helper isn't working in some cases, like the user
summary:

Before:
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/5f89f71b-a298-4406-b21b-8b0742b24e02"
/>


After:
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/25871813-ca22-4c89-86c3-45baee7b95a1"
/>


It looks like we were using `category.styleType` instead of
`category.style_type` — I've also added a fallback (to square) if for
some reason `style_type` isn't defined and added some tests
2025-08-04 16:09:04 -04:00
Renato Atilio 442248c08e DEV: use idiomatic prosemirror atEnd selection (#34077)
Uses ProseMirror's idiomatic `Selection.atEnd` instead of trying to
build a `TextSelection`.
2025-08-04 16:55:30 -03:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 188c123f76 Build(deps-dev): Bump stylelint from 16.22.0 to 16.23.0 in the lint group (#33948)
Bumps the lint group with 1 update:
[stylelint](https://github.com/stylelint/stylelint).


Updates `stylelint` from 16.22.0 to 16.23.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
-
[Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/stylelint/stylelint/compare/16.22.0...16.23.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 20:55:30 +02:00
Kris ed420f9391 UX: fix category badges on 404 page and oneboxes (#34071)
Looks like the new styles weren't implemented here, this does it


Before:
<img width="1526" height="504" alt="image"
src="https://github.com/user-attachments/assets/bd00570b-c64c-4a96-a156-f2d64793e4ee"
/>



After: 
<img width="1416" height="526" alt="image"
src="https://github.com/user-attachments/assets/31d75336-c704-40bd-a422-6a553ece62f8"
/>

<img width="1490" height="754" alt="image"
src="https://github.com/user-attachments/assets/22848386-c359-445d-b581-3417f29bde96"
/>

<img width="1446" height="532" alt="image"
src="https://github.com/user-attachments/assets/132b904a-1ef8-4357-be98-5ded856a8edf"
/>
2025-08-04 14:02:51 -04:00
chapoi 0f4ec028d7 UX: remove btn-default class from light-dark toggle (#34070)
The dropdown has `btn-default` classes applied, while they aren't button
defaults and thus it's causing styling issues.

Example mint theme:
* missing icons
* awkward border 

| Before | After |
|--------|--------|
| <img width="253" height="210" alt="CleanShot 2025-08-04 at 17 54 28"
src="https://github.com/user-attachments/assets/073b459a-e6f1-41ae-8065-77c81e6c70df"
/> | <img width="253" height="210" alt="CleanShot 2025-08-04 at 17 55
06"
src="https://github.com/user-attachments/assets/c36931a8-39e9-49c4-86aa-726a463be78c"
/> |
2025-08-04 18:04:40 +02:00
Isaac Janzen c6d8fdea6a DEV: Add and update post plugin outlets (#33944)
- Add `prevPost` and `nextPost` to post outlet params
- Add `prevPost` to  `post-article-class` transformer
- Introduce `in-post-article` plugin outlet for adding extension points
to the post within the `article` itself
- Introduce `post-links` plugin outlet that wraps `PostLinks` component
(I chose to wrap here vs within the component to ensure that we render
the outlet even if there is not post links)
2025-08-04 11:01:25 -05:00
David TaylorandSérgio Saquetim aae6385937 UX: Make AI streaming more efficient under glimmer post stream (#34068)
In the glimmer post stream, mutating `post.cooked` will cause ember to
re-render the HTML. That conflicts with d-ai's own morphlex-based diff
streaming.

To avoid this, we can wait until all streaming has finished before
setting the cooked property of the model.

Co-authored-by: Sérgio Saquetim <saquetim@discourse.org>
2025-08-04 16:15:57 +01:00
Kris b7b7a41d61 UX: fix quote control position in non-glimmer post stream (#34069)
The element ordering is different in the non-glimmer post stream, so
this will fix it (and won't change anything in the glimmer version)

Before:
<img width="1150" height="330" alt="image"
src="https://github.com/user-attachments/assets/926826fe-7671-45da-b985-176cfe5c2cf5"
/>


After: 
<img width="1164" height="302" alt="image"
src="https://github.com/user-attachments/assets/4fa966f4-9a34-4dc4-8b54-d370273a6064"
/>
2025-08-04 11:09:47 -04:00
chapoi c7f68715b5 UX: add spacing to discourse tag box-style (#34065)
Meta report https://meta.discourse.org/t/very-minor-tag-issue/375029

| Before | After |
|--------|--------|
| <img width="938" height="248" alt="CleanShot 2025-08-04 at 13 28
06@2x"
src="https://github.com/user-attachments/assets/db816c75-dc49-4a73-b161-7475a8ccca6c"
/> | <img width="938" height="248" alt="CleanShot 2025-08-04 at 13 27
50@2x"
src="https://github.com/user-attachments/assets/78468f6c-fa04-4d0f-a60f-a9d332e0a7f5"
/> |
2025-08-04 16:10:09 +02:00
chapoi 0dca6d3e4d UX: make tables in blockquotes fixed to prevent overflow (#34061)
Fix for meta report

https://meta.discourse.org/t/a-table-renders-outside-the-boundaries-of-the-post-comment/375689

Broken overflow gets replaced by horizontal scrolling within the table
cells. Not ideal either, but better than before and not much
alternatives afaik.

| Normal (before) | With fixed layout (after) |
|--------|--------|
| <img width="754" height="769" alt="CleanShot 2025-08-04 at 11 49 29"
src="https://github.com/user-attachments/assets/68d040d6-2e0c-45a8-90da-0879d142f1ba"
/> | <img width="789" height="751" alt="CleanShot 2025-08-04 at 11 56
09"
src="https://github.com/user-attachments/assets/d1e2439b-0a5c-46ce-a282-e205e687f5a1"
/> |
2025-08-04 16:09:35 +02:00
Kris 6f489d5303 UX: direct to single tag page from tag intersection when one tag remains (#34038)
When on a tag intersection like this: `/tags/intersection/foo/bar`

We have our tag selector:

<img width="946" height="136" alt="image"
src="https://github.com/user-attachments/assets/6f64cec6-c8f0-456e-a139-769ae66584d1"
/>

When you remove all but one tag, we redirect to /tags, which isn't the
best experience. This change will direct users to the single tag page
`/tag/foo` instead.
2025-08-04 09:42:25 -04:00
Roman Rizzi af1412a307 FIX: Use correct variable for triage personas migration (#34067)
Followup: https://github.com/discourse/discourse/pull/34010 and
https://github.com/discourse/discourse/pull/34066
2025-08-04 10:35:46 -03:00
Roman Rizzi 723e13473f FIX: Remove custom prefix when seeding personas for triage (#34066) 2025-08-04 10:16:45 -03:00
Roman RizziandRafael dos Santos Silva 23650aba6a FEATURE: Use a persona when running the AI triage automation script (#34010)
Co-authored-by: Rafael dos Santos Silva <xfalcox@gmail.com>
2025-08-04 09:11:13 -03:00
Gary Pendergast 33dfd7dba9 DEV: Fix a handful of flaky Prosemirror editor tests (#34054) 2025-08-04 07:47:07 -03:00
Renato Atilio a371bbe945 UX: [rte] properly put cursor at end when putCursorAtEnd is called (#34039) 2025-08-04 07:18:04 -03:00
Loïc Guitaut 1dc7295bba DEV: Add Goldiloader behind a setting (#34006)
This will allow us to try out Goldiloader and see how it performs.
2025-08-04 12:05:02 +02:00