[Discover] fix: set smaller max width for mobile devices#199798
[Discover] fix: set smaller max width for mobile devices#199798akowalska622 merged 6 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
jughosta
left a comment
There was a problem hiding this comment.
Thanks for improving this! LGTM 👍
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
nickofthyme
left a comment
There was a problem hiding this comment.
Changes look fine to me.
There was a problem hiding this comment.
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.
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 https://github.com/elastic/kibana/actions/runs/11839704329 |
) (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
useIsWithinBreakpointswithin the component and passisMobilecheck to the style object.Had to choose
...(isMobile && { maxWidth: MAX_MOBILE_WIDTH }),overisMobile: MAX_MOBILE_WIDTH : undefined, because underlying function was not falling backundefinedinto the const set incalculateWidthFromCharCount.Checklist
Delete any items that are not applicable to this PR.
For maintainers