Skip to content

[Observability] [Exploratory view] adjust popover placement#116471

Merged
dominiqueclarke merged 4 commits intoelastic:mainfrom
dominiqueclarke:feature/exploratory-view-date-picker-popover-placement
Nov 2, 2021
Merged

[Observability] [Exploratory view] adjust popover placement#116471
dominiqueclarke merged 4 commits intoelastic:mainfrom
dominiqueclarke:feature/exploratory-view-date-picker-popover-placement

Conversation

@dominiqueclarke
Copy link
Copy Markdown
Contributor

Summary

Fixes #113711

Adjusts the location of EuiDatePicker popover for subsequent series in exploratory view.

This PR resolves the issue for the date range start, but not the date range end. Final resolution of the date range end popover placement is dependent on elastic/eui#5328

This PR will be removed out of draft once the above issue is merged and eui is updated in 8.0.0 and backported in 7.16.0

@dominiqueclarke dominiqueclarke added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Oct 27, 2021
@dominiqueclarke dominiqueclarke requested a review from a team October 27, 2021 16:21
@dominiqueclarke dominiqueclarke added bug Fixes for quality problems that affect the customer experience v7.16.0 8.0.0 v8.0.0 auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes and removed 8.0.0 labels Oct 27, 2021
@cchaos
Copy link
Copy Markdown
Contributor

cchaos commented Oct 27, 2021

Hey @dominiqueclarke , we're working on the EUI issue, but I wanted to get some clarification. I'm confused about how changing the position from "left" to "right" fixes this screenshot:

Image 2021-10-27 at 5 29 49 PM

Is it specifically because it omits the "top" portion of the string and so ensures that it forces it to drop down rather than up? We're considering just supplying a top level prop that enforces the "down" behavior without being able to specify left/right becuase that should be determined by the position of the start/end times.

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

dominiqueclarke commented Oct 28, 2021

Hey @dominiqueclarke , we're working on the EUI issue, but I wanted to get some clarification. I'm confused about how changing the position from "left" to "right" fixes this screenshot:

Image 2021-10-27 at 5 29 49 PM

Is it specifically because it omits the "top" portion of the string and so ensures that it forces it to drop down rather than up? We're considering just supplying a top level prop that enforces the "down" behavior without being able to specify left/right becuase that should be determined by the position of the start/end times.

@cchaos Hi there!

There's a few different things at play here.

  1. The screenshot in question is from the original issue, which was reopened. The screenshot is the original position of the popover, without any fixes. The original fix went in this PR, and involved a combination of CSS adjustments and adjusting the popover placement. [Observability] [Exploratory View] Fix calendar cut off, change title, and close accordions on apply changes #113824

  2. Even though the placement was merged as left, we always intended it to display on the right. This PR is actually in response to the original issue being reopened. In the original, PR, I had actually screenshotted the popover displaying on the right, but had somehow managed to commit it as left. It's possible that the reviewer didn't notice an issue because our date range picker had a lot more room at the time to render the popover, so left was working fine. We've since adjusted the layout and left will not work, but right works well for both date range end and date range start. Picture for reference
    image

  3. We are dealing with a very limited space within exploratory view. You can play around with exploratory view currently if helpful. Series 1 uses the EuiSuperDatePicker. The problem is with the date range picker in series 2 and 3 which uses EuiDateRangePicker. The series themselves are contained inside an EuiResizablePanel, and the popovers be cut off when rendered on top or bottom. Right is the only place where we are certain there will be space. Pictures for reference

Screen Shot 2021-10-27 at 8 34 02 PM

Screen Shot 2021-10-27 at 8 36 37 PM

  1. I saw a mention on the PR of how much better it would be to render the popover in a portal. There was some discussion of this when this issue first cropped up, but that was decided against at the time. Our ideal solution would be to render the popover in a portal. Slack thread for reference https://elastic.slack.com/archives/C7QC1JV6F/p1633363693468200

Please let me know if that helps any. Happy to chat on Thursday.

@cchaos
Copy link
Copy Markdown
Contributor

cchaos commented Oct 28, 2021

Thanks @dominiqueclarke for the context! I have an idea that I'm going to try to codesandbox. It would mean a little more configuration on your part, but it should negate all these problems.

Copy link
Copy Markdown
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

While working on my idea (which we might be able to do in EUI instead) I found a really easy workaround for you. There's an isCustom prop that you can apply to the range which essentially just removes any forced props on the start and end controls. You'll just need to add a couple extra things to ensure it still renders correctly, but it will get popoverPlacement to apply right.

<EuiDatePickerRange
+ isCustom
  fullWidth
  startDateControl={
    <EuiDatePicker
+    fullWidth
      ...
    />
  }
  endDateControl={
    <EuiDatePicker
+    fullWidth
+    showIcon={false}
      ...
    />
  }
/>

@dominiqueclarke dominiqueclarke force-pushed the feature/exploratory-view-date-picker-popover-placement branch from cf2aa4f to 1a98850 Compare October 29, 2021 19:19
@dominiqueclarke dominiqueclarke marked this pull request as ready for review October 29, 2021 19:26
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks for taking care of it

image

@shahzad31
Copy link
Copy Markdown
Contributor

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
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
observability 375.6KB 375.6KB +52.0B

History

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

@dominiqueclarke dominiqueclarke merged commit 3a6a946 into elastic:main Nov 2, 2021
@dominiqueclarke dominiqueclarke deleted the feature/exploratory-view-date-picker-popover-placement branch November 2, 2021 18:46
@kibanamachine
Copy link
Copy Markdown
Contributor

The following labels were identified as gaps in your version labels and will be added automatically:

  • v8.1.0

If any of these should not be on your pull request, please manually remove them.

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Nov 2, 2021
…116471)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Nov 2, 2021
…116471)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
8.0
7.16

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 2, 2021
…#117209)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 3, 2021
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

3 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

kibanamachine added a commit that referenced this pull request Nov 9, 2021
…#117210)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.16.0 v8.0.0 v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Observability] [Exploratory View] EuiDatePicker is cut off in subsequent series series

5 participants