[Controls Anywhere] Add UI for grow and width settings to sticky controls#240149
Conversation
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
src/platform/plugins/shared/controls/public/actions/create_time_slider_action.tsx
Outdated
Show resolved
Hide resolved
| "unifiedSearch", | ||
| "uiActions" | ||
| "uiActions", | ||
| "kibanaReact" |
There was a problem hiding this comment.
Editing floating_actions.tsx without this present started throwing errors about kibanaReact being missing, because the controls renderer package imports useKibana. Not sure why this is suddenly being enforced, but I had to add this to get it to build.
|
Oh!! I guess I totally misunderstood what the fix for the jumping popover was going to be. I thought we were trying to move the actual gear icon, not just the anchor of the popover. @ThomThomson Is the video in the PR description inline with what you were thinking? It feels strange to me that a popover would not be attached to the action that triggered it, but 🤷 This is a good low-effort solution for the jumping possibly? |
src/platform/packages/private/kbn-controls-renderer/src/components/control_panel.tsx
Outdated
Show resolved
Hide resolved
|
@Heenawter yes this is exactly what I was intending from the fix. I agree it is a little weird having the popover not attached to the hover action that caused it, but I think it's a pretty small drawback. Unrelatedly, we might consider calling |
This reverts commit ecd69a3. # Conflicts: # src/platform/packages/private/kbn-controls-renderer/src/components/floating_actions.tsx
…/Zacqary/kibana into 234681-controls-display-settings
newline.movOne remaining question is what to do about the popover when changing the width setting moves the control to a new line, e.g. it's next to two controls with min widths of I don't see an obvious solution here. Should we call this good enough or try and come up with something? |
|
@ThomThomson Renamed |
src/platform/plugins/shared/controls/public/actions/edit_control_display_settings.tsx
Outdated
Show resolved
Hide resolved
src/platform/plugins/shared/controls/public/actions/edit_control_display_settings.tsx
Outdated
Show resolved
Hide resolved
src/platform/plugins/shared/controls/public/actions/edit_control_display_settings.tsx
Outdated
Show resolved
Hide resolved
src/platform/packages/private/kbn-controls-renderer/src/components/control_panel.tsx
Outdated
Show resolved
Hide resolved
src/platform/plugins/shared/controls/public/actions/edit_control_display_settings.tsx
Outdated
Show resolved
Hide resolved
src/platform/plugins/shared/controls/public/actions/edit_control_display_settings.tsx
Outdated
Show resolved
Hide resolved
|
|
||
| constructor() {} | ||
|
|
||
| public readonly MenuItem = ({ context }: { context: EmbeddableApiContext }) => { |
There was a problem hiding this comment.
In the past, we put the component in a separate file - see src/platform/plugins/shared/dashboard/public/dashboard_actions/filters_notification_action.tsx. It helps keep the action code simpler and easier to follow IMO. What do you think @Zacqary?
There was a problem hiding this comment.
I actually don't mind this all being in one file TBH. We try to keep files under 300ish lines, and IMO if there at or around this limit, breaking them into multiple files isn't really worth the overhead.
There was a problem hiding this comment.
Welp I already moved it, whoops
There was a problem hiding this comment.
Is it worth reverting @ThomThomson or should I just merge as-is?
💔 Build Failed
Failed CI StepsHistory
|
Summary
Closes #234681
controlwidth.mov
DisplaySettingsPopoverelement to the control panel, and anchors it to the left hand side drag handle/title label. This popover is not triggered by clicking its anchor