Commit Graph
59992 Commits
Author SHA1 Message Date
Kris 187aeb58ed UX: use correct name for PMs in user admin stats (#33617)
When admin'ing an account, we have a very old "private topics" text —
this should use the current term, "personal messages"

Reported:
https://meta.discourse.org/t/rename-private-topics-to-personal-message-topics/374264
2025-07-15 09:18:03 -04:00
David Battersby aaa63c4f6c FIX: load saved draft when clicking reply to post (#33543)
In the past we have always relied on automatically opening the composer
and auto loading the existing draft when visiting a topic that has a
draft post reply. This is fine to auto load the draft, but when the
composer is closed and reopened on the same page then we have an issue.

The result is that the draft is then deleted because the draft key is
set and the composer body is blank, since it has never been populated
when clicking the reply to post button.

To solve this we can check for existing drafts when clicking the reply
to post button, then load the draft into the composer.

_The challenging part of this change is that we have a number of tests
that were relying on a false positive. Hence in the specs I have
switched some tests to use a fixture that does not have drafts and in
some cases kept the same fixture but mocked the response as having no
drafts returned._
2025-07-15 13:32:31 +04:00
chapoi f0041661c0 Revert (#33600)
partially reverting
https://github.com/discourse/discourse/commit/2e11eb20bf012ae32c552a8a3871903dfe939d5b
because it hides new-new
2025-07-15 10:12:55 +02:00
David Battersby 514431e040 FIX: my redirect case insensitive params (#33604)
This changes allows the `/my/` prefix redirect to work when the name
param contains uppercase letters.

#### For example:

`/my/messages/group/MyGroup` now redirects to
`/u/username/messages/group/MyGroup`
2025-07-15 09:49:48 +04:00
Kelv 1c8f2b3a77 FIX: include icon for private messages in non message filtered searches (#33611)
Context:
https://meta.discourse.org/t/missing-pm-icon-in-in-all-searches/365094

This ensures PMs are marked as such with the PM icon in searches where
there might be other types of results.
2025-07-15 13:17:27 +08:00
Linca 7a099ebb6a FEATURE: Allow users to bulk recategorize silently (#33490)
We want to add an option for admins to carry out the operation silently
when they are updating the category for the selected topics. When the
“Perform this action silently” checkbox has been checked, the
`:notify_category_change sidekiq` job should not be enqueued.
2025-07-15 11:42:30 +08:00
Krzysztof Kotlarek d5693cd8f9 DEV: enable Foundation and stop Default (#33610)
Reveal Foundation theme and stop creating a Default for new instances.
Instead, the Foundation should be set as the default.
2025-07-15 11:16:11 +08:00
Martin Brennan 33abb858e9 DEV: Add X-Discourse-BrowserPageView response header (#33598)
When we are tracking requests in the `Middleware::RequestTracker`, we
have historically added an `X-Discourse-TrackView` response header
for implicitly tracked requests HTML requests, and also explicitly
tracked page view requests when navigating the Ember app.

Within the past couple of years, we introduced the concept of
Browser Page Views (BPVs), which are recorded when requests are made
via AJAX when navigating the app with Ember, and also piggybacked
onto the first MessageBus request on page load. The former is known
as an explicitly tracked request, the latter is a deferred tracked request.

The explicitly tracked browser page views also add the `X-Discourse-TrackView`
header to the response, so it is hard to differentiate which requests are purely
browser page view requests in the logs.

This commit adds a new response header, `X-Discourse-BrowserPageView`,
that acts in a similar way to the existing `X-Discourse-TrackView`
header, but is specifically for requests that are tracked as BPVs (both explicit
and deferred).
2025-07-15 11:28:10 +10:00
Juan David Martínez Cubillos ac08ac962b DEV: Remove ability to use users' names in group mention notifications and mentions shown in emails and added :user_notification_email_options plugin modifier to allow plugins reintroduce this or other modifications to emails (#33449)
**Description**

Changes introduced previously on this
[PR](https://github.com/discourse/discourse/pull/33055) are reverted in
order to improve code and add flexibility to the user notifications
emails pipeline
2025-07-14 15:20:08 -05:00
Jordan Vidrine 6ad9bd4eca DEV: Additional topic list spacing variables (#33571) 2025-07-14 14:54:24 -05:00
Kris c16f0002fe UX: minor fullscreen composer adjustments (#33584)
1. The grippie shouldn't appear in full-screen mode, as reported here:
https://meta.discourse.org/t/grip-not-hidden-in-composer-full-screen-mode/373303

2. Composer education popups are tool tall (post the change from
c848263523):
https://meta.discourse.org/t/your-topic-is-similar-to-pop-up-in-full-screen-composer/373304

Before:
<img width="3018" height="1718" alt="image"
src="https://github.com/user-attachments/assets/6001ff9c-1774-428c-8367-6dc9d4193336"
/>


After:
<img width="3014" height="1708" alt="image"
src="https://github.com/user-attachments/assets/bdf7b099-209e-4c9b-9c79-cb9e1412a0f8"
/>
2025-07-14 14:23:44 -04:00
David Taylor acd74860de DEV: Enable admin warning for discourse.script-tag-discourse-plugin (#33605)
https://meta.discourse.org/t/366482
2025-07-14 14:54:11 +01:00
David Taylor 5e6157c61d DEV: Include sourcemap when generating JavascriptCache digest (#33603)
It's possible for different source files to generate the same compiled
output (e.g. if only a comment changes), so we should include the
sourcemap content when calculating a digest.

Extracted from #33103
2025-07-14 14:09:05 +01:00
David Taylor 2a356130c0 DEV: Move theme hbs transforms into dedicated file (#33602)
Extracted from #33103
2025-07-14 14:08:56 +01:00
Jarek Radosz 378bed012c DEV: Improve separation of core and plugin CI (#33583)
1. Use separate caches for plugins and core
2. Don't load plugins in non-plugin jobs
3. Propagate LOAD_PLUGINS to all steps
4. Check annotations of plugin models
5. Update outdated annotations
2025-07-14 14:28:30 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2d10a783bd Build(deps): Bump @babel/standalone from 7.28.0 to 7.28.1 in the babel group (#33588)
Bumps the babel group with 1 update:
[@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.28.0 to 7.28.1
- [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.28.1/packages/babel-standalone)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-14 14:26:16 +02:00
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Discourse CI
b62e681af1 Build(deps-dev): Bump webpack from 5.100.0 to 5.100.1 (#33590)
Bumps [webpack](https://github.com/webpack/webpack) from 5.100.0 to
5.100.1.
- [Release notes](https://github.com/webpack/webpack/releases)
-
[Commits](https://github.com/webpack/webpack/compare/v5.100.0...v5.100.1)

---------

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-07-14 14:23:50 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ebcb48b085 Build(deps-dev): Bump lefthook from 1.12.1 to 1.12.2 (#33592)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.12.1
to 1.12.2.
- [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.12.1...v1.12.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-14 14:23:17 +02:00
Krzysztof Kotlarek 19c3beb555 Revert "DEV: enable Foundation and stop Default" (#33599)
Reverts discourse/discourse#33508
2025-07-14 16:17:40 +08:00
Ted Johansson 1bf7136b27 FIX: Broken links to site settings under Content section (#33597)
The Content section in particular has four tabs which are all site setting pages. It does not have one under /settings, like other sections.

The admin search functionality will automatically use /settings for multi-tabbed sections. This results in a 404 when searching for Content site settings.

This PR adds a front-end redirect (replaceWith) for /content/settings to fix the immediate issue.
2025-07-14 16:14:50 +08:00
Ted Johansson 6bc460a78d DEV: Move post-related specs from guardian_spec to post_guardian_spec (#33587)
This is the first in a series of PRs aimed at organizing the guardians and their tests a bit better to make them more discoverable and reduce the amount of "pinballing" around looking for the relevant methods.

There is no change to any functionality, and the tests have been copied over as-is, except where fixture variables needed renaming to fit in the new spec file.
2025-07-14 16:14:19 +08:00
Martin Brennan cbf88d617e UX: Shortcuts for editor heading toolbar (#33578)
Uses the following shortcuts for the editor heading toolbar:

* Ctrl + Alt + 1: Heading 1
* Ctrl + Alt + 2: Heading 2
* Ctrl + Alt + 3: Heading 3
* Ctrl + Alt + 4: Heading 4
* Ctrl + Alt + 0: Paragraph

On macOS, substitute `Ctrl` with `Cmd` and `Alt` with `Option`.

Also adds composer shortcuts to keyboard shortcut help modal (?)
2025-07-14 17:40:28 +10:00
Krzysztof Kotlarek 699f35aa70 DEV: enable Foundation and stop Default (#33508)
Reveal Foundation theme and stop creating a Default for new instances.
Instead, the Foundation should be set as the default.
2025-07-14 15:35:07 +08:00
Krzysztof Kotlarek d164351458 DEV: remove deduplicate horizon script (#33595)
The Horizon theme is now in core, and the remote Horizon repo is
deprecated. This script is not needed anymore.
2025-07-14 14:34:47 +08:00
Linca a3cff97b48 FEATURE: Make it easier for staff to see if a profile is silenced (#33537)
This commit make it easier for staff to see if a profile is silenced by
aligning it with how suspended notices are shown.

- The number of times a profile has been silenced is shown in the staff
counters banner at the top of the public user profiles.
- Clicking on the silenced note in the staff counters banner goes to a
filtered view of the staff action logs for the user and the silenced
action.
- The profile indicates if a user is silenced and shows the date they
are silenced until. This looks exactly the same as how it currently
displays for suspended users, with the added info of the date. This is
also displayed on the user card, the same as suspended notices currently
are.

## Screenshots


![image](https://github.com/user-attachments/assets/43cf8134-3391-43ff-98fe-fcba07c9e3dd)

![image](https://github.com/user-attachments/assets/2804dcba-70b2-4cf2-8a93-63433a23b481)
2025-07-14 12:44:31 +08:00
Martin Brennan 96dc65d69c UX: Update composer placeholder for RTE (#33594)
We don't really want to encourage HTML in the RTE,
and BBCode is pretty technical too, so this commit
simplifies the copy of the placeholder for the RTE
2025-07-14 14:34:29 +10:00
Joffrey JAFFEUX 226bc5c359 FIX: correctly allow to translate my messages (#33586)
We were not correctly converting the key, it was outputting "my
messages" instead of "my_messages".
2025-07-14 09:48:49 +10:00
Kris 5eca6d826e UX: make navigation container full-width again (#33581)
Looks like this regressed in 20f57aec12,
this gets it fixed


Before:
<img width="758" height="224" alt="image"
src="https://github.com/user-attachments/assets/cecef214-b547-4bf2-a41c-fc9f8f0031d1"
/>


After:
<img width="764" height="210" alt="image"
src="https://github.com/user-attachments/assets/731ddc08-4c7d-4edf-85b3-64fffd741eb2"
/>
2025-07-11 12:33:29 -04:00
Kris b081dadfed A11Y: add aria-label to advanced search date input (#33580)
The date control here doesn't have a label:

<img width="608" height="170" alt="image"
src="https://github.com/user-attachments/assets/5517d5d2-f64b-4cf9-aad0-f14152a85ffd"
/>

This adds the label, and also removes the headerAriaLabel from the
before/after dropdown — the dropdown has a label applied elsewhere so
this wasn't doing anything (tested with NVDA)
2025-07-11 12:19:24 -04:00
Sérgio Saquetim 301f27caaa DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
Kris cb0b8351a9 A11Y: onebox avatars/images are decorative, so screenreaders can skip (#33572)
Adding `alt=""` to tell screenreaders to skip these, we don't reliably
have alt content available for onebox images and they tend to be
decorative, so better to omit.


<img width="738" height="151" alt="learn.microsoft.com onebox with the
link whats new in C# 11, there's a purple C# badge to the left of the
link"
src="https://github.com/user-attachments/assets/15bdc830-683f-4c69-a11b-9d54c66fa627"
/>


We already do this in some oneboxes, so this covers some more cases
including the generic.
2025-07-11 09:55:48 -04:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 970323d1f3 Build(deps): Bump multi_json from 1.15.0 to 1.16.0 (#33574)
Bumps [multi_json](https://github.com/sferik/multi_json) from 1.15.0 to
1.16.0.
-
[Changelog](https://github.com/sferik/multi_json/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/sferik/multi_json/compare/v1.15.0...v1.16.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-11 13:52:40 +02:00
Natalie Tay 6c95779712 DEV: Add extra permission to allow labeller to work in PRs (#33579)
Seeing the following in
https://github.com/discourse/discourse/actions/runs/16209614945/job/45767099809?pr=33577

```
The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api
Error: HttpError: You do not have permission to create labels on this repository.: {"resource":"Repository","field":"label","code":"unauthorized"}
Error: You do not have permission to create labels on this repository.: {"resource":"Repository","field":"label","code":"unauthorized"}
```

Related: https://github.com/orgs/community/discussions/156181
2025-07-11 15:02:54 +08:00
afc5d13c63 FEATURE: Text heading/paragraph menu in composer toolbar (#33461)
This PR introduces a heading/paragraph dropdown menu for  the
composer toolbar, that works for both the new rich text editor, and
the old markdown editor.

Features include:

* Dynamically changing the icon based on the heading level
* Checking the current heading level in the dropdown list
* Applying the same heading level to multiple selections

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Renato Atilio <renatoat@gmail.com>
2025-07-11 12:29:58 +10:00
Ella E. b4a376bd9a DEV: Use reusable d-table instead of admin-only styles (#33531)
Follow up to https://github.com/discourse/discourse/pull/33253

Switches to the generic `d-table` class instead of using the admin
stylesheet. No visual changes, except the badge/status for the API key.

| Before | After |
|--------|--------|
|
![image](https://github.com/user-attachments/assets/e4d1a0ad-8e60-4ad8-b3b1-d17b66b878e8)
|
![image](https://github.com/user-attachments/assets/5bc41353-c4a0-486b-b730-451b9f737341)
|
2025-07-10 19:58:04 -06:00
Krzysztof Kotlarek 42e0da982a FIX: bug when skipped email logs are filtered (#33557)
SkippedEmailLog table does not have `cc_addresses` column. Therefore, it
should be skipped in the filter query.
2025-07-11 08:55:51 +08:00
Jordan Vidrine 38c05a796d UX: Remove category h3 margin (#33573) 2025-07-10 19:02:06 -05:00
Amanda Alves BranquinhoandGerhard Schlager ca36d98d55 PERF: Add indexes to improve user merger performance (#33271)
- Add indexes in some places where we were seeing bottlenecks
- Remove redundant ILIKE query

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-07-10 18:18:40 -03:00
Renato Atilio fa1ec71526 UX: avoid small viewport squishing rich editor image (#33567)
Lets the height be automatic instead of enforcing the calculated value.

Before
<img width="300" height="247" alt="image"
src="https://github.com/user-attachments/assets/6566f3ba-44aa-446c-b773-94bbdd7f505d"
/>

After
<img width="296" height="244" alt="image"
src="https://github.com/user-attachments/assets/9c7eb257-4810-4aab-bdfe-9ad7ec8d0a0b"
/>
2025-07-10 17:59:50 -03:00
Kris 3056f7579f A11Y: add aria-label to quote expansion button, jump to post (#33569)
Concerns the quote controls: 


![quote](https://github.com/user-attachments/assets/a9d21286-1f44-4f9f-a1cb-6fc4fdb8c350)

This improves the title so rather than "expand/collapse" for both states
it represents the current action "expand" or "collapse". This is also
added for aria-label.

I've also added aria-label to the "go to the quoted post" arrow.
2025-07-10 16:59:15 -04:00
Kris a3b192f3bd A11Y: hide anchor links from global site banners (#33568)
When a topic is pinned as a site banner, we include automatically
generated anchor links from the post in the banner's content... but do
not include the anchor functionality from the topic (topic seen below)

<img width="246" height="48" alt="image"
src="https://github.com/user-attachments/assets/6f145875-97a3-401c-bef6-ffd5cd6a22d1"
/>

This means we end up with a 0 dimension link in the banner content,
which is still reachable via keyboard and other forms of navigation. You
can see the outlined link below:

<img width="1097" height="174" alt="image"
src="https://github.com/user-attachments/assets/d5d50892-72f3-4ab8-8a33-2f2eb73fdc3d"
/>

This can be confusing if you're using a screenreader, and the anchor
links don't serve much purpose when included in these banners. Hiding
them with CSS avoids the issue.
2025-07-10 16:11:49 -04:00
Kris 92c9d43b9a DEV: add additional icon aliases for lock (#33547)
This adds some new icon aliases so the lock icon can be overridden in
specific scenarios without applying globally to all locks:

* "topic.closed"
* "topic.opened"
* "category.restricted"

This enables customizations like:


![image](https://github.com/user-attachments/assets/e7dc62ce-98ed-49ad-b127-97cf928f3371)

```
import { apiInitializer } from "discourse/lib/api";

export default apiInitializer((api) => {
  api.replaceIcon("topic.closed", "xmark");
  api.replaceIcon("category.restricted", "shield-halved");
});
```

More documentation on this feature in
https://meta.discourse.org/t/change-icons-globally/87751
2025-07-10 14:11:03 -04:00
David Battersby 16955d5dc4 UX: edit category description layout fix (#33565)
The `form-kit` container subtitle doesn't play well with the category
description. The issue experienced appears to be due to the flex
direction.

Since we can only update the category description from the topic and not
within the edit category page, I have moved the description to a
read-only span which follows a similar pattern that we use on other
forms.
2025-07-10 19:56:54 +04:00
chapoi 3e735e62da UX: Followup fix dmenu zindex (#33566)
followup for #33545 

The `z-index: calc(z("mobile-composer") + 1);` (1101) was lower dan the
modal overlay on mobile (1300), which made the menu inaccessible.

it's now scoped to the desktop version of dmenu only, which should
suffice for desktop/tablet usecases.
2025-07-10 17:07:39 +02:00
chapoi 2e11eb20bf UX: Horizon > fix spacing of topic-header and better position bulk-select (#33564)
Removed this spacing caused by topic-header padding, despite being
empty:

<img width="1882" height="966" alt="CleanShot 2025-07-10 at 13 16 19@2x"
src="https://github.com/user-attachments/assets/dab63f60-58a2-4c3a-a808-87464f25a5a3"
/>
2025-07-10 15:38:35 +02:00
Jarek Radosz 620883cd13 DEV: Move discourse-reactions to core (#33538)
https://meta.discourse.org/t/373574

Internal `/t/-/156778`
2025-07-10 11:40:31 +01:00
chapoi 54c4417b65 FIX: colour var tags (#33561) 2025-07-10 12:32:47 +02:00
Jarek Radosz 22d3140c3a DEV: Label all bundled plugin PRs (#33560) 2025-07-10 11:16:34 +01:00
chapoi 37ee65264c FIX: z-index issues with new DMenu in composer (#33545)
Addressing some z-index issues with the first use of Dmenu within the
composer:
* z-index need an adjustment on mobile/tablets
* z-index need an adjustment when in fullscreen on desktop

Also limiting the max height on desktop to 30vh to avoid it potentially
scrolling of the page without a way to fix it by resizing composer
height.

Meta report:
https://meta.discourse.org/t/composer-more-menu-partly-hidden-behind-header-and-composer/372859
2025-07-10 09:50:32 +02:00
Ted Johansson 3604aa2bcc DEV: Add a Gravatar enable/disable toggle (#33533)
We want to add the ability to enable/disable users selecting Gravatar for their avatar.

This change adds a site setting to enable/disable the option (default to enabled.) This will prevent users from configuring Gravatars from that point on. It does not affect already configured avatars.

We're also taking this chance to hide some of the advanced settings from the UI.
2025-07-10 15:09:32 +08:00