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

[ML] Fix responsive behaviour of page header with date picker #149073

Merged
merged 9 commits into from Jan 23, 2023

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Jan 17, 2023

Summary

Fixes #148381.

Improve responsive behaviour of page header with date picker.

  • Removes custom breakpoint based code to determine date picker width and instead use it's native width option.
  • Adds a flexGroup boolean toggle to be able to get back the flex items only without the flex group if you want to embed the date picker in an already existing flex group to avoid additional nesting.
  • Sets the fill option of the refresh button to false to avoid the dark blue "primary".
  • In the aiops plugin and the ml_page.tsx component, migrates away from EUI's deprecated components for the page layout.
  • Adds a min-width to page titles to avoid narrow wrapping (e.g. wrapping after each character on narrow screens).

Before (cut off date picker and refresh button):

image

image

After:

image

image


Before (narrow wrapping of page title):

image

image

After:

image

image

Checklist

@walterra walterra self-assigned this Jan 17, 2023
@walterra walterra force-pushed the 148381-aiops-responsive-layout branch from 547fd85 to 5ac32ef Compare January 18, 2023 08:56
@walterra walterra added :ml v8.7.0 release_note:skip Skip the PR/issue when compiling release notes bug Fixes for quality problems that affect the customer experience labels Jan 18, 2023
@walterra walterra changed the title [ML] Improve responsive behaviour of page header with date picker [ML] Fix responsive behaviour of page header with date picker Jan 18, 2023
@walterra walterra added release_note:fix and removed release_note:skip Skip the PR/issue when compiling release notes labels Jan 18, 2023
@walterra walterra marked this pull request as ready for review January 18, 2023 10:47
@walterra walterra requested a review from a team as a code owner January 18, 2023 10:47
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@walterra walterra mentioned this pull request Jan 18, 2023
1 task
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested (Chrome and Firefox) and LGTM

@@ -18,6 +19,10 @@ import { HelpMenu } from '../components/help_menu';
import { useMlKibana } from '../contexts/kibana';
import { MlPageHeader } from '../components/page_header';

const singleMetricViewerTitle = css({
minWidth: '350px',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other pages are 300px is this larger size to account for wider text?
If so, this text will be translated and could be any size.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch regarding translations! In 9a68a79 I combined the different rules and they now are all minWidth: 300px.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 462 461 -1
ml 1615 1683 +68
total +67

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiops 740.3KB 739.5KB -810.0B
dataVisualizer 378.9KB 378.9KB -18.0B
ml 3.4MB 3.4MB +24.9KB
total +24.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
ml 41.7KB 41.8KB +56.0B
Unknown metric groups

miscellaneous assets size

id before after diff
ml 49.4KB 211.1KB +161.8KB

References to deprecated APIs

id before after diff
ml 210 204 -6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @walterra

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@walterra walterra merged commit 2a57862 into elastic:main Jan 23, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience :ml release_note:fix v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] AIOps responsive layout
6 participants