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

Inherit commonly used data on relative tab on EuiSuperDatePicker #3106

Merged
merged 6 commits into from
Mar 19, 2020

Conversation

ashikmeerankutty
Copy link
Contributor

@ashikmeerankutty ashikmeerankutty commented Mar 17, 2020

Summary

Fixes #1600
Fixed inherit commonly used data on the relative tab on EuiSuperDatePicker

From

from

To

to1

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples
- [ ] Added or updated jest tests
- [ ] Checked for breaking changes and labeled appropriately
- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@ashikmeerankutty ashikmeerankutty changed the title ixed inherit commonly used data on relative tab Fixed inherit commonly used data on relative tab Mar 17, 2020
@ashikmeerankutty ashikmeerankutty changed the title Fixed inherit commonly used data on relative tab Fixed inherit commonly used data on relative tab on EuiSuperDatePicker Mar 17, 2020
@ashikmeerankutty ashikmeerankutty changed the title Fixed inherit commonly used data on relative tab on EuiSuperDatePicker Inherit commonly used data on relative tab on EuiSuperDatePicker Mar 17, 2020
@cchaos
Copy link
Contributor

cchaos commented Mar 19, 2020

Jenkins test this

@cchaos cchaos requested a review from thompsongl March 19, 2020 12:54
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3106/

Copy link
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.

This does appear to fix the issue. 👍 I'd like @thompsongl to do a quick review of the code.

CHANGELOG.md Outdated Show resolved Hide resolved
@thompsongl
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3106/

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

This does fix the 0 seconds ago problem, but highlights a different problem:

Screen Shot 2020-03-19 at 11 46 42 AM

The end date popover shows the same relative time as the start date popover ("now" is fine)

I don't think this is directly related to the issue at hand, so I'll investigate some more but likely open a new issue, allowing this to merge

@ashikmeerankutty
Copy link
Contributor Author

ashikmeerankutty commented Mar 19, 2020

This does fix the 0 seconds ago problem, but highlights a different problem:

Screen Shot 2020-03-19 at 11 46 42 AM

The end date popover shows the same relative time as the start date popover ("now" is fine)

I don't think this is directly related to the issue at hand, so I'll investigate some more but likely open a new issue, allowing this to merge

@thompsongl I got two possible fixes

  1. By returning end as now in applyTime function in EuiCommonlyUsedTimeRanges
  2. Updating the commonDurationRanges array.

Do I have to push that changes or create another PR for the same?

@thompsongl
Copy link
Contributor

Do I have to push that changes or create another PR for the same?

If you think you have a fix already, go ahead and push to this branch. For what it's worth, the only problem seems to be with "Relative" dates in the "End date" popover; absolute and now are fine, as is everything in the "Start date" popover

@ashikmeerankutty
Copy link
Contributor Author

@thompsongl Thanks for the suggestion. My fix doesn't work. I will investigate further on this issue 👍

@thompsongl
Copy link
Contributor

Thanks, @ashikmeerankutty

I'll likely merge this and open an new issue. Feel free to continue work in a new PR if you come upon a fix.

@thompsongl
Copy link
Contributor

#3131 covers the new case discovered after the fix in this PR

@thompsongl thompsongl merged commit 8e0daf9 into elastic:master Mar 19, 2020
@ashikmeerankutty ashikmeerankutty deleted the fix2/super-date-picker branch April 15, 2020 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EuiSuperDatePicker] Clicking start/end inputs doesn't display the correct relative value
4 participants