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

[Data UI] [Fleet] Add submitOnBlur functionality to QueryStringInput #93819

Merged
merged 5 commits into from
Mar 15, 2021

Conversation

Zacqary
Copy link
Contributor

@Zacqary Zacqary commented Mar 5, 2021

Summary

Fixes an issue identified in #92853 (comment)

This adds a prop called submitOnBlur to the QueryStringInput component. When true, the component will trigger its onSubmit event when the user clicks or tabs away from the component, instead of requiring them to press Enter to make it happen.

Note that this doesn't simply rely on the base onBlur function, as using the mouse to interact with the autocomplete dropdown will momentarily trigger onBlur. Instead, it waits 200ms to make sure the query string <textarea> element has not been re-focused, to ensure that the onBlur was actually the result of an intentional user blur of the element.

API Docs are updated by this PR. This is a minor change.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Mar 5, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jen-huang jen-huang added NeededFor:Fleet Needed for Fleet Team and removed NeededFor:Fleet Needed for Fleet Team labels Mar 8, 2021
@Zacqary Zacqary self-assigned this Mar 8, 2021
@Zacqary
Copy link
Contributor Author

Zacqary commented Mar 9, 2021

@elasticmachine merge upstream

@Dosant Dosant self-requested a review March 9, 2021 17:36
Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

This LGTM

I worked on some bugfixes in that area and in pending pr adding a hook where I think, submitOnBlur will be ideal: https://github.com/elastic/kibana/pull/94148/files#diff-9c21b61183abad2b8d078185afa822ec12ff2237a3dfe9b0bf09880028528f39R514-R518

I also unskipped tests of that component, so it would be possible to add a test here.

If it is not time pressing, we could wait a bit with this pr until #94148 goes through.
Up to you. Otherwise, I'll merge master and will likely move that handler into the new scheduleOnInputBlur

@Zacqary
Copy link
Contributor Author

Zacqary commented Mar 15, 2021

@elasticmachine merge upstream

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Fleet changes 🚀 it works as expected

@Zacqary
Copy link
Contributor Author

Zacqary commented Mar 15, 2021

@Dosant I think I want to get this merged just so it's not waiting in the PR queue for a while. Let me know if you need any help merging it with #94148

@Zacqary Zacqary enabled auto-merge (squash) March 15, 2021 17:08
@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
data 211.3KB 211.4KB +126.0B
fleet 755.4KB 755.4KB +18.0B
total +144.0B

History

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

cc @Zacqary

@Zacqary Zacqary merged commit cda2fb3 into elastic:master Mar 15, 2021
Zacqary added a commit to Zacqary/kibana that referenced this pull request Mar 15, 2021
…lastic#93819)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Zacqary added a commit that referenced this pull request Mar 15, 2021
…93819) (#94646)

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeededFor:Fleet Needed for Fleet Team release_note:enhancement Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants