-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 page header design #205250
[User Profile] Update page header design #205250
Conversation
@jeramysoucy @ryankeairns Can I get some feedback on this? |
0dd7d42
to
2cf2c63
Compare
@kowalczyk-krzysztof Sorry for the delay. The truncation part seems fine to me - I think it will support the vast majority of usernames. The fields can still be hidden when resizing, which is a strange behavior. Not sure how to resolve this. Maybe someone from the @elastic/eui-team could offer a suggestion. Screen.Recording.2024-12-31.at.2.09.04.PM.mov |
@jeramysoucy Yeah it seems like when you resize the viewport down and then up again, then the |
@jeramysoucy |
d1a60fc
to
8e88a68
Compare
Pinging @elastic/kibana-security (Team:Security) |
I pinged the EUI team for some suggestions here. We'll see what they come up with. |
Hey, all! Sorry for sticking my nose in here, but since I was involved in this page's design in the past, I figured I'd add my two cents. In short, I think this page's contents have outgrown the current use of Key suggested changes include:
But like I said, this is just my two cents. I'll defer to whomever is responsible for the design of these pages now (@ek-so?), in case they have different thoughts. |
@MichaelMarcialis @ryankeairns could you take a look at this? |
Thanks for pinging @MichaelMarcialis! I also like your suggestion, we could make a better use of the space "Profile" takes up now. I'm not deeply involved in the papercuts project and don’t have much context here — but I assume the goal is to quickly address some obvious issues. Speaking more broadly, I’d suggest considering whether the whole profile might be worth a second design iteration. A few new elements have been added, and perhaps we could arrange everything in a more effective manner. |
@@ -98,6 +99,18 @@ const rightSideItemCSS = css` | |||
min-width: 160px; | |||
`; | |||
|
|||
const usernameTextCSS = css` | |||
max-width: 160px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kowalczyk-krzysztof in case this is the final solution, have you considered using the ch
unit? It would be an approximation (not exact) to the actual limit in characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acstll I didn't think of using ch
unit at all but it seems like a good idea, I'll check it out if we decide to proeceed with this solution.
Thanks @MichaelMarcialis! I prefer this solution, especially if it resolves both the original papercut and the subsequent issues. I'll review with my team to get additional feedback. One thing worth noting is that it does not show the title of each piece of information, which the previous interface did. I don't think this is necessarily an issue. |
After discussing with the team, we are in favor of Michael's design update, with a few notes/asks:
@MichaelMarcialis @kowalczyk-krzysztof |
+1 for Michael's suggestions. Greatly simplifies things and looks better to boot :) |
a617687
to
72d3f7b
Compare
@jeramysoucy @MichaelMarcialis Feel free to play with the draft and let me know what other changes could be made - I guess the typography could use some more styling. |
@kowalczyk-krzysztof this looks great to me! And resizing works very well. I'll leave it to @MichaelMarcialis or @ryankeairns to comment on typeface/styling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're close! Two suggested changes, then good to go.
- Make 'Roles' a proper header - Wrap with an
h3
+ anEuiTitle size=xxs
outside of that (see below)
![](https://private-user-images.githubusercontent.com/446285/402652804-6295f673-4ec3-4809-b9b9-0120b6503e80.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MDQ2MTEsIm5iZiI6MTczOTcwNDMxMSwicGF0aCI6Ii80NDYyODUvNDAyNjUyODA0LTYyOTVmNjczLTRlYzMtNDgwOS1iOWI5LTAxMjBiNjUwM2U4MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQxMTExNTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YzE2ZDM0YmM0ZGY0YWY5ZmQ0NzEyNjVmOGQwMTRkNWNmNTQ1YTExNzZhMTdhNGZkYTU4ODgxNmQyOGU0MjgwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.WQG-pjwpCsHdOZHlTyFX2WTRBTTcQOb8PyxuUvcAYu4)
- **Fix heigh of badges when the '+X' badge is present. The
xs
sizeEuiEmptyButton
is taller than the badges which results in some extra padding on the bottom. EuiBadge accept anonClick
, can we remove the empty button and move the this anddatat-test-subj
to theEuiBadge
instead?
Before
![](https://private-user-images.githubusercontent.com/446285/402658901-28ba1206-9113-4afb-ad04-d8707521c89a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MDQ2MTEsIm5iZiI6MTczOTcwNDMxMSwicGF0aCI6Ii80NDYyODUvNDAyNjU4OTAxLTI4YmExMjA2LTkxMTMtNGFmYi1hZDA0LWQ4NzA3NTIxYzg5YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQxMTExNTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lZGEzMmJjYjVlMzVhZjkzYjEwMjgyODQxZDBmOTExNmZkNjZjMTFmZmVhYjg3NzdjN2ZkYTM3OTBkZjU3OGZiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.BarFGq7C02RV0KDWZ9svStO8mJbHzgSOMST-Qpbi1i8)
After
![](https://private-user-images.githubusercontent.com/446285/402658646-3115caa8-9a6d-4e7e-b0af-856d04d1e22d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3MDQ2MTEsIm5iZiI6MTczOTcwNDMxMSwicGF0aCI6Ii80NDYyODUvNDAyNjU4NjQ2LTMxMTVjYWE4LTlhNmQtNGU3ZS1iMGFmLTg1NmQwNGQxZTIyZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQxMTExNTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wZmQzZjM5ZjQ2MGI3NzlmMDA1YWJmMTU3YTMyMWY5ZTUwN2E5Y2IwN2U3MTY3YTVhZTYyZjkyNDJjMDIyNjZjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.G2pHUZW4--Z6Ul4Gp5IdS7chZWt3ZN0Y-JtYQZJemL4)
Looking good! Some final suggestions on my part:
Quick mockup with updates attached. |
@ryankeairns @MichaelMarcialis |
Not sure about those "help texts" - previously they were rendered as |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for your patience and attention to detail on this. I left one comment regarding the aria-labels, but I don't think we need to hold up this PR for that.
alignItems="bottom" | ||
pageTitleProps={{ | ||
'data-test-subj': 'username', | ||
'aria-label': i18n.translate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I had no luck getting any of these aria labels to announce. I tested this out on main as well, and also could not get the previous implementation to announce. So I don't think this is within scope of this PR, but it is worth noting.
cc @elastic/kibana-accessibility for some guidance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes and patience :)
## Summary This PR wraps each `right side item` of `EuiPageHeaderSection` in a `EuiFlexItem` and assigns `grow` property based on what the field is. This makes it so fields that are usually longer (e.g `email`) won't truncate too early. Closes: elastic#204121 ## Visuals | Previous | New | Typical user | |-----------------|-----------------|-----------------| |![previous](https://github.com/user-attachments/assets/a7b2d4cc-5ec5-4b0c-883f-d1918a25942f) | ![new](https://github.com/user-attachments/assets/4447da5d-a8bb-434d-a68c-b6deb3b933a6) | ![typical_user](https://github.com/user-attachments/assets/f4cfd33f-74ce-4683-b391-8dc6c789c45e)
Summary
This PR wraps each
right side item
ofEuiPageHeaderSection
in aEuiFlexItem
and assignsgrow
property based on what the field is. This makes it so fields that are usually longer (e.gemail
) won't truncate too early.Closes: #204121
Visuals