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

[UI Framework] Add AssistedInput. #11343

Merged
merged 3 commits into from Apr 21, 2017

Conversation

cjcenizal
Copy link
Contributor

@cjcenizal cjcenizal commented Apr 20, 2017

Provides functionality required by #10928. Fixes bugs created by #11287.

image

image

@cjcenizal cjcenizal added Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. release_note:enhancement v5.5.0 v6.0.0 labels Apr 20, 2017
@cjcenizal cjcenizal requested review from snide and Bargs April 20, 2017 12:24
@snide
Copy link
Contributor

snide commented Apr 20, 2017

@cjcenizal Minor css feedback. You might want to use that lighter shade blue in the dark version (the one for "Discover") just so it doesn't stand out as much.

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Minor comments on css vars.


// Form
$formControlPaddingSides: 12px;
$formControlPadding: 3px $formControlPaddingSides 4px;
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a global i think, prolly want to prefix it $globalFormPadding

@@ -63,3 +63,7 @@ $toolBarHeight: 50px;
$toolBarPadding: 10px;
$toolBarSectionSpacing: 50px;
$toolBarItsemSpacing: 10px;

// Form
$formControlPaddingSides: 12px;
Copy link
Contributor

Choose a reason for hiding this comment

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

If you need this level of definition... horizontalPadding is probably more specific then sides

border-color: $localSearchBackgroundColor;
border-top-color: $localSearchBackgroundColor;
border-bottom-color: $localSearchBackgroundColor;
border-radius: 4px 0 0 4px;
Copy link
Contributor

Choose a reason for hiding this comment

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

can use $globalBorderRadius for the 4px.

@cjcenizal
Copy link
Contributor Author

@snide Great call on the contrast. I updated this in a separate PR:

image

Copy link
Contributor

@Bargs Bargs left a comment

Choose a reason for hiding this comment

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

@cjcenizal maybe I applied the classes wrong, but it seems like the input's padding isn't adjusted to account for the link, which leads to the query string overrunning the link text:

screen shot 2017-04-20 at 4 43 50 pm

Thoughts on how to accomplish that since the link could be different lengths depending on where this component is used?

Also, we should probably wait on merging this until @tbragin has a chance to weigh in on the current solution in #10928 since she filed the original issue.

@cjcenizal
Copy link
Contributor Author

@Bargs Yeah, I noted in the UI Framework docs that you have to customize the padding (the components don't have it built-in):

You have to specify right-side padding using a custom class or inline style to keep the input text from overlapping with the assistance content. Use em units for this padding so that it scales appropriately if the user changes their root font-size.

So we just need to create a class in Kibana for each use-case, e.g. "discoverSearchHelpLink", and apply it where it's needed.

@Bargs
Copy link
Contributor

Bargs commented Apr 20, 2017

Ah cool, totally glazed over that. Works for me!

@cjcenizal
Copy link
Contributor Author

@Bargs Thanks man! These components are pretty usable in different scenarios, so I can see use-cases for them beyond the original PR. I'll merge it for now. We can always remove the components later if we want.

@cjcenizal cjcenizal merged commit bd1f63d into elastic:master Apr 21, 2017
@cjcenizal cjcenizal deleted the feature/assisted-field branch April 21, 2017 02:47
cjcenizal added a commit to cjcenizal/kibana that referenced this pull request Apr 21, 2017
* Add AssistedInput component.
* Add missing .kuiLocalSearchSelect class. Add AssistedInput to LocalNav example.
cjcenizal added a commit that referenced this pull request Apr 21, 2017
* Add AssistedInput component.
* Add missing .kuiLocalSearchSelect class. Add AssistedInput to LocalNav example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. v5.5.0 v6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants