-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Discover] fix: set smaller max width for mobile devices #199798
[Discover] fix: set smaller max width for mobile devices #199798
Conversation
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
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 improving this! LGTM 👍
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
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.
Changes look fine to me.
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.
It does seems strange that eui does not size the popover to contain the contents of the popover. Maybe just an edge case 🤷♂️.
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.
Yeah and it's apparently the case in more places (for example [Discover][Alerts] Layout issues on mobile when data view has a long name, maybe something worth mentioning to the EUI team?
Starting backport for target branches: 8.x |
) (cherry picked from commit fbd06a3)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…) (#200202) # Backport This will backport the following commits from `main` to `8.x`: - [[Discover] fix: set smaller max width for mobile devices (#199798)](#199798) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ania Kowalska","email":"63072419+akowalska622@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-11-14T14:55:16Z","message":"[Discover] fix: set smaller max width for mobile devices (#199798)","sha":"fbd06a347f2d6b4c312848723ecdf490bfbf8feb","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Discover","release_note:skip","v9.0.0","Team:DataDiscovery","Feature:Unified search","backport:prev-minor"],"title":"[Discover] fix: set smaller max width for mobile devices","number":199798,"url":"https://github.com/elastic/kibana/pull/199798","mergeCommit":{"message":"[Discover] fix: set smaller max width for mobile devices (#199798)","sha":"fbd06a347f2d6b4c312848723ecdf490bfbf8feb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199798","number":199798,"mergeCommit":{"message":"[Discover] fix: set smaller max width for mobile devices (#199798)","sha":"fbd06a347f2d6b4c312848723ecdf490bfbf8feb"}}]}] BACKPORT--> Co-authored-by: Ania Kowalska <63072419+akowalska622@users.noreply.github.com>
Summary
Closes #199620
The const for max width of pop over container was too big for mobile devices. I use
useIsWithinBreakpoints
within the component and passisMobile
check to the style object.Had to choose
...(isMobile && { maxWidth: MAX_MOBILE_WIDTH }),
overisMobile: MAX_MOBILE_WIDTH : undefined
, because underlying function was not falling backundefined
into the const set incalculateWidthFromCharCount
.Checklist
Delete any items that are not applicable to this PR.
For maintainers