[Canvas] Add simple variables to workpads#66139
Conversation
|
Pinging @elastic/kibana-canvas (Team:Canvas) |
0c40496 to
1d66696
Compare
1d66696 to
c7e8c3f
Compare
baaf27d to
19de317
Compare
x-pack/plugins/canvas/public/components/datasource/datasource_preview/index.js
Outdated
Show resolved
Hide resolved
2382b7c to
db09ca4
Compare
db09ca4 to
62e2e9d
Compare
There was a problem hiding this comment.
Some comments about using Eui variables. Avoid targeting Eui classes directly whenever possible (not sure you can do that for the table's header and footer but at least try to pass a custom class to the table so you don't target .euiTable).
Also left you a suggestion for the variables' accordion.
x-pack/plugins/canvas/public/components/var_config/edit_var.scss
Outdated
Show resolved
Hide resolved
x-pack/plugins/canvas/public/components/var_config/var_config.scss
Outdated
Show resolved
Hide resolved
| position: relative; | ||
| left: 0; | ||
|
|
||
| transition-property: left; |
There was a problem hiding this comment.
Thanks for the comment, @andreadelrio! For my part, the panel animation and back button inclusion were both intentional design decisions. Our thinking for recommending them was to give the user the impression that they are traversing one level deeper into the variables panel experience (almost like a modal-within-a-modal experience). The hope was that the animation and back button both help convey this feeling to the user. The back button also affords the user one additional way in which they can remove themselves from the experience, which I don't consider a bad thing.
Regarding keeping the accordion header visible at all times, our thinking was that it is unnecessary to continue to allow the user the ability to collapse a panel in which they have just made an action that tells us they wish to interact with the panel further (via changes to a variable). The hope was that replacing the accordion header with the back arrow and the current action's title maintains a better, simple panel hierarchy, while also further promoting the ideas above. Thoughts?
There was a problem hiding this comment.
@MichaelMarcialis Thanks for explaining that. When I thought about keeping the accordion header visible I didn't think "let's continue to allow them to collapse that panel" but more about "let's give them context and remind them where they are" i.e. Variables > Edit Variable. So in that sense, I think keeping the title could help communicate the existing hierarchy more clearly.
I agree that the back arrow can also help communicate that hierarchy and if you keep it, I would remove the accordion header. I think my main concern is that adding the left to right animation makes the interface feel a bit bloated. Maybe we could use another animation/transition.
There was a problem hiding this comment.
Cool. Just to dig into that a bit more, is it specifically the left-to-right animation that you dislike? Or is it more about timing/easing/etc? I can totally see the feeling of bloat if you feel the transition is a little too sluggish.
There was a problem hiding this comment.
Cool. Just to dig into that a bit more, is it specifically the left-to-right animation that you dislike? Or is it more about timing/easing/etc? I can totally see the feeling of bloat if you feel the transition is a little too sluggish.
It's the timing/easing. It doesn't feel super smooth.
There was a problem hiding this comment.
+1 to the animation being a bit rough. In testing this, it seems to freeze mid-way through. If we're going to keep it, then I agree it needs some refinement.
x-pack/plugins/canvas/public/components/var_config/var_panel.scss
Outdated
Show resolved
Hide resolved
x-pack/plugins/canvas/public/components/var_config/var_panel.scss
Outdated
Show resolved
Hide resolved
x-pack/plugins/canvas/public/components/var_config/var_panel.scss
Outdated
Show resolved
Hide resolved
x-pack/plugins/canvas/public/components/var_config/var_panel.scss
Outdated
Show resolved
Hide resolved
|
@elasticmachine merge upstream |
|
merge conflict between base and head |
MichaelMarcialis
left a comment
There was a problem hiding this comment.
Thanks for making those suggested changes, @poffdeluxe. Looks great! Approving.
If I get some time tomorrow, I'll try to join you in fiddling around with our animation options to see if we can smooth the sliding animation out a bit.
|
@elasticmachine merge upstream |
There was a problem hiding this comment.
As evidenced by the gif below, there is still a rather ugly state of the UI that occurs right after creation and deletion of a variable (note: this is in Firefox)
I suppose there could be differing opinions on whether or not this is a showstopper (since it all works fine), but for me it falls below our design threshold since it appears momentarily broken.
Is there anything else that can be done for that momentary glitch right after create/delete? It looks like the form height shrinks and exposes part of the incoming panel before the animation begins. Perhaps showing a loading div or something?
|
We opted to remove the animation for now given the glitches and inconsistencies which appeared for me in both Firefox and Chrome. The design itself makes sense in that it provides some additional context as the form appears, but we need more time to experiment than what remains in this release. The feature itself works well, so lets revisit the animation enhancement post FF. |
|
nice work, @poffdeluxe and @ryankeairns...! @andreadelrio Do you have any further changes that need to be made, or can this PR be approved on your part? |
|
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
History
To update your PR or re-run it, just comment with: |
* Add simple variables to Canvas workpads * Fix type for workpad variable action and clarify comment * Fix types in fixtures and templates * Fixing type check errors on actions * Addressing pr feedback and refactoring canvas sidebar accordions * Render true/false instead of Yes/no on variables * add warning callout when editing a variable * Address review feedback * More feedback * updating storyshot with new edit mode callout * Some animation tweaks for the panel * one more panel tweak * Removing the slide transition for now Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>





Summary
Adds variables to Canvas workpads by consuming
varfunction added to the expressions plugin.At the moment, three variable types are supported: boolean, number, and string.
STILL TODO:
a11y workUI cleanupDouble check workpad migrationChecklist
Delete any items that are not applicable to this PR.
For maintainers