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

[EuiSuperDatePicker] Support onFocus #4924

Closed
thompsongl opened this issue Jun 28, 2021 · 7 comments
Closed

[EuiSuperDatePicker] Support onFocus #4924

thompsongl opened this issue Jun 28, 2021 · 7 comments
Labels
good first issue help wanted The EUI team is looking for community members to pick up and implement this issue stale-issue stale-issue-closed

Comments

@thompsongl
Copy link
Contributor

EuiSuperDatePicker should support onFocus. Given that there are multiple focusbale elements, the provided callback should likely only be called once on the initial element focus and not for each subcomponent focus event.

@ConaGo
Copy link

ConaGo commented Jul 2, 2021

Hi, i would like to give this issue a shot

@thompsongl
Copy link
Contributor Author

@ConaGo Go for it!

@ConaGo
Copy link

ConaGo commented Jul 8, 2021

Hey, i implemented the change also added a test. Unfortunately this test will make another, seemingly unrelated test fail
`
$ cross-env NODE_ENV=test jest --config ./scripts/jest/config.json
FAIL src/components/date_picker/super_date_picker/date_modes.test.ts (11.944s)
● dateMode › toRelativeString

expect(received).toBe(expected) // Object.is equality

Expected: "now"
Received: "now-1s"

  55 | 
  56 |   test('toRelativeString', () => {
> 57 |     expect(toRelativeString('2019-03-19T00:00:00.000Z')).toBe('now');   
     |                                                          ^
  58 |     expect(toRelativeString('2020-03-19T00:00:00.000Z')).toBe('now+1y');      59 |     expect(toRelativeString('2019-03-12T00:00:00.000Z')).toBe('now-1w');      60 |     expect(toRelativeString('2019-03-17T00:00:00.000Z')).toBe('now-2d');
  at Object.<anonymous> (src/components/date_picker/super_date_picker/date_modes.test.ts:57:58)

`
I made a pull request and hope we can resolve this issue together

@github-actions
Copy link

github-actions bot commented Jan 4, 2022

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@github-actions
Copy link

github-actions bot commented Jul 4, 2022

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@thompsongl thompsongl added help wanted The EUI team is looking for community members to pick up and implement this issue and removed assign:anyone stale-issue labels Jul 5, 2022
UzairNoman added a commit to UzairNoman/eui that referenced this issue Oct 22, 2022
UzairNoman added a commit to UzairNoman/eui that referenced this issue Oct 24, 2022
UzairNoman added a commit to UzairNoman/eui that referenced this issue Nov 2, 2022
UzairNoman added a commit to UzairNoman/eui that referenced this issue Nov 2, 2022
[EuiSuperDatePicker] Added code suggestions for onFocus (elastic#4924)

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
UzairNoman added a commit to UzairNoman/eui that referenced this issue Nov 2, 2022
UzairNoman added a commit to UzairNoman/eui that referenced this issue Nov 6, 2022
UzairNoman added a commit to UzairNoman/eui that referenced this issue Nov 7, 2022
cee-chen pushed a commit that referenced this issue Nov 7, 2022
* [EuiSuperDatePicker] Support onFocus (#4924)

* callback invoking multiple times.

* [EuiSuperDatePicker] Updated the onFocus call on buttonProps and prettyDuration (#4924)

* Apply suggestions from code review

[EuiSuperDatePicker] Added code suggestions for onFocus (#4924)

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* [EuiSuperDatePicker] Updated super_date_picker's tests and onFocus on prettyFormat  (#4924)

* [EuiSuperDatePicker] added test case for focus on superDatePickerShowDatesButton (#4924)

* [EuiSuperDatePicker] prettier error resolved (#4924)

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Jan 1, 2023

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue help wanted The EUI team is looking for community members to pick up and implement this issue stale-issue stale-issue-closed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants