UX: move users link to the top of the admin sidebar (#27339)

Before, users link was in the community section.
This commit is contained in:
Krzysztof Kotlarek 2024-06-05 12:49:46 +10:00 committed by GitHub
parent 9ff0805a1d
commit c1ecbb8d28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 16 deletions

View File

@ -82,13 +82,6 @@ export const ADMIN_NAV_MAP = [
label: "admin.community.sidebar_link.trust_levels",
icon: "user-shield",
},
{
name: "admin_users",
route: "adminUsers",
label: "admin.community.sidebar_link.users",
icon: "users",
moderator: true,
},
{
name: "admin_user_fields",
route: "adminUserFields",

View File

@ -158,6 +158,13 @@ export function useAdminNavConfig(navMap) {
icon: "home",
moderator: true,
},
{
name: "admin_users",
route: "adminUsers",
label: "admin.community.sidebar_link.users",
icon: "users",
moderator: true,
},
{
name: "admin_all_site_settings",
route: "adminSiteSettings",

View File

@ -34,8 +34,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
it "collapses sections by default" do
visit("/admin")
links = page.all(".sidebar-section-link-content-text")
expect(links.count).to eq(2)
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
expect(links.count).to eq(3)
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
end
it "respects the user homepage preference for the Back to Forum link" do
@ -116,8 +116,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
it "temporarily expands section when filter" do
visit("/admin")
links = page.all(".sidebar-section-link-content-text")
expect(links.count).to eq(2)
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
expect(links.count).to eq(3)
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
filter.filter("ie")
links = page.all(".sidebar-section-link-content-text")
@ -126,8 +126,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
filter.filter("")
links = page.all(".sidebar-section-link-content-text")
expect(links.count).to eq(2)
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
expect(links.count).to eq(3)
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
end
it "allows further filtering of site settings or users if links do not show results" do
@ -167,8 +167,8 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
sidebar.toggle_all_sections
links = page.all(".sidebar-section-link-content-text")
expect(links.count).to eq(2)
expect(links.map(&:text)).to eq(["Dashboard", "All Site Settings"])
expect(links.count).to eq(3)
expect(links.map(&:text)).to eq(["Dashboard", "Users", "All Site Settings"])
sidebar.toggle_all_sections
links = page.all(".sidebar-section-link-content-text")
@ -224,9 +224,9 @@ describe "Admin Revamp | Sidebar Navigation", type: :system do
expect(links.map(&:text)).to eq(
[
"Dashboard",
"Users",
"What's New",
"All",
"Users",
"Watched Words",
"Screened Emails",
"Screened IPs",