Commit Graph

9785 Commits

Author SHA1 Message Date
Martin Brennan
061899fee4
UX: Wizard homepage dropdown improvements (#30763)
* Do not offer "categories with latest" option anymore, it does
  not look good with our default Sidebar selection
* Display a sensible item in the dropdown if the admin has not
  chosen hot, latest, or category_boxes as the homepage style,
  before it was broken. Now we show Custom with a little blurb
  about whether topics or categories are shown, and what the landing
  page is


![image](https://github.com/user-attachments/assets/3e392583-d107-489e-9725-62d995a2d341)
2025-01-15 16:49:47 +10:00
Gary Pendergast
d144826fa7
UX: Use DPageHeader on the Email Style page (#30784)
Update the header of the admin Email Style page to be more consistent with the rest of the admin UI.

The HTML/CSS tabs have also been updated, which required an extra check being added to the NavItem component.
2025-01-15 16:53:45 +11:00
Gary Pendergast
5da6a06ce3
UX: Use DPageHeader on the Emails page (#30781)
There are a few changes here to make the Emails admin page more consistent with the rest of the admin UI.

- The header and navigation menu have been updated.
- The sidebar now stays highlighted when visiting the email admin sub-pages.
- Moved the Template editor from /admin/customize/email_templates to /admin/email/templates, so it fit as a sub-page.
- Removed the link to the Template editor from the Customize section of the old top menu, since it's accessible from the Emails section, instead.
2025-01-15 15:36:16 +11:00
Gary Pendergast
698e7a17dd
UX: Use DPageHeader on the Site Settings page (#30783)
Update the header of the admin Site Settings page to be more consistent with the rest of the admin UI.
2025-01-15 15:19:11 +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
Martin Brennan
5bc522e836
FIX: Double trigger of close user menu (#30732)
When clicking the "new features" notification item for
admins that navigates to /whats-new, the user notification
menu was not closing. This was happening because inside
the UserMenu::Menu component, the `routeDidChange` event
was firing and calling `closeUserMenu()`, however this is already
called inside the `Header` component via `toggleHamburger()`.

This is _only_ happening for the "new features" notification
item, other items have already been destroyed and they do not get
the `routeDidChange` event. No idea why, but this fixes the issue
in a global way.
2025-01-15 10:38:08 +10:00
Discourse Translator Bot
496a739788
Update translations (#30765) 2025-01-14 16:19:49 +01:00
Gary Pendergast
dbc9fbfd8b
UX: Use DPageHeader on the Components page (#30762)
This change updates the header of the admin Components page to be more consistent with the rest of the admin UI.

The Themes and Components pages share the same templates, so this change switches the header based on which tab is active.
2025-01-14 17:58:08 +11:00
Gary Pendergast
36bbe0a0a6
UX: Use DPageHeader on the Themes page (#30759)
This change updates the header of the admin Themes page to be more consistent with the rest of the admin UI.
2025-01-14 17:00:15 +11:00
Ted Johansson
6b4aa1221c
DEV: Add problem check informing about admin layout deprecation (#30685)
We want to avoid surprises when we make the new admin sidebar baseline, so in addition to announcements, we're also adding a problem check that informs you if you don't have it enabled for any group yet.
2025-01-14 13:22:59 +08:00
Martin Brennan
dc0bf90069
UX: Apply admin UI guidelines to Reports pages (#30684)
Applies the admin UI guidelines from
https://meta.discourse.org/t/creating-consistent-admin-interfaces/326780
to the reports list and single report page for admins.


![image](https://github.com/user-attachments/assets/2431901f-0225-4658-b408-ab0865d022e6)

![image](https://github.com/user-attachments/assets/6f9e531b-8fec-405f-8429-151fd261ee2c)

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-01-14 13:22:08 +10:00
Gary Pendergast
8c86676fcf
DEV: Revert the addition of keywords for all site settings. (#30755)
This is a revert of 92793c5b73.

Following on from discussions after the previous commit, it became evident that it was only a small step towards solving the larger problem of finding site settings in a reliable fashion across multiple languages.

This is going to take more thought and discussion, and since the changes  introduced in the previous commit are effectively non functional without additional work, I'm going to revert it for now.
2025-01-14 13:34:04 +11:00
David Battersby
f9a000ff9f
UX: add placeholder title for drafts (#30747)
Adds a placeholder title for drafts that don't have a saved title.
2025-01-14 01:24:12 +04:00
Régis Hanol
03119312b5
FIX: ensure GroupChooser works with localized group names (#30593)
The "Tag Groups Form" component was using group names to handle
permissions. This works just fine when the default locale is "English"
but breaks as soon as it's changed to a different locale.

The fix is to use the group id's for handling the permissions instead of
the group name.

Reported in https://meta.discourse.org/t/221849
2025-01-13 11:29:04 +01:00
Régis Hanol
79b68bc32b
FIX: show both group's full name & name when they differ (#30672)
In the groups page (/g) where we list all the groups, we were only
showing one group "name" per group. If a full name was set, we would
show it, otherwise we would show the group's "display name".

This was somewhat inconsistent because we only show the group's names
in all the various controls we use to filter/search by group.

Plus we used a slightly different logic when displaying the names of a
group on the "group page".

So I updated the "GroupsInfo" component to show either 1 or 2 names
depending on whether a full name is set, and it's different from the
display name or the name of the group.

I used this component in the "group page" so the names will be
consistent between the "groups page" and the "group page".

Also renamed the "GroupsInfo" component to "GroupInfo" since it only
ever deals with 1 group at a time.

Ref - https://meta.discourse.org/t/-/345415

---

## When "full name" differs from the "group's name"

(cf. `@admins`, `@staff`, and `@moderators`)

<img width="1250" alt="Screenshot 2025-01-09 at 15 56 29"
src="https://github.com/user-attachments/assets/f8a0ecdd-2715-40d9-a1ed-26288f638d9f"
/>

## When "full name" is the same as the "group's name"

When `unicode` is allowed in usernames, then the group's full name is
the same as the group's name, so we only show one name.

<img width="1249" alt="Screenshot 2025-01-09 at 16 25 53"
src="https://github.com/user-attachments/assets/03438fbd-04f1-4672-91d5-bd6af2b32475"
/>
2025-01-13 11:28:29 +01:00
David Battersby
47c8197ea1
FEATURE: add drafts dropdown menu (#30277)
This change adds a new dropdown trigger next to the "New Topic" button.
When clicked a menu will display a list of topic/post drafts that can be
clicked to resume the draft within the composer.

The "New Topic" button will no longer change text to show "Open Draft"
when a draft topic exists, it will still attempt to load the existing
draft if one exists (this will change later when we support multiple
drafts in a separate PR).

The "My Posts" link in desktop sidebar will now be "My Drafts" and only
appear when the current user has existing drafts.
2025-01-13 13:33:57 +04:00
David Taylor
b4cb8cb204
DEV: Move 'symlinking fonts' message to STDERR (#30699)
Having it in stdout means it pollutes the output of some scripts & rake tasks, which then gets piped to other tooling
2025-01-10 18:02:16 +00:00
Martin Brennan
690ffcf1d5
UX: Add DPageHeader to watched words and color palettes (#30686)
Part of our admin UI consistency efforts, this is a stop-gap
until we can do a further UI review of these pages.
2025-01-10 15:32:10 +10:00
Ted Johansson
d566cbbf45
DEV: Add missing root breadcrumb to API keys page (#30690)
Addressing a couple minor inconsistencies on the admin API keys page.

1. Add missing "Admin" root breadcrumb.
2. De-titleize "API Keys" -> "API keys".
2025-01-10 13:19:34 +08:00
Ted Johansson
4a78999b6f
DEV: Add new admin UI header to site texts page (#30689)
This adds the new admin UI header to the site texts page.
2025-01-10 13:19:14 +08:00
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