Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-14369] Hide account switcher if on login page and not logged into any accounts #11827

Conversation

alec-livefront
Copy link
Collaborator

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-14369?atlOrigin=eyJpIjoiNDEwN2RkODhjYWQ2NGFmY2JhYTNhOTA4NDEzNDdkODEiLCJwIjoiaiJ9

📔 Objective

The availableAccounts$ looks to have a default addAccount accounts, so it is not empty. The *ngIf is then truthy and the account switcher component is always shown. I've added a hasLoggedInAccount variable and added that to the check.

📸 Screenshots

Screenshot 2024-11-01 at 2 58 03 PM

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 33.62%. Comparing base (f33661c) to head (cfdac3d).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...wrapper/extension-anon-layout-wrapper.component.ts 0.00% 5 Missing ⚠️
...t-wrapper/extension-anon-layout-wrapper.stories.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11827      +/-   ##
==========================================
- Coverage   33.63%   33.62%   -0.02%     
==========================================
  Files        2821     2821              
  Lines       88115    88124       +9     
  Branches    16784    16786       +2     
==========================================
- Hits        29635    29628       -7     
- Misses      56160    56176      +16     
  Partials     2320     2320              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@JaredSnider-Bitwarden JaredSnider-Bitwarden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look great, but we need to update the apps/browser/src/auth/popup/extension-anon-layout-wrapper/extension-anon-layout-wrapper.stories.ts as storybook is failing with an error: ERROR NullInjectorError: R3InjectorError(Standalone[ExtensionAnonLayoutWrapperComponent])[AccountSwitcherService -> AccountSwitcherService -> AccountSwitcherService -> AccountService -> AccountService]:
due to the addition of the new service dependency.

@alec-livefront alec-livefront merged commit a959620 into main Nov 6, 2024
25 of 26 checks passed
@alec-livefront alec-livefront deleted the auth/pm-14369/hide-account-switcher-if-on-login-page-and-not-logged-in branch November 6, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants