-
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
[Controls] Control Group Embeddable and Management Experience #111065
[Controls] Control Group Embeddable and Management Experience #111065
Conversation
…ing and removing controls
3085e6b
to
cdb50c1
Compare
I think some of the PR description ghosted on you. |
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.
Overall looks pretty good! Just a few nits
...ugins/presentation_util/public/components/controls/control_frame/control_frame_component.tsx
Outdated
Show resolved
Hide resolved
src/plugins/presentation_util/public/components/controls/control_frame/control_frame_strings.ts
Outdated
Show resolved
Hide resolved
...plugins/presentation_util/public/components/controls/control_group/editor/manage_control.tsx
Outdated
Show resolved
Hide resolved
...tion_util/public/components/controls/control_group/editor/manage_control_group_component.tsx
Outdated
Show resolved
Hide resolved
@@ -58,22 +61,19 @@ export const OPTIONS_LIST_CONTROL = 'optionsListControl'; | |||
export interface OptionsListEmbeddableInput extends InputControlInput { | |||
field: string; | |||
indexPattern: string; | |||
multiSelect: boolean; | |||
singleSelect?: boolean; |
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.
just curious: what's the reason for this flip?
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 flipped because multiselect
defaults to true. Making an optional singleSelect
entry in the input is the easiest way to handle that because undefined is falsy. If you want multiselect
you can just pass nothing!
It's the perfect time right for renaming input keys, because once this is released we'd have to write migrations for changes like this.
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.
A couple of items to consider in addition to the comments in the code:
Mismatched border-radius
Consider sorting selected items to the top
If this list is very long, it would be a pain to find all the currently selected values. Alternatively, a way to unselect all would be nice (this sounds like an EUI request).
...plugins/presentation_util/public/components/controls/control_group/editor/manage_control.tsx
Outdated
Show resolved
Hide resolved
...plugins/presentation_util/public/components/controls/control_group/editor/manage_control.tsx
Show resolved
Hide resolved
$smallControl: $euiSize * 14; | ||
$mediumControl: $euiSize * 25; | ||
$largeControl: $euiSize * 50; | ||
$controlMinWidth: $euiSize * 14; |
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.
Does it make sense to just set $controlMinWidth: $smallControl
since they are the same value?
src/plugins/presentation_util/public/components/controls/control_group/control_group.scss
Outdated
Show resolved
Hide resolved
Also, FWIW, the dragging feels more natural than it did last time I tried this out. The gray bordered box/placeholder also reminds me of the size of the thing I'm about to drop which seems like a decent tradeoff (and better than the empty space from before). |
src/plugins/presentation_util/public/components/controls/control_group/control_group.scss
Outdated
Show resolved
Hide resolved
This is happening because we're doing |
src/plugins/presentation_util/public/components/controls/control_group/control_group.scss
Outdated
Show resolved
Hide resolved
Regarding the Also, do we want to adjust the title of this flyout so that it is |
@ryankeairns for the issue of sorting selected items to the top, I think we need to holistically consider it for the Options List. I have created a follow up issue, which I will address in another PR. The issue includes some of the items we talked about before with selections, and can use your input! @andreadelrio: Moving the title to the bottom is a great idea UX-wise. Unfortunately, it will take some engineering effort, since the title is part of the generic editor, and the field name is selected in the editor for the specific input control type. That said, the UX benefits far outweigh the challenges, so it would be an ideal candidate for a follow-up PR. |
Co-authored-by: Andrea Del Rio <[email protected]>
@elasticmachine merge upstream |
merge conflict between base and head |
@elasticmachine merge upstream |
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.
AppServices change LGTM.
Clean up flyouts
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
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.
Thanks for the changes and for creating follow-up issues.
The border radius still looks a little off but, as Andrea and I discussed, we can do some final polish work once we see this within the Kibana context.
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Closes #101191
Closes #108296
Closes #112838
Closes #108292
Closes #112841
Summary
Replacement for #109138.
This PR introduces a
Control Group
embeddable to the input controls storybook. This embeddable is a container similar to the Dashboard Container, and has the ability to:Gifs covering important features incoming once @andreadelrio is finished making it look nicer!
Todo next: