Commit Graph

9765 Commits

Author SHA1 Message Date
Ted Johansson
b1bae9b785
FIX: Add back missing API key 'peek' step (#30683)
In #30096 we converted the API keys UI to follow the new admin UI guidelines.

During this conversion, the step where you get a chance to copy the API key after creating, was lost due to a rebase mistake.

This re-introduces it.
2025-01-10 10:21:22 +08:00
Martin Brennan
f4b417462b
UX: Final pass of admin setting pages (#30682)
This commit finalises the admin setting page consistency
efforts by:

* Converting all route templates into .gjs
* Adding `@hideTabs={{true}}` for all the page headers so we
  don't show a border line when it's not needed
* Introduce `@showBreadcrumb` and default to true for
  AdminAreaSettings, for all these pages the Settings part of
  the breadcrumb is redundant
2025-01-10 11:03:07 +10:00
Gary Pendergast
f53c734ba6
FEATURE: Add a onebox_locale site setting. (#30655)
Following on from f369db5ae9, this change adds the ability to choose a custom locale to send to onebox providers.

If this setting is left blank, it will fall back to using default_locale.
2025-01-09 14:11:37 +11:00
Ted Johansson
590b3e11fb
DEV: Convert admin API keys to conform to UI guidelines (#30660)
Re-opening of #30096. It was reverted because it was missing a sidebar link to Webhooks in the admin panel.
2025-01-09 10:57:40 +08:00
Gary Pendergast
8fea8e846f
UX: Use FontSelector for displaying font-related settings. (#30636)
3135f472e2 added a nifty new FontSelector component, which creates a dropdown where each item is styled in the font that it corresponds to.

This change uses the new component to style the base_font and heading_font site setting selectors, too.
2025-01-09 09:57:38 +11:00
Mark VanLandingham
4da7904ffd
REVERT: "DEV: Convert admin API keys to conform to UI guidelines"
This reverts commit d9ddc25808.

I noticed that Webhook admin UI is now inaccessible through the subheader
2025-01-08 11:03:40 -06:00
David Taylor
6330e6ceae
DEV: Set glimmer-topic-list to 'auto' by default (#30582)
This will cause the glimmer topic-list to be enabled for sites with compatible customizations. Incompatible customizations will print a deprecation message to the console, along with a link to more information.

Also cleans up a handful of specs/behaviour which were revealed by switching the default.

More details at https://meta.discourse.org/t/343404
2025-01-08 12:00:56 +00:00
Joffrey JAFFEUX
6740a340ca
DEV: unifies emoji picker (#28277)
The chat emoji picker is renamed emoji-picker, and the old emoji-picker is removed.

This commit doesn't attempt to fully rework a new emoji-picker but instead tries to migrate everything to one picker (the chat one) and add small changes.

Other notable changes:
- all the favorite emojis code has been mixed into one service which is able to store one state per context, favorites emojis will be stored for all topics, and for each chat channel. Meaning that if you always use a specific emoji in a channel, it will only show as favorite emoji in this channel.
- a lot of static code has been removed which should improve initial load perf of discourse. Initially this code was around to improve the performance of the emoji picker rendering.
- the emojis are now stored, once the full list has been loaded, if you close and reopen the picker it won't have to load them again.

List of components:

- `<EmojiPicker />` will render a button which will open a dropdown
- `<EmojiPickerContent />` represents the content of the dropdown alone, it's useful when you want to render a picker from an action which is not the default picker button
- `<EmojiPickerDetached />` just a simple wrapper over `<EmojiPickerContent />` to make it easier to use it with `this.menu.show(...)`

---------

Co-authored-by: Renato Atilio <renatoat@gmail.com>
2025-01-08 11:41:36 +01:00
Ted Johansson
d9ddc25808
DEV: Convert admin API keys to conform to UI guidelines (#30096)
This PR updates the admin API keys page to follow the Admin UI Guidelines. In addition it modernizes all the JavaScript involved in this admin area.
2025-01-08 18:11:38 +08:00
Sam
9cf78ba195
FEATURE: show silence reason when viewing silenced users (#30635)
This adds the Silence Reason column to silenced user lists.

This feature helps combat large spam attacks cause you can quickly see
why a user was silenced and then bulk act on all the silenced users
2025-01-08 16:04:19 +11:00
Discourse Translator Bot
1d7b1e587a Update translations 2025-01-07 21:56:56 +01:00
Martin Brennan
c1a46995a7
FIX: Wizard improvements post-merge part 1 (#30612)
* FIX: Wizard improvements post-merge part 1

Followup 3135f472e2

Fixes the following:

* On mobile, the Styling step was very narrow
* When clicking Next on the Styling step after previously
  selecting Hot, we got an error

Also makes the following UX improvements for the preview:

* Use different topic titles for Latest and Hot
* Also make Hot view and reply numbers higher

This helps differentiate the two previews.

* DEV: Review fixes
2025-01-07 17:01:05 +10:00
Martin Brennan
8185770d63
UX: Admin setting page consistency - Files and Other (#30572) (#30614)
Followup c2282439b3

Make the Files and Other config pages reached from the sidebar
use our consistent site setting page rules.

Also slightly improves AdminAreaSettings so we don't show
"Settings not found" when still loading settings.
2025-01-07 16:39:00 +10:00
Gary Pendergast
ec3b6d57c2
UX: Admin setting page consistency - Onebox (#30611)
Create a basic config page that only contains Onebox-related settings, to replace the "onebox" category view linked to from "Onebox" in the admin sidebar.
2025-01-07 16:21:53 +11:00
Gary Pendergast
46e4290a2a
UX: Admin setting page consistency - User API (#30610)
Create a basic config page that only contains user API-related settings, to replace the "user_api" category view linked to from "User API" in the admin sidebar.
2025-01-07 16:05:54 +11:00
Gary Pendergast
18a8ca38ff
UX: Admin setting page consistency - Rate Limits (#30609)
Create a basic config page that only contains rate limiting-related settings, to replace the "rate_limits" category view linked to from "Rate limits" in the admin sidebar.
2025-01-07 15:46:40 +11:00
Gary Pendergast
ef8b62ae0a
UX: Admin setting page consistency - Developer (#30607)
Create a basic config page that only contains developer-related settings, to replace the "developer" category view linked to from "Developer" in the admin sidebar.
2025-01-07 15:17:36 +11:00
Gary Pendergast
9ffbf93aa7
UX: Admin setting page consistency - Spam (#30606)
Create a basic config page that only contains security-related settings, to replace the "security" category view linked to from "Security settings" in the admin sidebar.
2025-01-07 15:17:15 +11:00
Krzysztof Kotlarek
51a444ab53
FIX: consistent delete button for admin panel (#30592)
Move the delete button to more options to follow guide https://meta.discourse.org/t/creating-consistent-admin-interfaces/326780#p-1605522-h-5d-table-26
2025-01-07 14:05:45 +11:00
Gary Pendergast
d9d1da82cb
UX: Admin setting page consistency - Security (#30598)
Create a basic config page that only contains security-related settings, to replace the "security" category view linked to from "Security settings" in the admin sidebar.
2025-01-07 13:48:40 +11:00
Martin Brennan
70381a1e39
UX: Admin setting page consistency - Experimental (#30572) (#30603)
Followup c2282439b3

Make the Experimental config page reached from the sidebar
use our consistent site setting page rules.
2025-01-07 12:22:10 +10:00
Martin Brennan
30be75460f
UX: Admin setting page consistency - Group permissions (#30528) (#30578)
* UX: Admin setting page consistency - Group permissions (#30528)

Followup c2282439b3 and
21470e4afd

Adds a new "Group permissions" page and group_permissions site
setting area, which shows every single group-based site setting
in the app and core plugins.

Also adds a "trust_levels" area to show on the already moved
admin "Trust level" settings page, since that previously was
showing a mix of trust level settings and allowed group settings.

* DEV: Review fixes
2025-01-07 11:25:21 +10:00
Martin Brennan
9c7b0ddb2f
UX: Update email and security sidebar link copy (#30563)
* UX: Update email and security sidebar link copy

Followup b3fa335c7d

Changes these sidebar links to better reflect
what these pages contain:

* (Email) Server setup → Server setup & logs
* (Security) Staff action logs → Logs & screening

* DEV: Test fix
2025-01-07 09:59:31 +10:00
Martin Brennan
d8692faf00
UX: More translations for admin dashboard (#30570)
Followup 8d5c4ecc33

Implement review suggestions from https://github.com/discourse/discourse/pull/30541
after merge, and also fix other hardcoded strings on this
dashboard.
2025-01-07 09:49:34 +10:00
Osama Sayegh
a15164431b
UX: Minor copy edit for full name requirement setting options (#30581) 2025-01-06 12:55:49 +03:00
Gary Pendergast
f5126199f6
UX: Admin setting page consistency - Navigation (#30574)
Create a basic config page that only contains navigation-related settings, to replace the setting filtered view linked to from "Navigation" in the admin sidebar.
2025-01-06 17:44:33 +11:00
Gary Pendergast
7922e6bfc0
DEV: Restart unicorn when any settings.yml changes. (#30577)
This change expands the matcher added in 02bebb7e91 to include plugin `settings.yml` files as requiring a server restart when they change.

The `Listen.to(only: ...)` filter only matches against filenames (as opposed to full paths) so we can't add a matcher against `plugins/.*/config/settings.yml` to make it explicit.
2025-01-06 17:43:44 +11:00
Martin Brennan
17f4052068
UX: Admin setting page consistency - Search (#30528) (#30573)
Followup c2282439b3

Make the Search config page reached from the sidebar
use our consistent site setting page rules.
2025-01-06 16:36:48 +10:00
Martin Brennan
9a87baaab4
UX: Admin setting page consistency - Legal (#30572)
Followup c2282439b3

Make the Legal config page reached from the sidebar
use our consistent site setting page rules.
2025-01-06 16:08:42 +10:00
Martin Brennan
21470e4afd
UX: Admin setting page consistency - Trust levels (#30571)
Followup c2282439b3

Make the trust levels config page reached from the sidebar
use our consistent site setting page rules.
2025-01-06 15:53:18 +10:00
Gary Pendergast
5463b845e3
UX: Admin setting page consistency - Site Logo (#30567)
Create a basic config page that only contains site logo settings, to replace the "branding" category linked to from "Site logo" in the admin sidebar.
2025-01-06 15:45:19 +11:00
Gary Pendergast
01ceeae2d6
UX: Admin setting page consistency - Fonts (#30564)
Create a basic config page that only contains font-related settings, to replace the setting filtered view linked to from "Font style" in the admin sidebar.
2025-01-06 15:05:40 +11:00
Arpit Jalan
d400fe6623
FEATURE: add new setting to select view for category page on mobile (#30519) 2025-01-06 09:25:25 +05:30
Gary Pendergast
02bebb7e91
DEV: Restart unicorn when site_settings.yml changes. (#30565)
site_settings.yml is read when the server starts, but isn't re-read if it changes. (Eg, adding a new setting, or changing the configuration of an existing setting.)

This change includes site_settings.yml as a file that requires a server restart when it changes. This behaviour obeys the AUTO_RESTART environment variable.
2025-01-06 14:21:35 +11:00
Krzysztof Kotlarek
407fa69778
UX: admins embedding page follows admin ux guideline (#30122)
Conversion of /admin/customize/embedding page to follow admin UX guidelines.
2025-01-06 13:01:08 +11:00
Discourse Translator Bot
6c7eaf99af
Update translations (#30434) 2025-01-03 14:01:32 +01:00
Martin Brennan
8d5c4ecc33
FIX: Dashboard report change tooltip was not translated (#30541)
Use i18n in the JS code instead of concatenating English
strings.

c.f. https://meta.discourse.org/t/titles-on-graphs-in-community-health-dashboard-are-not-localized/302776/8?u=martin
2025-01-03 11:20:29 +10:00
Martin Brennan
3260654505
UX: Admin setting page consistency - Notifications (#30528)
Followup c2282439b3

Make the Notifications config page reached from the sidebar
use our consistent site setting page rules.
2025-01-03 10:34:40 +10:00
David Taylor
a21eefd142
UX: tweak suppress_secured_categories_from_admin setting description (#30532)
https://meta.discourse.org/t/344065/10
2025-01-02 13:10:28 +00:00
Martin Brennan
3135f472e2
FEATURE: Improve wizard quality and rearrange steps (#30055)
This commit contains various quality improvements to
our site setup wizard, along with some rearrangement of
steps to improve the admin setup experience and encourage
admins to customize the site early to avoid "all sites look the
same" sentiment.

#### Step rearrangement

* “Your site is ready” from 3 → 4
* “Logos” from 4 → 5
* “Look and feel” from 5 → 3

#### Font selector improvements

Changes the wizard font selector dropdown to show
a preview of all fonts with a CSS class so you don't
have to choose the font to get a preview.

Also makes the fonts appear in alphabetical order.

#### Preview improvements

Placeholder text changed from lorem ipsum to actual topic titles,
category names, and post content. This makes it feel more "real".

Fixes "undefined" categories. Added a date to the topic timeline.

Fixes button rectangles and other UI elements not changing in
size when the font changed, leading to cut off text which looked super
messy. Also fixed some font color issues.

Fixed table header alignment for Latest topic list.

#### Homepage style selector improvements

Limited the big list of homepage styles to Latest, Hot, Categories with latest topics,
and Category boxes based on research into the most common options.

#### Preview header

Changed the preview header to move the hamburger to the left
and add a chat icon

#### And more!

Changed the background of the wizard to use our branded blob style.
2025-01-02 09:28:23 +10:00
Martin Brennan
c2282439b3
UX: Move first settings admin route to config page (#30510)
For consistency, we are updating all sidebar links that
point to an /admin/customize/site_settings URL to their
own config pages, in preparation for more focused config
pages in future. This will mitigate the issue we have now,
which is that every sidebar link you click showing a different
UI to admins.

This commit moves admin/config/login-and-authentication to
establish the pattern.
2025-01-02 09:13:37 +10:00
Martin Brennan
5711bf6f27
DEV: Move admin config pages out of /customize/ sub-route (#30511)
The customize routes add CSS classes that make these admin
config pages look different from the ones under /admin/config.
We want all config routes to be under /admin/config as well.

This commit moves the emoji, user fields, and permalinks pages
out of customize and into config, updating all references and
adding more rails routes as needed.

Also renames admin emojis route to emoji, emoji is singular and plural.
2025-01-02 09:13:11 +10:00
Sam
9b9babdd72
FEATURE: allow disabling of anti spam profile hiding feature (#30508)
The profile hiding feature is particularly problematic on sites that are
private (invite only or must approve users) so it is unconditionally disabled.

Also certain sites may prefer to disable the anti spam feature, they can
opt out using `hide_new_user_profiles`


Co-authored-by: Martin Brennan <martin@discourse.org>
2024-12-31 15:04:53 +11:00
Osama Sayegh
429fc91b2e
DEV: Fix build (#30501)
Follow-up to https://github.com/discourse/discourse/pull/30471

We've merged a PR that requires an entry for all site settings in the keywords section in `server.en.yml`, and I merged my previous PR without rebasing my branch so I didn't catch the new failure.
2024-12-30 23:02:18 +03:00
Osama Sayegh
3187606d34
FEATURE: Add option to hide full name input at signup (#30471)
This commit replaces the `full_name_required` setting with a new `full_name_requirement` setting to allow more flexibility with the name field in the signup form. The new setting has 2 options, "Required at signup" and "Optional at signup", which are equivalent to the true/false possibilities of the old setting, and a third option "Hidden at signup" that hides the name field from the signup form, making it effectively optional too.

New sites will have the "Hidden at signup" option as the default option, and existing site will continue to use the option that maps to their current configuration.

Internal topic: t/136746.
2024-12-30 22:26:20 +03:00
Angus McLeod
ce7a14104b
Add user api key client rate limit settings (#30402) 2024-12-30 11:10:48 -05:00
Gary Pendergast
92793c5b73
DEV: Ensure all site settings have a keyword entry (#30485) 2024-12-30 12:22:55 +11:00
Arpit Jalan
bf3279d75a
FEATURE: support adobe analytics tags tracking (#30433)
https://experienceleague.adobe.com/en/docs/experience-platform/tags/home

https://experienceleague.adobe.com/en/docs/platform-learn/implement-in-websites/configure-tags/add-embed-code
2024-12-26 15:25:48 +05:30
David Taylor
5962373ab9
FEATURE: Unhide 'suppress_secured_categories_from_admin' setting (#30436)
This setting suppresses topics and PMs from the admin UI unless they are participants. This is not a security feature: admins can always access all content on the site if needed.
2024-12-23 11:03:01 +00:00
Alan Guo Xiang Tan
859d61003e
DEV: API to register custom request rate limiting conditions (#30239)
This commit adds the `add_request_rate_limiter` plugin API which allows plugins to add custom rate limiters on top of the default rate limiters which requests by a user's id or the request's IP address.

Example to add a rate limiter that rate limits all requests from Googlebot under the same rate limit bucket:

```
add_request_rate_limiter(
  identifier: :country,
  key: ->(request) { "country/#{DiscourseIpInfo.get(request.ip)[:country]}" },
  activate_when: ->(request) { DiscourseIpInfo.get(request.ip)[:country].present? },
)
```
2024-12-23 09:57:18 +08:00