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

[headerLinks] horizontally center mobileList button #8122

Conversation

paulinashakirova
Copy link

@paulinashakirova paulinashakirova commented Nov 6, 2024

Summary

Hi, folks! 👋🏻
As part of Papercuts project, I've been working on the [Dashboard] Center Save top nav button for small viewport Kibana issue. While working on this, I noticed that in the HeaderLinks pop-up on mobile, the Save button is left-aligned in different areas across Kibana.

For example, in Analytics Dashboards:

Screenshot 2024-11-06 at 21 24 07

This made me think that perhaps we could make the button span the entire width of the modal, like so:

Screenshot 2024-11-06 at 21 32 04

What do you think? I'd love to hear your thoughts, as it's possible this is intentional and designed to be this way. 😁

In this PR, I am sharing the lines of code I added as a reference, but there may be other ways to implement this.

General checklist

  • Browser QA
    • [x ] Checked in both light and dark modes
    • [x ] Checked in mobile
    • [x ] Checked in Chrome, Safari, and Firefox

@paulinashakirova paulinashakirova self-assigned this Nov 6, 2024
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @paulinashakirova

@mgadewoll
Copy link
Contributor

@paulinashakirova Thanks for reaching out and looking into this!

While your solution does work, I'd think it's not quite what we'd want here.
The list container is just that, a container. And EuiHeaderLinks have a specific styling on mobile to ensure full width. This means that the items take care of their positioning, not the container, because in theory there might be a use case for non fullwidth content potentially.

But I think this could be solved on Kibana side. I see that filled buttons are added separately here so they don't have the mobile full width as they are not EuiHeaderLinks. But EuiButton has a fullWidth prop that could be added here 🙂

Screenshot 2024-11-07 at 10 26 36

@paulinashakirova
Copy link
Author

Hi @mgadewoll! 👋🏻
Thank you so much for replying and sharing your knowledge.
I will fix it on Kibana's side then.
Have a great day! 😊

@paulinashakirova paulinashakirova deleted the mobileList-header-links-style branch November 7, 2024 11:03
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.

4 participants