feat: Add User Profile Menu and Logout Option#429
Open
Vamshi-Microsoft wants to merge 4 commits intodevfrom
Open
feat: Add User Profile Menu and Logout Option#429Vamshi-Microsoft wants to merge 4 commits intodevfrom
Vamshi-Microsoft wants to merge 4 commits intodevfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an authentication-aware user profile avatar to the frontend header that opens a dropdown menu showing the signed-in user’s name/email and a logout action, while ensuring the profile UI only mounts when MSAL auth is enabled.
Changes:
- Added a new
UserProfileheader component that renders an avatar-based menu with user info and logout. - Updated
Headerto conditionally renderUserProfileonly whenwindow.appConfig.ENABLE_AUTHindicates MSAL authentication is enabled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/frontend/src/components/Header/UserProfile.tsx | New component that shows the signed-in user avatar/menu and triggers logout via useAuth(). |
| src/frontend/src/components/Header/Header.tsx | Conditionally mounts UserProfile based on runtime config (ENABLE_AUTH) and wraps the toolbar area to include it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… auth status and improve code readability
…essage for signed-in users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request adds a user profile avatar with a dropdown menu to the header, which displays the signed-in user's information and provides a logout option. The avatar and menu are only rendered when MSAL authentication is enabled, ensuring compatibility with authentication state. The implementation is modular, with a new
UserProfilecomponent and logic to safely determine when authentication is active.Authentication-aware header improvements:
Header.tsxto determine if MSAL authentication is enabled, ensuring that authentication-dependent components are only rendered when appropriate.UserProfileavatar and menu, but only when authentication is enabled.New user profile menu:
UserProfilecomponent that displays the signed-in user's initials as an avatar, shows a menu with the user's name and email, and provides a logout option. The component uses theuseAuthhook and Fluent UI components for styling and functionality.UserProfilecomponent into the header.Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information