7431 Commits

Author SHA1 Message Date
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
Discourse Translator Bot
37e72e9ad7
Update translations (#31994) 2025-03-25 17:22:59 +01:00
Krzysztof Kotlarek
9db89c20f7
FEATURE: send email to deleted user (#31947)
When a user post is flag as spam and the moderator deletes the user, we
should send email to the affected user.
2025-03-24 14:45:25 +08:00
Gary Pendergast
b77d0f7589
FEATURE: Sync Reviewable Status (#31901)
When multiple admins are working in the review queue, it's quite easy for two people to try and handle the same reviewable at the same time. This change addresses the two major situations where this can occur.

The `ReviewableClaimedTopic` model has been extended to allow the system to mark a reviewable as claimed as soon as the first moderator starts handling the reviewable, even when the `reviewable_claiming` setting is disabled. This ensures that reviewable actions with client-site activity (for example, `agree_and_suspend`) will lock the reviewable before another moderator starts working on it.

When someone handles handles a reviewable, we now use `MessageBus` to inform other moderators that it's changed. If any of the other moderator have that reviewable open (either individually, or on the list screen), it will automatically refresh that data.
2025-03-24 14:27:18 +11: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
David Taylor
38872b5b9b
FEATURE: Introduce warning banner for Safari 15 deprecation (#31928)
Ref https://meta.discourse.org/t/safari-15/358131
2025-03-20 15:03:24 +00: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
625d086f35
UX: Themes & components I18n adjustments (#31897)
Moves the Themes & components I18n text to use the
admin > config structure, so the description shows
up properly in admin search
2025-03-19 13:24:05 +10:00
Osama Sayegh
a34e0433cc
FEATURE: Allow typing/pasting colors in palette editor (#31811)
Follow-up to https://github.com/discourse/discourse/pull/31742

Adding a text input field to type in or paste color values can be useful
when creating/editing a color palette with specific colors.
2025-03-19 03:45:22 +03:00
moin-Jana
a46d2ef40c
DEV: Pluralize email domain count string (#31877)
The string introduced in
https://github.com/discourse/discourse/pull/31854 included a count but
was not pluralized. Even though the singular form may not be used in
English, proper pluralization is necessary for other languages. Some
languages have different plural forms depending on the number, so
explicitly defining pluralization ensures accurate translations.
2025-03-18 18:25:13 +01:00
Discourse Translator Bot
464da9a4fb
Update translations (#31875) 2025-03-18 15:08:14 +01:00
Ted Johansson
1a7303a35e
FIX: Amend broken group automatic member dialog (#31854)
When creating or editing a group, we are meant to show a dialog telling the admin how many members will be automatically added.
2025-03-18 19:37:37 +08:00
Gary Pendergast
6cd282eeb3
FEATURE: Display a toast popup after completing a review action. (#31786)
When performing an action in the review queue, this change makes two improvements:

- The buttons on the reviewable item are disabled, so you can't accidentally multi-click.
- A toast is displayed when the action is complete, as a success indication.
2025-03-18 11:26:59 +11: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
David Battersby
ae08e22415
FIX: remove abandon draft dialog (#31828)
Now that we support multiple drafts, we can avoid the extra draft check
within composer when creating a new topic or reply. For posts, we
already autoload the existing draft into composer when the user tries to
create a new reply, so there is no longer a need for the abandon draft
dialog.

Drafts can still be deleted by closing the composer (using a different
dialog) or manually via the User Drafts page.

This change also correctly sets the draft key within composer actions
when switching from a post reply to a linked topic.
2025-03-14 16:15:33 +04:00
Osama Sayegh
f87e5aab0b
UX: Tweaks to the theme/component pages when using admin sidebar (#30953)
There are a number of minor changes in this commit :

1. Combine the "Themes" and "Components" links in the admin sidebar into
a single tab labelled "Themes and components"
2. The combined tab links to the `/admin/config/customize/themes` page
(titled as "Themes and components")
3. Add a new "Components" tab to the "Themes and components" page.
There's already an existing "Themes" tab
4. Add a "back to" link at the top of individual theme/component page to
navigate back to the respective tab in the "Themes and components" page
5. Remove the themes/components list/sidebar that currently serves for
navigating between themes/components
6. Remove the header in the theme/component page

Changes 4–6 apply only if the admin sidebar is enabled; they have no
effect otherwise.

Internal topic: t/146006.
2025-03-13 15:34:17 +03:00
Renato Atilio
159aa43cfe
UX: add title and aria-label to md/rich editor toggle (#31784) 2025-03-12 20:53:09 -03: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
Martin Brennan
cf4d80d0b3
FIX: Notification email CTA by system user (#31726)
Followup https://github.com/discourse/discourse/pull/31505/

When sending notification emails for system user responses for PMs,
we removed the part of the CTA where it says "to respond to xyz" in a
previous commit.

This commit takes it slightly further -- we now only show a "Visit
Topic"
or "Visit Message" button if the PM notification is from a system user,
it's a bit cleaner.

This commit also adds more in-depth tests, and refactors the message
builder a little.
2025-03-12 13:49:12 +10:00
Discourse Translator Bot
d3c68ef1a7
Update translations (#31747) 2025-03-11 17:47:42 +01:00
Ella E.
6d92165ae7
UX: Improve image upload component (#31668)
### Before
<img width="785" alt="image"
src="https://github.com/user-attachments/assets/0e9c7f5d-a53d-4768-b53e-2c2957a54625"
/>

### After
<img width="736" alt="image"
src="https://github.com/user-attachments/assets/bc3e41aa-60d0-4659-a3c3-74783402641a"
/>
2025-03-10 23:03:39 -06:00
Ted Johansson
0dc39fd560
UX: Show scope mode in API key list (#31605)
**Note:** Do not merge before the backfill (#31606) is merged.

### What is this change?

We're now storing the selected API key scope mode in the back-end, and
can display it in the API key list.

**Screenshot:**

<img width="551" alt="Screenshot 2025-03-04 at 7 27 42 PM"
src="https://github.com/user-attachments/assets/9f234242-cfaa-4a2c-93e9-740770bd9944"
/>
2025-03-11 10:00:42 +08: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
moin-Jana
3b8b21631b
UX: Remove fa- prefix in svg_icon_subset setting description (#31581)
Based on the discussion in
https://github.com/discourse/discourse-social-share/pull/24#discussion_r1975633090
I think "fa-" is no longer needed in core either.
2025-03-06 17:27:48 +11:00
Ted Johansson
828fcb1ad3
DEV: Add rake task to bulk delete posts (#31642)
Same as #31576, but in that one I added some support files that turned out to be unnecessary and broke the build. So this is the re-do. 🙏
2025-03-05 09:31:23 +08:00
Discourse Translator Bot
b467fe1347
Update translations (#31617) 2025-03-04 16:12:11 +01:00
Ted Johansson
7d4e4e9422
Revert "DEV: Add rake task to bulk delete posts" (#31607)
Breaks the build. Need to update the spec.
2025-03-04 20:54:03 +08:00
Ted Johansson
42c4427cb1
DEV: Add rake task to bulk delete posts (#31576)
This PR adds a destroy:posts rake task that can be used to hard-delete a list of posts. Useful for dealing with large amounts of spam that has been soft deleted and needs to go.

Notes:

Works on both non-deleted and soft-deleted posts. (We might want to change this to work on only soft-deleted posts?)
Works exclusively on post IDs. We can't mix topic and post IDs as they might clash, and we have no way of resolving that ambiguity.
Accepts either a rake-style array of IDs or, more conveniently, you can pipe the argument in through STDIN.
Added a confirmation step since it's a fairly destructive operation.
2025-03-04 17:29:38 +08:00
Gary Pendergast
9abeff460c
FEATURE: Display the Watched Words that caused a post to be flagged. (#31435)
When a post is flagged due to matching watched words, it can be difficult to know what you're looking for, particularly if you have a lot of watched words built up over a long period of time.

This change stores the list of matched words, and later displays them in the review queue, listing which Watched Words were responsible for the flag. Because watched words can change, this is recorded at the time the post is flagged. For posts that were flagged prior to this feature landing, it tries to guess the relevant words based on the current Watched Words set.
2025-03-04 17:22:12 +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
David Taylor
1bd61630ef
UX: Simplify admin theme editor (#31561)
- Hide seldom-used fields behind an 'advanced' checkbox. This replaces
the old 'only show edited' checkbox, since the number of fields shown by
default is now so small that 'only show edited' isn't useful.
Mobile/desktop targets are included in that list because we now
recommend people use CSS breakpoints for handling different device
sizes.

- Update names & descriptions of fields to be more descriptive

- Show the descriptions of fields at the top of the editor. Previously
they were only shown as tooltips.

Before:
<img width="1109" alt="SCR-20250228-lunn"
src="https://github.com/user-attachments/assets/8faebba1-39c1-491a-b236-411cfb6d9c74"
/>

After, default view:
<img width="1102" alt="SCR-20250303-kayr"
src="https://github.com/user-attachments/assets/1e483845-613f-44d6-83d6-ade628251fe5"
/>

After, advanced view:
<img width="1122" alt="SCR-20250303-kazn"
src="https://github.com/user-attachments/assets/45b8933d-2271-42ba-b5b4-81b326709adb"
/>
2025-03-03 12:20:11 +00:00
Joffrey JAFFEUX
d38acc5df1
DEV: discourse-emojis gem (#31408)
This commit moves most of emoji logic into the discourse-emojis gem:
https://github.com/discourse/discourse-emojis/

Most notably:
- images are now symlinked from the gem
- the gem provides path to the json files

Search aliases have also been made asynchronous and memoized. When you
will search for an emoji we will now load the aliases and store the list
for future use.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-03-03 13:09:08 +01:00
Hugh Lashbrooke
a5c21a92b2
UX: Add recommended image size for category logos (#31574)
This adds a description to the category logo image fields that informs users of the recommended image aspect ratio and minimum size to upload.
2025-03-03 20:53:36 +11:00
Martin Brennan
8325d42e56
FEATURE: Experimental admin search refinements round 1 (#31441)
Followup e26a1175d7c33746bddbc858ad89e68cc14beefe

Adds extra functionality and tests for the admin search modal.

* Show third level plugin config pages in search, e.g.  AI Usage
* Remember last used search filters
* Allow navigating search results with keyboard, using tab or up/down
and enter to go to result
* Add a placeholder beneath search input to tell the admin what to do
* Add a full page search at `/admin/search` which can be reached from
pressing Enter on the search input
* Add specs for modal and full page search
* Change admin sidebar filter "no results found" to point to full page
search
* Add keyboard shortcut help to modal for admin search
2025-03-03 13:56:07 +10:00
Kris
5312550bf9
A11Y: read who liked/read a post when count clicked (#31549)
This change adjusts the markup and aria tags so that the like and read
counts on posts will read who liked/read when clicked. Previously this
content was inaccessible to screen readers.


![image](https://github.com/user-attachments/assets/d205eb9a-ffa9-4955-8191-7a0411b23c46)

This change required: 

* Keeping the empty containing divs present and adding `aria-live` tags
(if the `aria-live` tag isn't initially present in the DOM, it will not
read changes to the content within)
* Adjusting some styles to avoid extra margin from the empty div (added
a conditional class to add the margin back when expanded)
* Cleaned up the aria tags, we don't need to hide the "liked this" text,
as it will be read naturally after the usernames like "username1,
username2, liked this" This allows us to remove the screenreader only
description.
* Removed "Click to view" from the button label, the interactivity is
inherent because the screenreader identifies it as a button
2025-02-28 09:15:04 -05: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
Joffrey JAFFEUX
3d515b9dd8
DEV: calendar control for form-kit (#31506)
This commit introduces a new `Calendar` control for form-kit. This
control will render a date picker and a time input. On mobile the date
picker will be replaced by a native input of type date.

The following validation options have also been added:
- `dateAfterOrEqual`
- `dateBeforeOrEqual`

The control has two options:

- `includeTime` - show or hide the time input (default true)
- `expandedDatePickerOnDesktop` - show an expanded datepicker on
desktop, or not (default true)
2025-02-26 11:23:07 +01:00
Discourse Translator Bot
61d8cce569
Update translations (#31501) 2025-02-25 15:11:27 +01:00
Osama Sayegh
b02e87b8c4
DEV: Introduce ColorPaletteEditor component (#31328)
As part of the theme/color palette overhaul project, we're redesigning
the UI for the editing color palettes. This commit introduces a new
`ColorPaletteEditor` component that encapsulates all the logic and
interface for editing color palettes in the redesigned admin interface.
This component isn't used anywhere at this moment, but it will be once
we start introducing the rest of the redesigned interface.
2025-02-25 07:58:04 +03:00
Discourse Translator Bot
122e1384bc
Update translations (#31470) 2025-02-24 15:11:55 +11:00
Krzysztof Kotlarek
d50bba3bdc
DEV: Allow SiteSetting::Update service to bulk update (#31438)
Previously, the SiteSetting::Update service allowed to update of a
single site setting. In the About controller, we were using the loop
through all settings -
https://github.com/discourse/discourse/blob/main/app/controllers/admin/config/about_controller.rb#L39

It is suboptimal because if the 3 first settings are saved and the
fourth is invalid, we will end with partially updated data.

Changing SiteSetting::Update to accept hash means that we will check
upfront if none of the settings are hidden or invalid and update all or
none.

Custom policies are used to report which settings are failing.
2025-02-24 11:09:44 +11:00
David Taylor
4461256f9e
FEATURE: Allow a gjs initializer to be authored in local themes (#31423)
Previously, the only way to author js/hbs via the admin panel was to use
`<script>` tags. This strategy is not pretty, and doesn't provide access
to proper ES module imports or gjs `<template>` syntax.

Our recommendation for most themes is still that they should be authored
using a proper IDE, the `discourse_theme` CLI, and version-controlled
using git. However, we understand that this isn't a good fit for
everyone, and that there's still a place for simple
admin-panel-ui-authored themes.

This commit introduces a "JS" tab in the admin theme editor, which
corresponds to a file named
`discourse/api-initializers/theme-initializer.gjs` in the theme. This
means that everyone will be able to move towards the more modern
syntaxes, and away from the old `<script>` patterns.
2025-02-21 09:59:41 +00: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
Keegan George
d1f3b2fc45
FIX: Drafts should not have an expand button (#31424)
## 🔍 Overview

Currently editing a long post and it existing as a draft in the user
stream results in the expand post button being shown in the stream.
However, expanding does nothing and results in errors because it cannot
make the request. This update applies a fix to ensure that long drafts
on edits do not have an expand button

## 📸 Screenshots

### ←Before
![Screenshot 2025-02-20 at 11 14
32](https://github.com/user-attachments/assets/c090d025-6efb-458b-bb6b-4d12e0b214ae)

### →After
![Screenshot 2025-02-20 at 11 14
48](https://github.com/user-attachments/assets/077a1a6a-c6f3-445a-9d65-357acab195f7)
2025-02-20 12:28:49 -08:00
Gary Pendergast
29a8c6ee49
DEV: Add a new type_source field to the Reviewable model. (#31325)
This change adds a new `type_source` field to the `Reviewable` model, indicating whether the Reviewable type was registered by `core`, a plugin, or an `unknown` source.

When a plugin that registered a Reviewable type is disabled, this allows us to tell the user which plugin they need to re-enable to handle any orphan reviewable items.
2025-02-20 09:09:47 +11:00
Bianca Nenciu
8be39c5bf0
FIX: Improve group name validation (#31315)
This commit improves a few aspects regarding group name validation:

- `min_username_length` and `max_username_length` are validated with the
  shortest and longest names of users and groups

- skip validation of the group name when the group is an automatic one
2025-02-19 19:33:46 +02:00
David Taylor
90d6747248
DEV: Remove unused 'advanced' theme editor mode (#31387)
This mode was introduced briefly in 2019, and allowed editing theme
settings/translations/extra-css from the admin panel UI. But then we
decided that making it possible to edit these fields via the UI
conflicted with our recommendation of using a proper IDE,
discourse_theme, and version-controlled themes. The feature was disabled
in core, and theme-creator uses a monkey-patch to expose it.

Even for the current use in theme creator, there are now major styling
and functionality issues, because this feature is not visible or tested
in core. For example: it doesn't allow editing 'extra JS' fields, which
are arguably the most common.

This commit removes the code for this 'advanced' mode, in advance of
some more extensive modernization of this component/model.
2025-02-19 12:28:34 +00:00
Discourse Translator Bot
b37b51d15f
Update translations (#31377) 2025-02-18 14:51:47 +01:00
Martin Brennan
b471e3d5ba
FEATURE: Allow showing only experiments on "What's new?" (#31347)
This commit allows admins to filter the list of feature
feed items on the "What's new?" page to _only_ show experiments.

This is useful to both find existing experiments they may have
enabled, and to get a better overview of new ones they would
like to try.

This will eventually not be required when we build a dedicated
config page for experiments.
2025-02-14 13:30:37 +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