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

[User Profile] Update edit profile header layout #202902

Conversation

kowalczyk-krzysztof
Copy link
Member

Summary

This PR updates layout of User Profile header according to this design.
Since those changes break the layout pattern suggested by EUI, I had to move the content to be children of the header as the EUI docs suggest.

Closes: #200059

@kowalczyk-krzysztof kowalczyk-krzysztof added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Feature:Security/User Profile labels Dec 4, 2024
@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this Dec 4, 2024
@ryankeairns
Copy link
Contributor

ryankeairns commented Dec 4, 2024

Hey @kowalczyk-krzysztof ,
I created a design PR against yours... sometimes this is faster than trying to describe it all in words :)

Feel free to merge it as-is, or re-create these changes in your PR.

…t-changes

Design tweaks for user profile header
@kowalczyk-krzysztof
Copy link
Member Author

Hey @kowalczyk-krzysztof , I created a design PR against yours... sometimes this is faster than trying to describe it all in words :)

Feel free to merge it as-is, or re-create these changes in your PR.

Thanks for that!
For some reason I missed that EuiPageHeaderSection is an actual component and I thought all there is to do use children instead of pageTtitle and rightSideItems props. EuiBadgeGroup is new to me too, but it definitely makes more sense that just a div. I guess I need to read more about EUI 😄

@kowalczyk-krzysztof kowalczyk-krzysztof marked this pull request as ready for review December 4, 2024 23:13
@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner December 4, 2024 23:13
@kowalczyk-krzysztof kowalczyk-krzysztof added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Dec 4, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

@kowalczyk-krzysztof I noticed that getting the components to wrap didn't work until the window was reduced to a fairly small width. Is this the expected behavior?

Screenshot 2024-12-05 at 2 23 06 PM Screenshot 2024-12-05 at 2 23 36 PM Screenshot 2024-12-05 at 2 23 44 PM

@ryankeairns
Copy link
Contributor

ryankeairns commented Dec 6, 2024

@kowalczyk-krzysztof I noticed that getting the components to wrap didn't work until the window was reduced to a fairly small width. Is this the expected behavior?

Could you look into using EuiTextTruncate on the <dd>'s?
EUI docs

@kowalczyk-krzysztof
Copy link
Member Author

Thanks for noticing the wrapping issue @jeramysoucy I'll fix it.

@kowalczyk-krzysztof
Copy link
Member Author

@ryankeairns
I added EuiTextTruncate on item.description but there's still a small issue with wrapping. It seems like the item.title might also need some changes. Any suggestions? Below is a video of what is happening.

chrome_0rWE1FeLDY.mp4

@ryankeairns
Copy link
Contributor

Thanks, it is in better shape with these changes. The last nit I would suggest is to set the<dl> min-width to 160px so that the truncation doesn't happen too soon (i.e. make the text to short to be useful). Other than that, looking good.

@kowalczyk-krzysztof kowalczyk-krzysztof force-pushed the feat/user-profile-header-layout-changes branch from 4ae90ac to e78f5f2 Compare December 10, 2024 23:14
@kowalczyk-krzysztof
Copy link
Member Author

@jeramysoucy This PR is ready for a re-review

Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

Thanks for the updates! This works better for sure!

The only down side I see is that the full name and email are almost sure to be truncated unless a user has a particularly short name and the domain is also short.
Screenshot 2024-12-11 at 1 22 02 PM
Would it be simple to make these two fields able to take up more space based on the content? If not, I think we can live with the truncation as-is. I'll confer with my team in the meantime.

@kowalczyk-krzysztof
Copy link
Member Author

@jeramysoucy I guess different min-width on different fields could work. WDYT @ryankeairns ?

@ryankeairns
Copy link
Contributor

@jeramysoucy I guess different min-width on different fields could work. WDYT @ryankeairns ?

Yeah, that would help.
Ideally, they grow to a max, but I sense this is more work than the papercut this began as.

@jeramysoucy
Copy link
Contributor

Ideally, they grow to a max, but I sense this is more work than the papercut this began as.

@ryankeairns Not trying to make more work, but I agree this would be ideal. If this would be a considerable effort, I am ok with opening a new issue for it, and approving this one with just the "different min-width on different fields" update if that is reasonably achievable.

@kowalczyk-krzysztof
Copy link
Member Author

@jeramysoucy @ryankeairns IMO getting this merged and opening a new issue would be ideal. I'm not sure on the amount of work required but IMO an iterative approach would be best.

@jeramysoucy
Copy link
Contributor

Thanks @kowalczyk-krzysztof and @ryankeairns! Could you open a follow-up issue to address the remaining work, with some commitment to addressing this by a specific future release? We don't want to block this PR, but want to ensure we've got a roadmap for resolving the remaining issues.

Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

Approving to unblock the immediate paper cut fix.

@kowalczyk-krzysztof
Copy link
Member Author

@jeramysoucy I created a follow-up issue #204121 - feel free to edit it, that's my first issue created for Kibana so I'm not sure if I did everything correctly.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
security 540.8KB 541.4KB +592.0B

History

cc @kowalczyk-krzysztof

@kowalczyk-krzysztof kowalczyk-krzysztof merged commit 7803168 into elastic:main Dec 12, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Security/User Profile release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User profile page title is not responsive
5 participants