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

[Discover] Discover Classic View Filter In/Out placement when truncate:maxHeight is set to 0 #129942

Merged
merged 6 commits into from
Apr 14, 2022

Conversation

kertal
Copy link
Member

@kertal kertal commented Apr 11, 2022

Summary

Fixes #128080

When setting truncate:maxHeight to 0 in Advanced settings, CSS for truncating height of Classic table was no longer injected in global CSS.

Bildschirmfoto 2022-04-13 um 11 46 51

This led to an issue with the positioning of the filter buttons. It looked like this

image

This PR takes care of injecting CSS also for the 0 case, so the positioning of the filter buttons works correctly:

Bildschirmfoto 2022-04-13 um 12 16 05

What's more, since it takes a refresh of the browser page for the change of the truncate:maxHeight to take effect, there's now a toast displayed when users persisted the change

Steps to test:

  1. Enable classic view in Advanced settings by setting doc_table:legacy to On.
  2. Go to Discover , add a column with long content to the table, check that filter buttons when hovering look correctly
  3. Save the search and create a new Dashboard with it.
  4. Goto Advanced setting enable Classic table, set truncate:maxHeight to 0
  5. When saving it you should get a toast to reload the page, which you should do.
  6. Go to Discover, check that filter buttons on multiline context are positioned correctly.
  7. Go to Dashboard, check that filter buttons on the Dashboard using the saved search you've created, look correctly

Checklist

Delete any items that are not applicable to this PR.

@kertal kertal self-assigned this Apr 12, 2022
@@ -286,5 +286,6 @@ export const getUiSettings: (docLinks: DocLinksServiceSetup) => Record<string, U
'The maximum height that a cell in a table should occupy. Set to 0 to disable truncation.',
}),
schema: schema.number({ min: 0 }),
requiresPageReload: true,
Copy link
Member Author

@kertal kertal Apr 13, 2022

Choose a reason for hiding this comment

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

this leads to a toast messaging telling the user to reload
Bildschirmfoto 2022-04-13 um 12 14 16

@kertal kertal added Feature:Discover Discover Application Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. release_note:fix v8.3.0 ci:deploy-cloud labels Apr 13, 2022
@kertal kertal changed the title [Discover] Change global injected CSS for truncating height [Discover] Change global injected CSS for truncating height using classic table Apr 13, 2022
@kertal kertal marked this pull request as ready for review April 13, 2022 10:45
@kertal kertal requested review from a team as code owners April 13, 2022 10:45
@elasticmachine
Copy link
Contributor

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

@kertal
Copy link
Member Author

kertal commented Apr 13, 2022

@elasticmachine merge upstream

@kertal kertal requested a review from dimaanj April 13, 2022 10:51
Copy link
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 fixing it! Tested in different browsers.

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Tested on cloud deployment; worked as described.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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
discover 407.2KB 407.2KB +84.0B

Page load bundle

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

id before after diff
discover 40.5KB 40.5KB -30.0B

History

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

cc @kertal

@kertal kertal changed the title [Discover] Change global injected CSS for truncating height using classic table [Discover] Discover Classic View Filter In/Out placement when truncate:maxHeight is set to 0 Apr 14, 2022
@kertal kertal merged commit 1f05cd6 into elastic:main Apr 14, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 14, 2022
@timductive timductive added this to the 8.3 milestone May 6, 2022
@tylersmalley tylersmalley added ci:cloud-deploy Create or update a Cloud deployment and removed ci:deploy-cloud labels Aug 17, 2022
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 ci:cloud-deploy Create or update a Cloud deployment Feature:Discover Discover Application release_note:fix Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discover Classic View Filter In/Out placement
8 participants