From 660017a25fead29b09192fa6e55ff327ac70a952 Mon Sep 17 00:00:00 2001 From: Robyn MacCallum Date: Tue, 20 Feb 2024 10:13:19 -0500 Subject: [PATCH] [SM-1090] Fix org switcher alphabetization (#7831) * Remove sorting of disabled orgs to the bottom * Fix color contrast of disabled label and add a11y attributes --- .../secrets-manager/layout/org-switcher.component.html | 8 ++++++-- .../app/secrets-manager/layout/org-switcher.component.ts | 5 +---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.html index 5e641b1c529..bf94bdaea42 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.html @@ -10,7 +10,9 @@ diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.ts index 51fbf55d5e5..59e69c15a8e 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.ts @@ -13,10 +13,7 @@ export class OrgSwitcherComponent { protected organizations$: Observable = this.organizationService.organizations$.pipe( map((orgs) => - orgs - .filter((org) => this.filter(org)) - .sort((a, b) => a.name.localeCompare(b.name)) - .sort((a, b) => (a.enabled ? -1 : 1)), + orgs.filter((org) => this.filter(org)).sort((a, b) => a.name.localeCompare(b.name)), ), );