2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-03 17:21:20 +08:00
Commit graph

60681 commits

Author SHA1 Message Date
Alan Guo Xiang Tan
3cac943266
Bump version to v3.5.0.beta9 2025-08-19 10:29:39 +08:00
Martin Brennan
a3374d2850
SECURITY: Welcome banner user name XSS
Prevents malformed user names (_not_ usernames) from
rendering HTML in the welcome banner. This would only
affect the user and any admin that impersonates that
user.
2025-08-19 10:09:18 +08:00
Nat
4edad4dc3c
SECURITY: Escape names 2025-08-19 10:09:14 +08:00
Osama Sayegh
8b20137317
FIX: Refresh palettes list when navigating back to palettes list page (#34374)
Fixes
https://meta.discourse.org/t/checkbox-in-color-palettes-user-selectable-yes-no-doesnt-work/378545?u=osama

This commit moves the sorting logic to server-side to avoid caching issues
where the (sorted) palettes list, which was stored as a property on the
controller, would need to be invalidated each time the user navigated to
the palettes list page because changes to palettes could've been made
between the last and new visits to the page. This PR also eliminates an
AJAX request that the palettes list page makes to fetch the default
theme by including the default theme in the same response that includes
the color palettes list.
2025-08-19 03:45:33 +03:00
Roman Rizzi
5d27b185e2
FEATURE: Skip spam scanning when relevant content is unchanged or edited by staff (#34391) 2025-08-19 09:04:02 +10:00
Roman Rizzi
4abe2229f1
FIX: Include llm_persona_triage scripts in the AI features' triage section (#34395) 2025-08-19 08:59:48 +10:00
Kris
16bd0b52b1
A11Y: include small post content as headings for screenreaders (#34392)
Concerns "small posts" like this one

<img width="1564" height="176" alt="image"
src="https://github.com/user-attachments/assets/652188fd-a7bd-4363-96fb-0ba8f7541e51"
/>

When navigating posts via heading-to-heading navigation in a
screenreader, sometimes you can run into situations where there's no
next heading to be found towards the bottom of the infinite loading
page... and this can stop more posts from loading, even when more exist.

Marking up the small post content as a heading allows it to be navigated
like regular posts, and avoids this issue. So when a small post is near
the bottom of a page, it can be navigated to and trigger more posts to
load.

This also has the benefit of making the small post content a more
natural part of the post stream while navigating with a screen reader.
2025-08-18 17:39:28 -04:00
Roman Rizzi
565a70b72c
FIX: Truncate seeded persona's names to fit name length constraint (#34393) 2025-08-18 18:08:43 -03:00
Kris
19292d4f85
UX: more reactive user preference color previews (#34361)
Previewing color mode and palette changes on /my/preferences/interface
was kind of spotty, this gets it working through every combination.

Before... 

* dark mode preview works
* dark mode "theme default" uses light preview
* mode changes don't preview 



https://github.com/user-attachments/assets/bd4fb052-04ff-45bf-a42d-60e4e1a42a8c





After... 

* mode changes preview 
* both light and dark palette changes preview (as long as you're in the
correct mode)
* dark mode "theme default" uses correct dark mode palette 


https://github.com/user-attachments/assets/513d334c-3b53-4bcc-9012-d8c4568866ce
2025-08-18 16:48:50 -04:00
Keegan George
fcb098e85d
FEATURE: Ability to regenerate short summaries (#34345)
## 🔍 Overview
This update allows you to regenerate short summaries (gists) with the
click of a button. This is helpful for admins to fix short summaries
when they go wrong. This update adds a regenerate button in the topic
admin controls as well as the bulk select dropdown for topic lists.

## 📸 Screenshots
<img width="443" height="663" alt="Screenshot 2025-08-14 at 17 28 46"
src="https://github.com/user-attachments/assets/25784d3e-38b4-4eb6-8fde-a921ca9243f6"
/>

<img width="564" height="579" alt="Screenshot 2025-08-14 at 17 28 36"
src="https://github.com/user-attachments/assets/26ef3037-2d79-4a32-bca9-baa94430bf18"
/>

---------

Co-authored-by: Roman Rizzi <rizziromanalejandro@gmail.com>
2025-08-18 13:48:41 -07:00
Renato Atilio
fde10cb699
DEV: simpler buildEngine used by prosemirror-editor (#34299)
This avoids messing with the `featuresOverride`, which we only did
before because of an attempt to filter the `onebox` feature out, which
may not be necessary.

The previous `buildEngine` call could strip information that's used by
customizations like `discourse-calendar`'s `[timezones]`, which relies
on the presence of a feature and hence is not being interpreted during
Markdown parsing as a token.
2025-08-18 15:37:01 -03:00
Kris
b60d9bcc8c
UX: fixes and improvements for color palettes (#34359)
Various fixes and improvements for the color palettes admin page... 

* Live previews stopped working because we were never running
`_captureInitialState()` so we had no comparison to see if we could live
preview

* `canPreviewColorScheme` also needed to check against "theme default"
user preference (-1)

* Refactors warning messages if admin user preferences differ from
defaults

<img width="2036" height="260" alt="image"
src="https://github.com/user-attachments/assets/30b6957a-6009-42e7-9cb7-01610536fd1c"
/>

   
    We now warn on: 
* Theme is different from the default (overrides color difference
warnings)
      * Light and/or dark palette are different from the default
      
* Added specs for toasts on palette change, which is a light way to
check if live preview is working (when the conditions are met for the
live preview, we don't show the toast)

* If a color palette isn't editable, make the button say "view" and not
"edit" — we can improve this some more, but this is a simple iterative
step
2025-08-18 12:20:22 -04:00
Mark VanLandingham
4c094224b1
DEV: Allow videos as option for UppyImageUploader
This PR adds the option `allowImages` to `UppyImageUploader`.
2025-08-18 11:00:19 -05:00
Natalie Tay
6ebef85b77
FIX: Allow users in content_localization_allowed_groups to delete translations (#34385)
Currently the following is erroneously shown only if the post author is
in the `content_localization_allowed_groups` setting. It should actually
be shown based on the current_user, not the post's user. This bug
prevents the privileged user from deleting translations.
2025-08-18 21:57:45 +08:00
chapoi
bb3ca2c81a
UX: remove wizard-specific styling and add core classes (#34323)
* Changed the wizard template to use standard classes for buttons.
* Removed obsolete wizard overrules for basic components
* Hid Horizon experimental layout on wizard screens

<img width="1220" height="1666" alt="image"
src="https://github.com/user-attachments/assets/d090c79d-94ad-48b0-b786-16ec96ec5ecb"
/>
<img width="1220" height="1666" alt="image"
src="https://github.com/user-attachments/assets/d027d977-6924-4123-b76d-9cc222aa6165"
/>
<img width="1220" height="1666" alt="image"
src="https://github.com/user-attachments/assets/64262353-0e68-4fa9-b162-544fe62f2ef8"
/>
2025-08-18 15:48:47 +02:00
Joffrey JAFFEUX
fc3ba98d03
DEV: correctly teardown page changed event (#34383)
We were not unsubscribing from this event, causing us to add more and
more listeners, after few pages visits you would end up with as many
subscriptions and as many ajax calls, eventually causing 429s.

A further improvement of this code could be to cache the events list,
there not much value in refetching each time given the query doesnt
change for each page.
2025-08-18 13:34:54 +02:00
Jarek Radosz
a745949aeb
DEV: Remove unused services from core (#34236) 2025-08-18 13:15:11 +02:00
Jarek Radosz
dfe66db62b
DEV: Clean up themes' about.json files (#34219)
Remove obsolete fields and reformat.
2025-08-18 12:35:02 +02:00
Jarek Radosz
da44d793d1
DEV: Don't apply .modal-open class for inline modals (#34380)
This fixes scrolling on /styleguide/organisms/modal
2025-08-18 12:34:24 +02:00
Jarek Radosz
75750e4453
DEV: Remove unused code (#34381) 2025-08-18 12:31:19 +02:00
Jarek Radosz
376fb750aa
DEV: Fix "overridden" typos in sidebar code (#34382)
neither prop name seems to be used outside core, so no other code has to
be updated
2025-08-18 12:31:06 +02:00
Natalie Tay
028c90dd5e
FIX: Language dropdown in wizard should filter correctly (#34379)
This commit fixes a filter issue on the language dropdown on wizard
introduction.

Related: https://github.com/discourse/discourse/pull/34378
2025-08-18 17:51:46 +08:00
Alan Guo Xiang Tan
3f5e8926af
PERF: Fix performance regression in SvgSprite.settings_icons (#34377)
This commit reverts the changes made to `SvgSprite.settings_icons` in
19af83d39e
which resulted in significantly slower boot times on multisite clusters
since `SvgSprite.settings_icons` is called during application preload.
2025-08-18 11:32:54 +02:00
dependabot[bot]
dbf408025b
Build(deps-dev): Bump ember-template-lint from 7.9.2 to 7.9.3 in the lint group (#34367)
Bumps the lint group with 1 update:
[ember-template-lint](https://github.com/ember-template-lint/ember-template-lint).


Updates `ember-template-lint` from 7.9.2 to 7.9.3
- [Release
notes](https://github.com/ember-template-lint/ember-template-lint/releases)
-
[Changelog](https://github.com/ember-template-lint/ember-template-lint/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/ember-template-lint/ember-template-lint/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 11:28:54 +02:00
dependabot[bot]
55428ca882
Build(deps-dev): Bump unicode-display_width from 3.1.4 to 3.1.5 (#34365)
Bumps
[unicode-display_width](https://github.com/janlelis/unicode-display_width)
from 3.1.4 to 3.1.5.
-
[Changelog](https://github.com/janlelis/unicode-display_width/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/janlelis/unicode-display_width/compare/v3.1.4...v3.1.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 11:20:11 +02:00
Natalie Tay
1d16fbfb96
FIX: A typo on the change callback for wizard (#34378)
Related https://github.com/discourse/discourse/pull/30055. Just a typo
fix.
2025-08-18 16:43:01 +08:00
Meghna
790d269112
FIX: fix the closing paragraph tag in locale (#34372) 2025-08-18 13:11:30 +05:30
Gary Pendergast
23c481ca0f
FIX: Ensure confirm user fields are exported correctly in user lists. (#34375)
Since #34350 changed "confirm" user fields to cast to a boolean type,
generating a user list export would cause an error.

This change ensures the export process treats all user field values as
strings, for inserting into the export CSV.
2025-08-18 17:21:11 +10:00
Yuriy Kurant
57ae1b86df
FIX: hide header search for certain routes (#34294)
Switches check from a URL to a route name.

Fixes issue logged in https://meta.discourse.org/t/header-search-disappears-on-login-site-settings/377612.
2025-08-18 14:26:19 +08:00
Martin Brennan
70859e277f
Revert "FEATURE: Disable user tips + narrative bot welcome post for all sites (#34316)" (#34370)
This reverts commit 443caf1bed.

Need to iron out some more issues first.
2025-08-18 15:58:58 +10:00
Gary Pendergast
88eb09c08e
DEV: Yield from inside TopicLink (#34371)
This change adds a `yield` inside the `TopicLink` component, allowing
additional text to be appended to the link text.
2025-08-18 15:55:41 +10:00
Gary Pendergast
e56658fdd1
DEV: Ensure that "confirm" user fields use boolean values (#34350)
This change fixes two issues with the "confirm" type user field.

These user fields are rendered as checkboxes, so the user field value
was being used directly as the `@checked` param for the input element.
Non-boolean values would cause unexpected checkbox behaviour (for
example, a value of `"false"` would cause the checkbox to be checked, or
a value of `null` would cause the form to be submitted with an empty
value, instead of `false`).

Additionally, since we know that these fields will only have boolean
values, `User#user_fields` now automatically casts the string `"true"`
and `"false"` values for confirm fields into their boolean equivalent.
2025-08-18 13:24:10 +10:00
Natalie Tay
56f2310fb4
DEV: Use common candidate helper for backfill job (#34364)
Related: https://github.com/discourse/discourse/pull/33927

This is already tested in the job itself and is a refactor to use the
new class.
2025-08-18 11:04:35 +08:00
Krzysztof Kotlarek
9ad37e692e
FIX: Prioritize default light and dark palette in admin (#34348)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Publish Assets / publish-assets (push) Waiting to run
Tests / core backend (push) Waiting to run
Tests / plugins backend (push) Waiting to run
Tests / core frontend (Chrome) (push) Waiting to run
Tests / plugins frontend (push) Waiting to run
Tests / themes frontend (push) Waiting to run
Tests / core system (push) Waiting to run
Tests / plugins system (push) Waiting to run
Tests / themes system (push) Waiting to run
Tests / core frontend (Firefox ESR) (push) Waiting to run
Tests / core frontend (Firefox Evergreen) (push) Waiting to run
Tests / chat system (push) Waiting to run
Tests / merge (push) Blocked by required conditions
Update color palette sorting algorithm to display active light and dark
palettes first

<img width="1360" height="1186" alt="Screenshot 2025-08-15 at 12 00
35 pm"
src="https://github.com/user-attachments/assets/aa493362-3853-41f6-9bfd-040487e07634"
/>
2025-08-18 10:05:59 +08:00
Martin Brennan
443caf1bed
FEATURE: Disable user tips + narrative bot welcome post for all sites (#34316)
We want to temporarily disable user tips and the Discobot welcome PM
on all sites by default until we have time to improve their
functionality, because
right now they create a lot of noise for new members and admins without
providing obvious benefits.
2025-08-18 11:43:39 +10:00
Kelv
c7504e2ec3
DEV: use floatkit autocomplete for search input field (#34131)
This PR replaces the jquery-based autocomplete in full page search with
floatkit. I added a separate site setting for toggling autocomplete for
this and other input fields in future, and a new `offset` option for
customizing how much offset we want for the autocomplete menu.
2025-08-18 09:16:31 +08:00
Alan Guo Xiang Tan
dcac4e62ee
UX: Display toast message when deleting a theme (#34355)
Before this change, we would redirect the user back to the admin themes
index page without any UI indication on whether the theme has been
successfully destroyed.
2025-08-18 09:12:15 +08:00
Martin Brennan
37b86e139f
FIX: Allow themes index to resort when adding new themes (#34314)
Follows the same pattern as the color palette index, where we
sort the themes once, and then resort only when the themes array
from the model changes. This fixes the issue where if you installed
a new theme, it would not show up on the grid until you refreshed.
2025-08-18 08:27:59 +10:00
chapoi
c98b4ac9c1
UX: always keep mobile composer at fullscreen (#34358)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Publish Assets / publish-assets (push) Waiting to run
Tests / core backend (push) Waiting to run
Tests / plugins backend (push) Waiting to run
Tests / core frontend (Chrome) (push) Waiting to run
Tests / plugins frontend (push) Waiting to run
Tests / themes frontend (push) Waiting to run
Tests / core system (push) Waiting to run
Tests / plugins system (push) Waiting to run
Tests / themes system (push) Waiting to run
Tests / core frontend (Firefox ESR) (push) Waiting to run
Tests / core frontend (Firefox Evergreen) (push) Waiting to run
Tests / chat system (push) Waiting to run
Tests / merge (push) Blocked by required conditions
This commit essentially removes the half-way composer state on mobile,
and instead opts to keep it fullscreen. Regular minimise still works.

This has been int he design experiments for long enough that it seems
safe enough (famous last words).
Meta topic:
https://meta.discourse.org/t/mobile-composer-permanent-full-screen/374766
2025-08-16 20:30:50 +02:00
Keegan George
08e9f9c00b
UX: remove barThickness so translation bars scale naturally (#34362)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Publish Assets / publish-assets (push) Waiting to run
Tests / core backend (push) Waiting to run
Tests / plugins backend (push) Waiting to run
Tests / core frontend (Chrome) (push) Waiting to run
Tests / plugins frontend (push) Waiting to run
Tests / themes frontend (push) Waiting to run
Tests / core system (push) Waiting to run
Tests / plugins system (push) Waiting to run
Tests / themes system (push) Waiting to run
Tests / core frontend (Firefox ESR) (push) Waiting to run
Tests / core frontend (Firefox Evergreen) (push) Waiting to run
Tests / chat system (push) Waiting to run
Tests / merge (push) Blocked by required conditions
## 🔍 Overview
When a forum has many translations, the explicit `barThickness` looks
too thick. This update removes the explicit `barThickness` so that the
bars scale naturally based on the amount of translations in the chart.

## 📷 Screenshots

### ← Before
<img width="1093" height="673" alt="Screenshot 2025-08-15 at 13 06 07"
src="https://github.com/user-attachments/assets/030eac00-d972-40de-97d6-e266dbbe17eb"
/>

### → After
<img width="1095" height="704" alt="Screenshot 2025-08-15 at 13 05 41"
src="https://github.com/user-attachments/assets/9fa41e63-0324-45f1-ae1f-5212ab2a770d"
/>
2025-08-15 14:10:49 -07:00
Kris
1ec69c3f2f
UX: fix timeline handle color in dark mode palettes (#34360)
Follow-up to 30ee375ee6

We improved contrast of the light mode handle, but this wasn't ideal in
dark mode... this fixes it

Before: 
<img width="100" alt="image"
src="https://github.com/user-attachments/assets/144cc340-836e-4abf-b10c-a59c8d478e20"
/><img width="100" alt="image"
src="https://github.com/user-attachments/assets/bc1d4103-ce3b-4b5e-95ba-4a6428d1b003"
/><img width="100" alt="image"
src="https://github.com/user-attachments/assets/29bdcda1-677a-45de-8148-949101662bcd"
/>


After: 
<img width="100" alt="image"
src="https://github.com/user-attachments/assets/e503e867-f707-4e85-809b-a5136e3cc743"
/> <img width="100" alt="image"
src="https://github.com/user-attachments/assets/fa5185ba-5fb9-49d8-96dd-a908ef07dada"
/> <img width="100" alt="image"
src="https://github.com/user-attachments/assets/3430fd4b-ebaf-4049-a648-88a0293bcbdd"
/>
2025-08-15 15:26:31 -04:00
Keegan George
5c58a550d6
FEATURE: Translation progress admin UI (#34239)
## 🔍 Overview
This update adds a tab to the Discourse AI admin panel where admins can
see automatic translation progress for selected locales on the forum as
well as manage the relevant translation settings.

## 📷 Screenshots

<img width="930" height="806" alt="01-in-use"
src="https://github.com/user-attachments/assets/b470f687-fd4b-49c8-93d8-226e4234a4c7"
/>

---

<img width="924" height="397" alt="02-disabled"
src="https://github.com/user-attachments/assets/92a847ca-12a2-4bba-b022-f9d47174bef6"
/>
2025-08-15 12:19:35 -07:00
Natalie Tay
c002d10b11
DEV: Return finished and total number of candidates needed for translation rather than a percentage (#34357)
To better support https://github.com/discourse/discourse/pull/34239, we
return the raw values here instead of a derived percentage.
2025-08-15 10:25:27 -07:00
Martin Brennan
98e62df173
FIX: Incorrect site setting link for plugins in admin search (#34349)
In the admin search, links to site settings for plugins that
are not using the new show page for plugins were pointing to
the admin route for the plugin. This is not useful, because most
plugins do not show their site settings here.

Instead, we should link to the plugin category on the
/admin/site_settings
route.
2025-08-15 16:31:42 +10:00
Osama Sayegh
77b774e7b3
UX: Don't make seeded palettes user-selectable (#34347)
Internal topic: t/160871.
2025-08-15 08:03:55 +03:00
Martin Brennan
3eb7de0f74
UX: Update copy from Active -> Default for themes + palettes (#34346)
Active is a confusing term to use for the default theme
and color palette in the admin UI.

This commit updates the copy for consistency
to use Default instead of Active to reflect the code
and the way people think about how this works generally.

**Before**

<img width="414" height="604" alt="image"
src="https://github.com/user-attachments/assets/80059093-1c3d-44e5-82f6-9b608e991afa"
/>
<img width="409" height="209" alt="image"
src="https://github.com/user-attachments/assets/7695a256-1cf9-42c0-bae8-d69cc0b67914"
/>
<img width="914" height="709" alt="image"
src="https://github.com/user-attachments/assets/ed7d5a69-f736-42d9-9c60-b328d3922534"
/>


**After**

<img width="432" height="500" alt="image"
src="https://github.com/user-attachments/assets/2f65b7a5-8c85-4328-926a-07dbf05ddc19"
/>
<img width="381" height="245" alt="image"
src="https://github.com/user-attachments/assets/a7420484-ed57-4e0e-a5e0-c2fe067a15ef"
/>
<img width="834" height="610" alt="image"
src="https://github.com/user-attachments/assets/1567544f-203e-4e9e-9e74-e828de08ad0b"
/>
2025-08-15 13:28:01 +10:00
Kris
2da7494ca5
UX: fix category dropdown size in title editor (#34335)
This category dropdown can become a little too short at different font
scales, this fixes it.

Before: 
<img width="1584" height="262" alt="image"
src="https://github.com/user-attachments/assets/16bcef3a-3231-4433-8ec2-bbf9aa51676b"
/>


After:
<img width="1600" height="272" alt="image"
src="https://github.com/user-attachments/assets/41caa8cf-ef54-4ce4-893c-436d4d91abd1"
/>
2025-08-15 12:54:05 +10:00
Alan Guo Xiang Tan
3ce3862b5e
FIX: Edit color palette button pointing to wrong route (#34318)
Some checks failed
Licenses / run (push) Has been cancelled
Linting / run (push) Has been cancelled
Publish Assets / publish-assets (push) Has been cancelled
Tests / core backend (push) Has been cancelled
Tests / plugins backend (push) Has been cancelled
Tests / core frontend (Chrome) (push) Has been cancelled
Tests / plugins frontend (push) Has been cancelled
Tests / themes frontend (push) Has been cancelled
Tests / core system (push) Has been cancelled
Tests / plugins system (push) Has been cancelled
Tests / themes system (push) Has been cancelled
Tests / core frontend (Firefox ESR) (push) Has been cancelled
Tests / core frontend (Firefox Evergreen) (push) Has been cancelled
Tests / chat system (push) Has been cancelled
Tests / merge (push) Has been cancelled
This commit introduces two changes:

1. It fixes the incorrect route used for the color palettes edit page.
2. Remove the edit color palette button in favor of an "edit colors"
   link in the color palette selector description.
2025-08-15 09:33:42 +08:00
Martin Brennan
4eb1a17ef8
FIX: Link to correct staff action logs for theme site setting (#34315)
Fixes an issue where the history link on hover for a theme site setting
would point to the staff action logs for regular site settings, not  the
theme site setting ones which include the theme name in the subject
and also have a different `change_theme_site_setting` action.

c.f.
https://meta.discourse.org/t/link-to-change-history-on-themeable-site-settings/377394
2025-08-15 11:14:05 +10:00
dependabot[bot]
2368262764
Build(deps-dev): Bump webpack from 5.101.1 to 5.101.2 (#34341)
Bumps [webpack](https://github.com/webpack/webpack) from 5.101.1 to
5.101.2.
- [Release notes](https://github.com/webpack/webpack/releases)
-
[Commits](https://github.com/webpack/webpack/compare/v5.101.1...v5.101.2)

---------

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-08-15 02:24:01 +02:00