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

feat: update mgt-login to new fluent-ui designs #1807

Merged
merged 11 commits into from
Sep 2, 2022

Conversation

gavinbarron
Copy link
Member

@gavinbarron gavinbarron commented Aug 16, 2022

Closes #1627

PR Type

  • Feature: Update mgt-login to latest fluent ui design

Description of the changes

  • Adds show-presence and login-view properties to mgt-login
  • Adds the ability to configure the MockProvider as having multiple logged in accounts for testing
  • Uses fluent-button and fluent-card components to provide base UI look and feel
  • Uses vertical-layout for mgt-person-card rather than css changes.
  • Adds the ability to set the outline offset on mgt-person via css variables

PR checklist

  • Project builds (yarn build) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)
  • All public APIs (classes, methods, etc) have been documented following the jsdoc syntax
  • Stories have been added and existing stories have been tested
  • Added appropriate documentation. Docs PR: #118153
  • License header has been added to all new source files (yarn setLicense)
  • Contains NO breaking changes

Other information

@gavinbarron gavinbarron requested a review from Mnickii August 16, 2022 21:26
@ghost
Copy link

ghost commented Aug 16, 2022

Thank you for creating a Pull Request @gavinbarron.

This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

@github-actions
Copy link

The updated storybook is available here

Copy link
Collaborator

@Mnickii Mnickii left a comment

Choose a reason for hiding this comment

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

Hover on accounts on multi-login is missing a pointer
Spacing between the signout button and main profile avatar is abit off, increasing the margin-top of main-profile to 27px meets the design
Spacing between the main profile and other accounts is also abit off, increasing the margin-bottom of the main profile to 47px meets the design
Show presence login story displays the vertical version and the presence login is missing.

@ghost ghost added the Needs: Author Feedback Issue needs response from issue author label Aug 19, 2022
@github-actions
Copy link

The updated storybook is available here

@gavinbarron
Copy link
Member Author

Show presence login story displays the vertical version and the presence login is missing.

Yes, the vertical style card is shown when the login-view="full" is provided. The use of presence indicators is only in the mgt-person at the top level not on any of the items in the flyout. I think that's in line with what the designs had.

Thanks for the hover state and spacing catches, will update those :)

@ghost ghost removed the Needs: Author Feedback Issue needs response from issue author label Aug 19, 2022
@gavinbarron
Copy link
Member Author

@Mnickii I took a second look at the spacing of the elements in the designs as using those numbers raw looked a bit off to me.

When using a horizontal person the spacing from the button to the person appears to be 12px
image

When using a vertical person the spacing from the button to the person appears to be 21px
image

For the spacing between the vertical avatar and the first account in the list there is 47px of gap in the designs:
image

Unfortunately, with this element we have margin/padding from both the avatar elements and the list-box elements that need to be accounted for when calculating this gap, based on my crude ruler work I think we need 6px more on the bottom margin of the main-profile:
image

I'll work on getting these changes applied here.

@musale
Copy link
Contributor

musale commented Aug 22, 2022

@gavinbarron for multiple accounts, how do you enable that?

The multiple account story allows me to "sign in with a different account"

image

However, the component in the normal render mode just renders the signed in account, when I want to add another account, how do I sign into another account?

image

@gavinbarron
Copy link
Member Author

gavinbarron commented Aug 22, 2022

@musale as discussed in person, due to the way the MockProvider that is used to provide data to storybook works the multi login story is informational to show the expected experience, we can't actually enable login or account switching, but I'll add a note into that story.

The provider being used is what controls the multi account behavior, checkout the JS tab for how the MockProvider is being configured in the multi account story:
image

And yes, I do need to add the docs PR thanks for the reminder.

@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

@gavinbarron gavinbarron linked an issue Aug 29, 2022 that may be closed by this pull request
@gavinbarron gavinbarron requested a review from musale September 1, 2022 20:30
@musale musale merged commit 710d6b9 into next/fluentui Sep 2, 2022
Mnickii pushed a commit that referenced this pull request Sep 7, 2022
* feat: update mgt-login to fluent-ui designs

* tests: added story for multiple logged in accounts

* fix: use correct import for MockProvider initialization

* fix: correct spacing and hover colors

* updating spacing, and mgt-person hover states

* docs: correcting doc comments and fixing small style issue

* adding retries to yarn install for azure devops

* clean up button colors, spacing, and documentation

* Ensuring doc comments are provided where needed
Mnickii pushed a commit that referenced this pull request Sep 8, 2022
* feat: update mgt-login to fluent-ui designs

* tests: added story for multiple logged in accounts

* fix: use correct import for MockProvider initialization

* fix: correct spacing and hover colors

* updating spacing, and mgt-person hover states

* docs: correcting doc comments and fixing small style issue

* adding retries to yarn install for azure devops

* clean up button colors, spacing, and documentation

* Ensuring doc comments are provided where needed
@gavinbarron gavinbarron deleted the next/login-design branch June 27, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login component should be updated to the latest Fluent UI design
3 participants