-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Vis: Default editor] EUIficate order and size controls #35134
[Vis: Default editor] EUIficate order and size controls #35134
Conversation
Pinging @elastic/kibana-app |
💔 Build Failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at the comments
💔 Build Failed |
💚 Build Succeeded |
Hi @cchaos ! Does it an appropriate way or you could propose another one? Thanks 😊 P.S. :
if @timroes and @maryia-lapata are OK with this ? |
# Conflicts: # src/legacy/ui/public/agg_types/buckets/significant_terms.js
My worry with your inline style solution is if they are ever actually not used together then you're always applying that 50% width. I would suggest creating some way of allowing grouping multiple inputs on one line as it's the most extensible. Then you can just use EuiFlexGroups to contain them. |
💚 Build Succeeded |
@cchaos , during the investigation of the problem I found that another solutions would break an existing interface of building aggregation params container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Chrome Mac, with custom locale, LGTM, just minor comments
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can work as a solution. Though, I'd like to make it more specific to being "half" the size.
import React from 'react'; | ||
|
||
const wrapWithInlineComp = Component => props => ( | ||
<div className={`visEditorAggParam--inline visEditorAggParam--inline-${props.aggParam.name}`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that if you go the route of renaming this to explicitly state half
then you won't need to depend on the props.aggParam.name
and the margin can be added to a sibling CSS selector like: .visEditorAggParam--half + .visEditorAggParam--half
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cchaos are you OK with current implementation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have a concern around using the aggParam name.
Will props.aggParam.name
eve have a space in it like "name here"? If so you'll end up with a className list like: visEditorAggParam--inline visEditorAggParam--inline-name here
which causes .here
to be a valid class which is not good.
I also still think you can change the class from --inline
to --half
so it's easily understood that the CSS will make that field 50% wide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will
props.aggParam.name
eve have a space in it like "name here"? If so you'll end up with a className list like:visEditorAggParam--inline visEditorAggParam--inline-name here
which causes.here
to be a valid class which is not good.
It never can have a space in a name because we are using these names in a url string. These names should always have or camelCase style or _
between words, like intervalBase
, ip_range
, min_doc_count
, extended_bounds
and so on.
I also still think you can change the class from
--inline
to--half
so it's easily understood that the CSS will make that field 50% wide.
This work has been already done in this commit
width: 50%; | ||
} | ||
|
||
.visEditorAggParam--inline-size { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As stated above about the class names this can be changed to:
.visEditorAggParam--inline-size { | |
.visEditorAggParam--half + .visEditorAggParam--half { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😢
💚 Build Succeeded |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional tests update reviewed and tested on MacOS 10.14.4
LGTM
💚 Build Succeeded |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working for me locally, I scanned the code and it is mostly good, so LGTM
…_and_size # Conflicts: # src/legacy/ui/public/agg_types/buckets/terms.js
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected. Also checked with custom locale and checked accessibility with VoiceOver.
LGTM
* EUIficate order and size controls
Summary
Part of #30922.
EUIfication of other
order
andsize
controls for aggregation parameter.These controls are used under
Terms
andSignificant Terms
aggregations.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers