1642 Commits

Author SHA1 Message Date
Natalie Tay
b0ab1b2321
FEATURE: Show translated category names from localizations table if they exist for the user locale (#32380)
This PR adds category localization support to core.

- Depends on https://github.com/discourse/discourse/pull/32378
- Creates the required table `category_localizations`
- Makes use of the site category cache to display localized categories
- Supports name and description
- This does not yet include /categories page. (coming in a next PR)

## Before

<img width="1089" alt="Screenshot 2025-04-21 at 4 31 43 PM"
src="https://github.com/user-attachments/assets/9e49b21b-b16a-43d2-9b16-0fd0324a21ca"
/>

## After

<img width="1085" alt="Screenshot 2025-04-21 at 4 32 42 PM"
src="https://github.com/user-attachments/assets/7bfa21a2-6df2-4cdf-a00a-d044c3526a40"
/>
2025-04-22 15:13:19 +08:00
Ted Johansson
e8997b6202
DEV: Add Settings tab to admin Badges page (#32251)
This change does two things:

Modernizes the admin badges UI implementation. (Routes + controllers → components + services.)
Adds a Settings tab to the new badges page.
For all intents and purposes, this change is a lift-and-shift modernization. The addition of the settings tab is trivial once that is covered.
2025-04-21 09:41:29 +08:00
Martin Brennan
8ccb66a44a
FEATURE: Release admin search for all sites (#32327)
This commit removes the experimental setting controlling
admin search and releases it for all admins. This search
can be triggered with Ctrl+/ or Cmd+/

For more information see
https://meta.discourse.org/t/introducing-comprehensive-admin-search/360157
2025-04-16 16:26:53 +10:00
Juan David Martínez Cubillos
c7d400eda2
FEATURE: Implement Form Template Preview (#32111)
![imagen](https://github.com/user-attachments/assets/db5cf334-6e92-40b6-b93a-5cfa12882e8f)
2025-04-15 23:52:02 -05:00
David Taylor
f0057c7353
DEV: Drop legacy topic-list and raw-handlebars compilation system (#32081) 2025-04-14 10:42:40 +01:00
Ted Johansson
414419b43d
DEV: Add Settings tab to admin Users page (#32255)
This PR adds a Settings tab to the admin Users page, grouping relevant site settings.
2025-04-11 11:10:53 +08:00
Ted Johansson
db214a38a2
DEV: Add Content admin config page (#32194)
This PR adds a dedicated page for Content related site settings. It has four different site setting tabs.
2025-04-10 11:20:22 +08:00
Ted Johansson
7f851c416d
DEV: Add Dashboard settings tab to Reports page (#32235)
This change adds a Dashboard settings tab to the Reports page.
2025-04-10 10:41:12 +08:00
Ted Johansson
b1e97d9ebd
DEV: Add e-mail site settings to e-mail admin page (#32214)
Follow-up to #32211. This PR adds a Settings tab to the Email settings admin page. The current Settings tab is renamed to Server settings.
2025-04-08 18:59:50 +08:00
Ted Johansson
ec0b6affd7
DEV: Add Site admin admin config page (#32196)
This PR adds a dedicated admin config page for Site admin related site settings.
2025-04-08 09:52:42 +08:00
Ted Johansson
464726d973
DEV: Add Interface and layout admin config page (#32197)
This PR adds a dedicated admin settings page for Interface & layout related site settings.
2025-04-08 09:22:10 +08:00
Ted Johansson
5f0b186061
DEV: Add User defaults admin config page (#32195)
This PR adds a dedicated admin config page for User defaults related site settings.
2025-04-08 09:21:54 +08:00
Ted Johansson
cfd216598d
DEV: Add Analytics and SEO admin config page (#32190)
This PR adds a dedicated page for Analytics and SEO related site settings.
2025-04-07 16:15:37 +08:00
Krzysztof Kotlarek
928f9175f0
FEATURE: fonts section for branding page (#32031)
New configure fonts section was added. Because now we have two sections
completed (logos and fonts), new /branding page was introduced and old
/logo and /font pages was removed.

When text size is changed, modal is displayed to ask if preferences of
existing users should be retrospectively updated.



https://github.com/user-attachments/assets/f6b0c92a-117f-4064-bd76-30fa05acc6d3

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2025-04-07 10:28:42 +08:00
Martin Brennan
b40f184a70
UX: Make admin search setting visible (#32142)
We are ready to start rolling this out to more
people and announce it on Meta.
2025-04-03 17:03:53 +10:00
Krzysztof Kotlarek
35850b35f4
FIX: invite_link_max_redemptions_limit min 1 (#32118)
When the feature was designed in 2020, it had two options: invite a
single user or generate a link.

https://github.com/discourse/discourse/pull/9813

With simplified interface, it makes sense to allow to send a link to
just 1 user.

Meta:
https://meta.discourse.org/t/unable-to-restrict-invite-link-to-one-person/359872
2025-04-02 10:54:46 +08:00
Sérgio Saquetim
083082f328
DEV: Remove the legacy widget post menu code (#31211)
https://meta.discourse.org/t/341014
2025-04-01 16:03:58 +01:00
David Taylor
387dc8c255
DEV: Drop 'cache_onebox_response_body' feature (#32035)
This is a hidden site setting which has never been publicized, and is
not recommended for use. If we decide to add a feature like this in
future as a visible site setting, it would need many more safeguards to
prevent misuse.
2025-03-28 10:55:29 +00:00
Sérgio Saquetim
c671cfff84
DEV: Upgrade the post widgets to Glimmer components (#31375)
Co-authored-by: David Taylor <david@taylorhq.com>
2025-03-26 18:53:46 -03:00
Penar Musaraj
6aaddcf381
FEATURE: enable full page login by default (#31771)
This switches the signup/login UI to the full page experience by
default. This has been in use by many sites for multiple months and we
have ironed out many fixes in the meantime.

The `full_page_login` setting is also marked for removal in about
1.5mths, by the end of April 2025.
2025-03-25 13:43:51 -04:00
Osama Sayegh
f7f7642ae0
UX: Improve naming for anonymous mode settings (#31832)
This PR renames a couple of settings related to anonymous mode:

1. `allow_anonymous_posting` → `allow_anonymous_mode`. This setting is
used as a switch for the entire anonymous mode feature, so it makes
sense to give it a generic name that better reflects what the setting
does.
2. `allow_anonymous_likes` → `allow_likes_in_anonymous_mode`. The new
name is clearer and will match a new setting that we'll add to allow
anonymous users to post in chat.

Internal topic: t/148088.
2025-03-21 04:54:06 +03:00
Ted Johansson
c0630dbee4
DEV: Make group auto e-mail domain limit configurable (#31873)
We currently limit the number of characters in the bar-separated list of auto-membership e-mail domains. We want to make this configurable through site settings.

After this change, we limit the length of each individual domain, and enable the number of domains to be configured through a hidden site setting.

The original limit is there to prevent DoS, since a TEXT column can take up to 1Gb. With this new limit we're still at a maximum of around 10kb.
2025-03-19 14:33:50 +08:00
Martin Brennan
64f1b97e0c
FEATURE: Add welcome banner to core (#31516)
This is a stripped-back version of the Search Banner
component https://meta.discourse.org/t/search-banner/122939,
which will be renamed to Advanced Search Banner,
see https://github.com/discourse/discourse-search-banner/pull/84.

This welcome banner interacts with the header search.
When `search_experience` is set to `search_field`, we only
show the header search after the welcome banner scrolls
out of view, and vice-versa.

Only new sites will get this feature turned on by default,
existing sites have a migration to disable it.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2025-03-17 12:18:08 +10:00
Osama Sayegh
25e8b5af9f
FEATURE: Introduce new color palettes config area (#31742)
As part of the theme/color palette overhaul project, we're introducing a
new admin page for editing color palettes. The new page is located at
`/admin/config/colors/:id`. It's linked from anywhere, but it will be
linked in the sidebar as we progress more in the overhaul project.

Related PRs: https://github.com/discourse/discourse/pull/30893
https://github.com/discourse/discourse/pull/30915
https://github.com/discourse/discourse/pull/31328.

Internal topic: t/148628.
2025-03-12 16:57:31 +03:00
Krzysztof Kotlarek
54771b5949
FIX: remove admin_sidebar_enabled_groups setting (#31693)
Old no sidebar admin panel is deprecated and admin sidebar is not
experimental anymore. Therefore, old setting should be deleted.
2025-03-11 11:41:38 +11:00
Krzysztof Kotlarek
dbba838ef4
FEATURE: rebranded admin logos settings (#31554)
Redesigned page to update site logos. `AdminBrandingLogoFormComponent`
is attached to the old logos page and the new branding page. In the next
steps, branding will replace the logos page.

A new `AdminConfigAreaCardSection` component was added hidden and less
frequently used settings.

An image placeholder was also needed because many additional logos have
a fallback to the site logo.

Finally, `twitter_summary_large_image` was renamed to
`x_summary_large_image`.

Desktop
![localhost_4200_admin_config_branding
(4)](https://github.com/user-attachments/assets/b6ae5266-72f6-4582-b0ef-4d05545943e8)


Mobile
![localhost_4200_admin_config_branding(iPhone 12 Pro)
(3)](https://github.com/user-attachments/assets/bf329a5c-9ba0-4d88-b30d-e8f1feb02e31)
2025-03-04 12:51:27 +11:00
Jarek Radosz
454dd1ea51
DEV: Change glimmer_topic_list_mode to enabled by default (#31585)
https://meta.discourse.org/t/343404
2025-03-03 18:07:15 +01:00
David Battersby
3efbd95ad8
FEATURE: add search field to header (#31447)
Adds a search field to the page header on desktop that is controlled by
a site setting (within Search).

The search field toggles back to the search icon (magnifying class) when
the header is minimized (ie. scrolling in topics) and restores to the
field again when header is no longer minimized.

On mobile the search experience is still the same.
2025-02-28 12:47:09 +04:00
Martin Brennan
e26a1175d7
FEATURE: Initial version of experimental admin search (#31299)
This feature allows admins to find what they are
looking for in the admin interface via a search modal.
This replaces the admin sidebar filter
as the focus of the Ctrl+/ command, but the sidebar
filter can also still be used. Perhaps at some point
we may remove it or change the shortcut.

The search modal presents the following data for filtering:

* A list of all admin pages, the same as the sidebar,
   except also showing "third level" pages like
   "Email > Skipped"
* All site settings
* Themes
* Components
* Reports

Admins can also filter which types of items are shown in the modal,
for example hiding Settings if they know they are looking for a Page.

In this PR, I also have the following fixes:

* Site setting filters now clear when moving between
   filtered site setting pages, previously it was super
   sticky from Ember
* Many translations were moved around, instead of being
   in various namespaces for the sidebar links and the admin
   page titles and descriptions, now everything is under
   `admin.config` namespace, this makes it way easier to reuse
   this text for pages, search, and sidebar, and if you change it
   in one place then it is changed everywhere.

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-02-21 11:59:24 +10:00
Krzysztof Kotlarek
2763e1726e
FEATURE: display process information on flag modal (#31300)
Information about the process is displayed on top of the flag modal.

In addition `allow_tl0_and_anonymous_users_to_flag_illegal_content` site
setting was renamed to `allow_all_users_to_flag_illegal_content` as it
is more descriptive.

<img width="629" alt="Screenshot 2025-02-12 at 3 58 12 pm"
src="https://github.com/user-attachments/assets/67c74ebc-6771-490d-b2c4-cbec25db8128"
/>
<img width="642" alt="Screenshot 2025-02-12 at 3 58 04 pm"
src="https://github.com/user-attachments/assets/5e4b8c84-601a-40c2-812f-b73d2b88a549"
/>
2025-02-14 11:26:20 +11:00
Sérgio Saquetim
e7c2c92961
DEV: Change the default value of glimmer_post_menu_mode to enabled (#31297) 2025-02-12 17:05:39 -03:00
David Taylor
f5c2a4dbbd
DEV: Drop experimental enable_diffhtml_preview setting (#31306)
This was intended to provide a better UX for interactive elements in the
composer preview. However, the morphing strategy has irreconcilable
conflicts with our `decorateCooked` API, and so we have been unable to
enable this by default.

Going forward, we're focussing efforts on the WYSIWYG composer to
provide this kind of smooth UX, so we're dropping the
`enable_diffhtml_preview` approach.
2025-02-12 15:58:30 +00:00
Ted Johansson
b3a686ca4e
DEV: Move image auto-grid back to experimental (#31296)
This feature was originally experimental. We made it baseline in #29572, however this was met with some pushback, so we have decided to make it experimental again.

The original PR couldn't be reverted, but this one basically does the same by cherry-picking all the changes back.
2025-02-12 11:18:24 +08:00
Martin Brennan
43e8172ebc
UX: Add confirmation to crawler settings (#31269)
Adds a site setting confirmation to the following
settings, since they can be dangerous if changed
incorrectly:

* allowed_crawler_user_agents
* blocked_crawler_user_agents
* slow_down_crawler_user_agents
2025-02-11 13:02:26 +10:00
Jan Cernik
42447770bf
FIX: Automatic auth flow with full page login/signup V3 (#31072)
This adds back the fixes from
https://github.com/discourse/discourse/pull/30928 that were reverted by
https://github.com/discourse/discourse/pull/30960.
2025-02-07 10:40:45 -05:00
David Taylor
6b6b31a97f
FEATURE: Allow admins to opt-in to seamless redirects on /auth/* (#31235)
By default, when multiple login providers are enabled, Discourse
requires user interaction before triggering an external auth flow. This
is defense-in-depth against "Login CSRF" attacks.

This commit introduces a setting to control this behavior, so that it
can be disabled when admins fully trust the downstream systems, and need
an interaction-free login flow on a site with multiple login providers.

Default behavior remains unchanged.
2025-02-07 11:43:39 +00:00
Osama Sayegh
284e708e67
FEATURE: Dark/light mode selector (#31086)
This commit makes the
[color-scheme-toggle](https://github.com/discourse/discourse-color-scheme-toggle)
theme component a core feature with improvements and bug fixes. The
theme component will be updated to become a no-op if the core feature is
enabled.

Noteworthy changes:

* the color mode selector has a new "Auto" option that makes the site
render in the same color mode as the user's system preference
* the splash screen respects the color mode selected by the user
* dark/light variants of category logos and background images are now
picked correctly based on the selected color mode
* a new `interface_color_selector` site setting to disable the selector
or choose its location between the sidebar footer or header

Internal topic: t/139465.

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-02-07 03:28:34 +03:00
Ted Johansson
997a9e3de9
FEATURE: Allow excluding uploads from min post length requirement (#31194)
Currently, the markdown for uploads is counted towards post minimum length requirements. This change introduces a site setting `prevent_uploads_only_posts` which can be flipped to exclude upload segments from the calculation.
2025-02-06 10:26:23 +08:00
Martin Brennan
1ab5bc2bad
UX: Remove enable_quote_copy site setting (#31191)
This setting was introduced a year ago for
51016e56dd99a9ad4bd82cdc6c0cf968754c70ed, which was
formerly a design experiment.

In practice on our hosting, noone has ever disabled this
setting, and it's for a useful feature. There is no
point keeping it.


![image](https://github.com/user-attachments/assets/97418e7e-2311-4ba0-bf18-41f3f55ab001)
2025-02-06 10:31:10 +10:00
Renato Atilio
0e61565b2b
FEATURE: introduce a ProseMirror editor (#30815)
This is the first in a series of PRs to introduce a
ProseMirror-based
WYSIWYM editor experience
alongside our current textarea Markdown editor.

Behind a hidden site setting, this PR adds a toggle to the composer
toolbar, allowing users to switch between the two options.

Our implementation builds upon the excellent ProseMirror and its
non-core Markdown
module, using the
module's schema, parsing, and serialization definitions as the base for
further Discourse-specific features.

An extension API is included to enable further customizations.

The necessary extensions to support all Discourse's core and core
plugins features **will be implemented in subsequent PRs**.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-02-04 14:37:18 -03:00
Martin Brennan
5bc7371192
FEATURE: Localization admin settings config page (#31085)
This commit adds a new Localization config page for
admins, as a basic filtered site setting page similar
to Legal and Notifications. Included settings are:

* default locale
* allow user locale
* set locale from accept langauge header
* onebox locale
* display local time in user card
* discourse local dates enabled
* support mixed text direction
* unicode usernames
* allowed unicode username characters
2025-01-31 12:55:30 +10:00
Sam
29e48a6478
DEV: remove experimental lightbox (#30973)
Experimental lightbox did not pan out, we are rolling it back so we can
start again from base principles.
2025-01-29 16:08:21 +11:00
Krzysztof Kotlarek
cfcc60f847
FEATURE: new fast_typing_threshold site setting (#30865)
Rename `min_first_post_typing_time` to `fast_typing_threshold` and
provide admin 4 options:
- disabled
- low - 1 second
- standard - 3 seconds
- high - 5 seconds

Related PRs:
- https://github.com/discourse/discourse-zoom/pull/112
2025-01-28 09:53:03 +11:00
Martin Brennan
78a857931c
FEATURE: Improve wizard font selection and set Inter as default font for new sites (#30974)
This commit narrows down the list of fonts we offer
in our setup wizard and simplifies things to only
show a single font dropdown. This selection will then
set the `base_font` and `heading_font` site setting to
the same value.

For existing sites that may have set different values,
we will still show 2 dropdowns when visiting the wizard.

We are also changing our default font to the more modern
selection Inter, replacing Arial. Arial is very dependent
on system installed fonts, whereas Inter we can package
to everyone in Discourse.

Finally, for existing sites that have not changed their default
from Arial, we will keep that value via a migration so we do
not surprise site owners with a completely new font.
2025-01-27 11:29:55 +10:00
Natalie Tay
8d45755a06
FEATURE: Allow setting locale from 'lang' param (#30952)
As we start to translate more pages, we'll need a way for other sites to
link back to our translated topics.

This commit gives us the ability to use the "lang" URL param to define what
language a site should be in.

Related: https://github.com/discourse/discourse-translator/pull/199
2025-01-24 11:53:13 +08:00
marstall
2663cb86ae
FEATURE: add new hidden site setting to show full names in user card
adds a hidden site setting, "prioritize_full_names_in_ux", whose effect is to prefer full names in user-menu notifications

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2025-01-23 12:26:59 -05:00
Osama Sayegh
10f34ddf86
DEV: Backend support for light/dark mode in color palettes (#30893)
We're embarking on a project for overhauling the color palette and theme
systems in Discourse. As part of this project, we're making each color
palette include light and dark modes instead of the status quo of
requiring 2 separate color palettes to implement light and dark modes.

This commit is a first step towards that goal; it adds a code path for
generating and serving `color_definitions` stylesheets using the
built-in dark variant of a color palette. All of this code path is
behind a default-off site setting `use_overhauled_theme_color_palette`,
so there's no change in behavior unless the setting is enabled.

Internal topic: t/141467.
2025-01-23 15:54:49 +03:00
Natalie Tay
daab816a37
DEV: Unhide the set_locale_from_cookie setting to allow site translations (#30924)
Related: https://github.com/discourse/discourse-translator/pull/198

The new experimental feature on discourse-translator requires this
`SiteSetting.set_locale_from_cookie` to be set. This comment unhides the
existing site setting.
2025-01-23 11:05:29 +08:00
Krzysztof Kotlarek
029bd6feda
FEATURE: setting allowing tl0/anonymous flag illegal content (#30785)
The new site setting `allow_anonymous_and_tl0_to_flag_illegal` allows
tl0 users to flag illegal content. In addition, anonymous users are
instructed on how to flag illegal content by sending emails.

Also `email_address_to_report_illegal_content` setting is added. If not
provided, then the site contact email is used.
2025-01-17 08:57:44 +11:00
Martin Brennan
125e686bf2
FIX: Do not allow_any on fonts site_settings (#30780)
Both heading_font and body_font should not allow
additional user-defined values, these are lists with
predefined choices. The UI already prevents this
because the font selector dropdown is unique, but
we want to make sure the setting definition reflects
this too.
2025-01-15 14:13:34 +10:00