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

Nav bar account icon dropdown #35

Merged
merged 17 commits into from
Jul 10, 2020
Merged

Conversation

jacquelineyin
Copy link
Collaborator

@jacquelineyin jacquelineyin commented Jul 9, 2020

Motivation:

  • UI/UX workflow of having a logout button in profile page is a bit clunky.

Changes in this commit:

  • Implemented a dropdown menu after clicking AccountBtn on NavBar, which includes:
    -- Profile: redirects to profile page
    -- Logout: logs user out and redirects them to homepage
  • Added more height to the grey box in UserProfile (see Closed PR: 32) to compensate for the extra whitespace caused by deleting Logout button from UserProfile page

image

Notes:

  • There was a bug from a previous commit whereby if a user logs in with a gmail account through the normal login (not the google one), they are given the google logout, which then didn't work. The issue persists in this commit

  • Material ui has a bug: where locking the scrollbar will introduce whitespace (see here). Worked around it by disabling scrollbar lock, but this allows the menu dropdown to float when user scrolls

@@ -32,20 +33,27 @@ const GoogleLogoutBtn = ({
unsetUser();
logoutSuccess("Successfully logged out!");
closeModal();
return response;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@abid-salahi

Notes: There was a bug from a previous commit whereby if a user logs in with a gmail account through the normal login (not the google one), they are given the google logout, which then didn't work. The issue persists in this commit. (Copied straight from my commit description because I'm lazy xD). Not sure how to fix this, so I'll pass it back to you

Not sure if the response is supposed to do anything. I logged it and it gives "Undefined", but to get rid of the lint warning, I just returned the response xD.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah its a useless response. Could even remove it.

@jacquelineyin jacquelineyin merged commit 1205133 into dev Jul 10, 2020
@jacquelineyin jacquelineyin deleted the NavBar-AccountIcon-Dropdown branch July 24, 2020 20:52
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.

3 participants