From a35931a33a47de385294042c75bd8cbe89d1671c Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 3 Feb 2020 11:35:29 +0000 Subject: [PATCH] Swap order of usage and team members for org users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Org users, when looking at the page for their org, see: > Usage > Team members When they click into a service it switches to: > Team members > Usage This is jarring. It should stay consistent. I think it that _Usage_ then _Team members_ is the natural way of ordering the navigation at the organisation level, so let’s follow that through to the service level. This does mean that if someone is a member of both an organisation and a service that the nav will jump (because it’ll switch to the existing, service-level order of _Team members_ then _Usage_) but it’s going to jump anyway because you get all the extra navigation items when you’re a member of a service. --- app/templates/main_nav.html | 2 +- tests/app/main/test_permissions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index 242394636..92c05dd6c 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -29,8 +29,8 @@
  • API integration
  • {% endif %} {% elif current_user.has_permissions(allow_org_user=True) %} -
  • Team members
  • Usage
  • +
  • Team members
  • {% endif %} diff --git a/tests/app/main/test_permissions.py b/tests/app/main/test_permissions.py index 34462f5b4..bff68d66e 100644 --- a/tests/app/main/test_permissions.py +++ b/tests/app/main/test_permissions.py @@ -373,8 +373,8 @@ def test_service_navigation_for_org_user( assert [ item.text.strip() for item in page.select('nav.navigation a') ] == [ - 'Team members', 'Usage', + 'Team members', ]