Skip to content

[Discover] fix: set smaller max width for mobile devices#199798

Merged
akowalska622 merged 6 commits intoelastic:mainfrom
akowalska622:fix/199620-change-data-view-long-labels
Nov 14, 2024
Merged

[Discover] fix: set smaller max width for mobile devices#199798
akowalska622 merged 6 commits intoelastic:mainfrom
akowalska622:fix/199620-change-data-view-long-labels

Conversation

@akowalska622
Copy link
Copy Markdown
Contributor

@akowalska622 akowalska622 commented Nov 12, 2024

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 pass isMobile check to the style object.
Had to choose ...(isMobile && { maxWidth: MAX_MOBILE_WIDTH }), over isMobile: MAX_MOBILE_WIDTH : undefined, because underlying function was not falling back undefined into the const set in calculateWidthFromCharCount.

Checklist

Delete any items that are not applicable to this PR.

  • Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
  • This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)
  • This was checked for cross-browser compatibility

For maintainers

@akowalska622 akowalska622 self-assigned this Nov 12, 2024
@akowalska622 akowalska622 added Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Feature:Unified search Unified search related tasks backport:prev-minor Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes labels Nov 12, 2024
@akowalska622 akowalska622 marked this pull request as ready for review November 12, 2024 17:27
@akowalska622 akowalska622 requested a review from a team as a code owner November 12, 2024 17:27
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@akowalska622 akowalska622 enabled auto-merge (squash) November 12, 2024 17:28
@akowalska622 akowalska622 changed the title fix: set smaller max width for mobile devices [Discover] fix: set smaller max width for mobile devices Nov 12, 2024
Copy link
Copy Markdown
Contributor

@jughosta jughosta 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 improving this! LGTM 👍

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #35 / Screenshots - serverless security UI response ops docs security cases security case settings case settings screenshot

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
unifiedSearch 354.9KB 355.0KB +86.0B

History

cc @akowalska622

Copy link
Copy Markdown
Contributor

@nickofthyme nickofthyme left a 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.

Copy link
Copy Markdown
Contributor

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 🤷‍♂️.

Copy link
Copy Markdown
Contributor Author

@akowalska622 akowalska622 Nov 14, 2024

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?

@akowalska622 akowalska622 merged commit fbd06a3 into elastic:main Nov 14, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11839704329

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 14, 2024
…) (#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>
wayneseymour pushed a commit to wayneseymour/kibana that referenced this pull request Nov 18, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Discover Discover Application Feature:Unified search Unified search related tasks release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v8.17.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discover][UnifiedSearch] Issues with long names for Data View picker on mobile

5 participants