kibana icon indicating copy to clipboard operation
kibana copied to clipboard

[Canvas] PieVis integration to Canvas.

Open Kuznietsov opened this issue 3 years ago • 37 comments

Summary

Completes part of https://github.com/elastic/kibana/issues/121725 and https://github.com/elastic/kibana/issues/95902.

  • [X] Added views/models/elements to Canvas for pieVis.
  • [X] Added legendPosition: Position.Right as default at pieVis/mosaicVis/treemapVis/waffleVis.
  • [X] Added handling of values, other then right/left/top/bottom, passed to the legendPosition argument. Now, expressions are throughing the error in such a case.
Screenshot 2022-07-06 at 14 43 20

Screenshot 2022-07-08 at 09 44 46

Popup text

Screenshot 2022-07-01 at 14 34 57 Screenshot 2022-07-01 at 14 35 13 Screenshot 2022-07-01 at 14 35 27 Screenshot 2022-07-01 at 14 35 41 Screenshot 2022-07-01 at 14 35 51 Screenshot 2022-07-06 at 14 37 38 Screenshot 2022-07-06 at 14 41 00 Screenshot 2022-07-01 at 14 36 46 Screenshot 2022-07-01 at 14 37 00 Screenshot 2022-07-01 at 14 37 14 Screenshot 2022-07-01 at 14 37 47 Screenshot 2022-07-01 at 14 37 57

Other

Screenshot 2022-06-30 at 12 47 14

Kuznietsov avatar Feb 02 '22 09:02 Kuznietsov

@elasticmachine merge upstream

Kuznietsov avatar Feb 03 '22 11:02 Kuznietsov

@elasticmachine merge upstream

Kuznietsov avatar Feb 03 '22 11:02 Kuznietsov

@elasticmachine merge upstream

Kuznietsov avatar Feb 03 '22 16:02 Kuznietsov

Pinging @elastic/kibana-presentation (Team:Presentation)

elasticmachine avatar Feb 16 '22 08:02 elasticmachine

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

elasticmachine avatar Feb 16 '22 08:02 elasticmachine

@mbondyra, thanks for your review )

Kuznietsov avatar Feb 16 '22 09:02 Kuznietsov

Thanks @Kunzetsov ! There will be quite a few design/copy edits coming for the sidebar, but we're currently a bit backlogged. We'll get you this feedback ASAP.

ryankeairns avatar Feb 16 '22 16:02 ryankeairns

@elasticmachine merge upstream

Kuznietsov avatar Feb 18 '22 07:02 Kuznietsov

@andreadelrio, thanks for your review. Those requested changes will lead to huge changes in the Canvas' architecture and I'll need to discuss that with @crob611, especially, if it is worth those efforts and to which version we'll add it. Thanks for your detailed review. 👍

Kuznietsov avatar Feb 24 '22 11:02 Kuznietsov

@elasticmachine merge upstream

Kuznietsov avatar Feb 24 '22 11:02 Kuznietsov

@Kunzetsov @crob611 The changes @andreadelrio proposed keep the UI in line with the behavior of existing elements and, thus, reflect patterns long-established in Canvas. This PR, as-is, is not in a shippable state from a UI perspective and - at minimum - we should consider a subset of the proposed changes prior to merging.

In particular, this pattern of switches without labels is something we should avoid.

Screen Shot 2022-02-24 at 7 48 54 AM

ryankeairns avatar Feb 24 '22 13:02 ryankeairns

@Kunzetsov @crob611 The changes @andreadelrio proposed keep the UI in line with the behavior of existing elements and, thus, reflect patterns long-established in Canvas. This PR, as-is, is not in a shippable state from a UI perspective and - at minimum - we should consider a subset of the proposed changes prior to merging.

In particular, this pattern of switches without labels is something we should avoid.

Screen Shot 2022-02-24 at 7 48 54 AM

@ryankeairns, yes, sure, I don't expect this PR to be merged in such a state) I understand, that we must follow your guidelines. Possibly, I haven't paid enough attention to the possible solution. From the first view, I can see, that it is touching so many parts of the Canvas for now. The main problem is in the form of the expression (it has nested expressions) and in the way, Canvas is adding the configuration. Before nested expressions were not supported and I've added a simple solution some time ago. In this case, it doesn't work and makes things more complex. I need some time to find the workaround for this way of configuring the Canvas sidebar. Later, when I'll have the whole plan of updates (from the side of the code), I'll discuss them with Corey and implement them in this PR (in some of the further versions). WDYT?

Kuznietsov avatar Feb 24 '22 13:02 Kuznietsov

Thanks for the additional context, that seems like a practical approach to me. After you speak with Corey, please share what you both feel would be possible and we can adjust our recommendations, consider alternatives, and help determine what to push off to a future PR(s).

If I recall correctly, the sidebar is or can be a subset of what is handled by the expression itself. In the past, we would aim to expose what we felt was most useful while also considering what may be too complex. In other words, if we need to omit some things form the sidebar UI, then that is an option we can consider as well.

ryankeairns avatar Feb 24 '22 14:02 ryankeairns

Re: the error message, our guidelines say not to use "Whoops!". Could the title be something like "Cannot complete expression"? "Expression failed" is ok in the title, but it is also stated in the first line.

Also, I recommend changing the button name from "See details" to "View details".

Can you provide a screenshot of the text that Ryan is referring to that needs verb + noun?

gchaps avatar Jun 24 '22 22:06 gchaps

@elasticmachine merge upstream

Kuznietsov avatar Jun 27 '22 10:06 Kuznietsov

@gchaps, done. Could you, please, review it again. Thanks.

Kuznietsov avatar Jun 27 '22 10:06 Kuznietsov

I reviewed the text for the tooltips and for the toggle buttons. In most cases, I don't feel the tooltip is necessary as it repeats the title. There isn't a lot of room next to the toggle switch other than to say "Enable toggle" or "Show donut chart" which seems redundant with the title.

A better approach to the text would be the style that Andrea proposes:

Screen Shot 2022-06-28 at 2 39 33 PM

This gives us more room for the switch label so it says more than repeating the title.

gchaps avatar Jun 28 '22 22:06 gchaps

@gchaps, updated the code and screenshots. Could you, please, review it and approve the PR or request some changes? Thanks a lot 😃

Kuznietsov avatar Jun 30 '22 11:06 Kuznietsov

Punctuation Add an ending period after each tooltip.

Donut hole size tooltip: Set the inner diameter of the donut hole. Specify the percentage for the inner diameter of the donut hole.

Legend settings Legend visibility and Legend position have weird breaks. Can you put all Legend settings under one category?

Legend

Visibility Position Detail Text Max lines

Alternately, break Legend visibility and Legend position into 2 lines

Legend visibility

Legend position

Label configuration

Label configuration (make label singular) Show label settings.

Other

Since the new design allows for more words, suggest making these a little longer:

Change "Data order" to:

Order of data Use original order

Change Placement to "Slice placement"

gchaps avatar Jun 30 '22 16:06 gchaps

Punctuation Add an ending period after each tooltip.

For the reasons of consistency with all the rest Canvas elements, it is required to remove points at all the tooltips.

Donut hole size tooltip: Set the inner diameter of the donut hole. Specify the percentage for the inner diameter of the donut hole.

Will do

Legend settings Legend visibility and Legend position have weird breaks. Can you put all Legend settings under one category?

Legend

Visibility Position Detail Text Max lines

No, we can’t.

Label configuration

Label configuration (make label singular) Show label settings.

Will do

Other

Since the new design allows for more words, suggest making these a little longer: Change "Data order" to: Order of data Use original order

Will do

Change Placement to "Slice placement"

Will do

Kuznietsov avatar Jun 30 '22 18:06 Kuznietsov

@gchaps, I've updated the text. Could you review it, please? Thanks.

Kuznietsov avatar Jul 01 '22 11:07 Kuznietsov

@elasticmachine merge upstream

Kuznietsov avatar Jul 01 '22 11:07 Kuznietsov

expected head sha didn’t match current head ref.

kibanamachine avatar Jul 01 '22 11:07 kibanamachine

@elasticmachine merge upstream

Kuznietsov avatar Jul 04 '22 08:07 Kuznietsov

Although the best solution would be to add a label or to break the Legend text into two lines, how about this text? So that there is no break in the text:

Legend visibility > Legend view Legend placement > Placement

gchaps avatar Jul 05 '22 15:07 gchaps

@elasticmachine merge upstream

Kuznietsov avatar Jul 06 '22 10:07 Kuznietsov

@elastic/kibana-presentation, could you, please, review this PR? Thanks 😃

And @andreadelrio, could you, please, approve it to cancel your Request changes? Thanks a lot too 😃

Kuznietsov avatar Jul 08 '22 06:07 Kuznietsov

@elasticmachine merge upstream

Kuznietsov avatar Jul 08 '22 11:07 Kuznietsov

@elasticmachine merge upstream

Kuznietsov avatar Jul 11 '22 06:07 Kuznietsov

@elasticmachine merge upstream

Kuznietsov avatar Jul 15 '22 09:07 Kuznietsov