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

[Logs UI] Limit the height of the "view in context" container #83178

Merged
merged 5 commits into from
Nov 26, 2020

Conversation

afgomez
Copy link
Contributor

@afgomez afgomez commented Nov 11, 2020

Closes #83063

The EuiModal has a max-height setting. In chrome, content with a bigger height got clipped instead of forced to this max-height.

To ensure this never happens, we also limit the height of the content to the same max-height of the modal.

The `EuiModal` has a max-height setting. In chrome, content with a
bigger height got clipped instead of forced to this max-height.

To ensure this never happens, we also limit the height of the content to
the same `max-height` of the modal.
@afgomez afgomez added v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.10.1 labels Nov 11, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@afgomez afgomez added the release_note:skip Skip the PR/issue when compiling release notes label Nov 11, 2020
@afgomez
Copy link
Contributor Author

afgomez commented Nov 18, 2020

@elasticmachine merge upstream

@kibanamachine kibanamachine requested a review from a team as a code owner November 18, 2020 15:04
@afgomez afgomez closed this Nov 18, 2020
@afgomez afgomez reopened this Nov 18, 2020
@afgomez
Copy link
Contributor Author

afgomez commented Nov 18, 2020

@elasticmachine merge upstream

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

That seems to solve it, but I left a question about the implementation below.

@@ -84,6 +84,7 @@ const LogInContextWrapper = euiStyled.div<{ width: number | string; height: numb
padding: 16px;
width: ${(props) => (typeof props.width === 'number' ? `${props.width}px` : props.width)};
height: ${(props) => (typeof props.height === 'number' ? `${props.height}px` : props.height)};
max-height: 75vh; // Same as EuiModal
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to hard-code it like this even though there's a parameterized height prop? According to the CSS spec "max-height overrides height", so I wonder if we could somehow unify the treatment of both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the CSS spec "max-height overrides height"

I'm relying on this :) I want the content of the modal to "take as much height available (the height) without making it bigger than its container (the max-height, which replicates the value in the EuiModal).

The problem is that we have no control on the height of the modal itself. The content can be as tall as we want, but the modal will clip it no matter what *.


*: in Chrome at least. In Firefox it worked correctly, but I'm not sure what browser is breaking the standards here.

@afgomez
Copy link
Contributor Author

afgomez commented Nov 23, 2020

@elasticmachine merge upstream

@afgomez afgomez requested a review from weltenwort November 25, 2020 16:07
@afgomez
Copy link
Contributor Author

afgomez commented Nov 26, 2020

@elasticmachine merge upstream

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

I don't immediately see a better way either since the modal height is not exposed as a variable by EUI, so LGTM if CI agrees 👍

@kibanamachine
Copy link
Contributor

💚 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
infra 2.6MB 2.6MB +41.0B

History

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

@afgomez afgomez merged commit 36ab99e into elastic:master Nov 26, 2020
@afgomez afgomez deleted the 83063-view-in-context-clipping branch November 26, 2020 13:01
afgomez pushed a commit that referenced this pull request Nov 26, 2020
…83178) (#84410)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 30, 2020
* master:
  [Security Solution] Exceptions Cypress tests (elastic#81759)
  [ML] Fix spaces job ID check (elastic#84404)
  [Security Solution][Detections] Handle dupes when processing threshold rules (elastic#83062)
  skip flaky suite (elastic#84440)
  skip flaky suite (elastic#84445)
  [APM] Fix missing `service.node.name` (elastic#84269)
  Upgrade fp-ts to 2.8.6 (elastic#83866)
  Added data streams privileges to better control delete actions in UI (elastic#83573)
  Improve short-url redirect validation (elastic#84366)
  TSVB offsets (elastic#83051)
  [Discover] Fix navigating back when changing index pattern (elastic#84061)
  [Logs UI] Polish the UI for the log entry examples in the anomaly table (elastic#82139)
  [Logs UI] Limit the height of the "view in context" container (elastic#83178)
  [Application Usage] Update `schema` with new `fleet` rename (elastic#84327)
  fix identation in list (elastic#84301)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.10.1 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logs UI] "View in context" window is clipped on Chrome
4 participants