oui icon indicating copy to clipboard operation
oui copied to clipboard

feat: vertical oriented button group

Open ruanyl opened this issue 2 years ago • 9 comments

Description

This commit added a new prop(orientation) to the current OuiButtonGroup, the possible values are horizontal and vertical. The default value is horizontal which match the current UI behavior. With vertical prop, the button group will be oriented vertically.

Example: image

Please NOTE: vertical orientation doesn't work with button size compressed as compressed button group has a fixed height. @KrooshalUX Could you team provide some advices from UX perspective?

Issues Resolved

#659

Check List

  • [x] New functionality includes testing.
  • [x] New functionality has been documented.
  • [x] All tests pass
    • [x] yarn lint
    • [x] yarn test-unit
  • [x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

ruanyl avatar May 10 '23 04:05 ruanyl

@ruanyl great question re: compressed. I'm not entirely familiar with the implementation details so apologies if this is a bit naïve - Is there an approach where we can expand compressed beyond just a boolean? So if orientation = vertical and compressed = true then fixed width and if orientation = horizontal and compressed = true then fixed height ?

I'm wondering if the way this was structured is why some of the other components have orientation split into different components all together.

KrooshalUX avatar May 11 '23 05:05 KrooshalUX

@KrooshalUX

So if orientation = vertical and compressed = true then fixed width and if orientation = horizontal and compressed = true then fixed height

Technically it is doable, but if orientation = vertical with fixed width could potentially problematic as the button text might overflow.

I'm wondering if the way this was structured is why some of the other components have orientation split into different components all together.

Do you have an example of this?

ruanyl avatar May 11 '23 09:05 ruanyl

Do you have an example of this?

https://oui.opensearch.org/1.1/#/navigation/steps

BSFishy avatar May 11 '23 16:05 BSFishy

@ruanyl @KrooshalUX Is this a requirement for any 2.10 features?

joshuarrrr avatar Aug 28 '23 22:08 joshuarrrr

@joshuarrrr No, this is just an improvement

ruanyl avatar Aug 28 '23 23:08 ruanyl

@joshuarrrr nope, just something we want eventually.

@ruanyl can you outline where we are blocked ?

KrooshalUX avatar Aug 28 '23 23:08 KrooshalUX

@KrooshalUX This is not a blocker.

ruanyl avatar Aug 29 '23 00:08 ruanyl

@ruanyl oh, no , to clarify - understood its not a blocker for 2.10, but where are we blocked on finishing the issue? I am not sure if there is any outstanding decisions / need from UX ?

KrooshalUX avatar Aug 29 '23 00:08 KrooshalUX

I'm going to mark this as a draft for now, but @ruanyl feel free to take it out of draft status when you're able to make the updates.

joshuarrrr avatar Sep 08 '23 17:09 joshuarrrr

@virajsanghvi @AMoo-Miki @ashwin-pc Finally get the PR updated, could you take another look please?

ruanyl avatar Oct 30 '24 07:10 ruanyl

Can you add a changelog entry?

Curious, where would this be used in OSD? Is this part of any designs?

virajsanghvi avatar Oct 30 '24 17:10 virajsanghvi

Can you add a changelog entry?

Curious, where would this be used in OSD? Is this part of any designs?

Sure, I will update the changelog.

This change was originally introduced for maps plugin, it currently uses two buttons vertically aligned, but would be better to use a button group.

image

ruanyl avatar Oct 31 '24 01:10 ruanyl

@virajsanghvi PR updated, could you take another look please?

ruanyl avatar Nov 04 '24 02:11 ruanyl