From 2834ef5475b05a15a20fd24212f5cec0ed6d11a6 Mon Sep 17 00:00:00 2001 From: lejara Date: Fri, 17 Sep 2021 00:49:19 -0400 Subject: [PATCH 1/5] Add title when in iconOnly mode using label --- src/components/button/button_group/button_group_button.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/button/button_group/button_group_button.tsx b/src/components/button/button_group/button_group_button.tsx index 26891b11635..6d662ffa760 100644 --- a/src/components/button/button_group/button_group_button.tsx +++ b/src/components/button/button_group/button_group_button.tsx @@ -129,6 +129,7 @@ export const EuiButtonGroupButton: FunctionComponent = ({ 'data-text': innerText, title: innerText, }} + title={isIconOnly ? label?.toString() : undefined} {...elementProps} {...rest} > From 1dac397874303f350d7798034badab43f4048877 Mon Sep 17 00:00:00 2001 From: lejara Date: Fri, 17 Sep 2021 00:53:35 -0400 Subject: [PATCH 2/5] Update button_group snapshot --- .../button_group/__snapshots__/button_group.test.tsx.snap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/button/button_group/__snapshots__/button_group.test.tsx.snap b/src/components/button/button_group/__snapshots__/button_group.test.tsx.snap index 038e1c9d6e7..86adb6a3c6d 100644 --- a/src/components/button/button_group/__snapshots__/button_group.test.tsx.snap +++ b/src/components/button/button_group/__snapshots__/button_group.test.tsx.snap @@ -2316,6 +2316,7 @@ exports[`EuiButtonGroup button props isIconOnly is rendered for multi 1`] = ` class="euiButtonGroupButton euiButtonGroupButton--text euiButtonGroupButton--small euiButtonGroupButton-isIconOnly testClass1 testClass2" data-test-subj="test subject string" id="generated-id" + title="Option one" type="button" > Date: Fri, 17 Sep 2021 13:17:22 -0400 Subject: [PATCH 3/5] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2fb0d610ae..c00bb4d5426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Added `title` in `EuiButtonGroup` when in `iconOnly` mode ([#5199](https://github.com/elastic/eui/pull/5199)) - Updated `barSeriesStyle.displayValue` of the elastic-charts `Theme` for better default styles ([#4845](https://github.com/elastic/eui/pull/4845)) **Bug fixes** From 771972d2720efe1590820b821c3b7fdfb5fdc32c Mon Sep 17 00:00:00 2001 From: lejara Date: Fri, 17 Sep 2021 15:36:51 -0400 Subject: [PATCH 4/5] Move title prop out of textprops --- CHANGELOG.md | 2 +- .../button_group/__snapshots__/button_group.test.tsx.snap | 6 ------ src/components/button/button_group/button_group_button.tsx | 3 +-- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c00bb4d5426..554e2d89ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -- Added `title` in `EuiButtonGroup` when in `iconOnly` mode ([#5199](https://github.com/elastic/eui/pull/5199)) +- Moved `title` prop out of `textprops` to `EuiButtonDisplay` ([#5199](https://github.com/elastic/eui/pull/5199)) - Updated `barSeriesStyle.displayValue` of the elastic-charts `Theme` for better default styles ([#4845](https://github.com/elastic/eui/pull/4845)) **Bug fixes** diff --git a/src/components/button/button_group/__snapshots__/button_group.test.tsx.snap b/src/components/button/button_group/__snapshots__/button_group.test.tsx.snap index 86adb6a3c6d..038e1c9d6e7 100644 --- a/src/components/button/button_group/__snapshots__/button_group.test.tsx.snap +++ b/src/components/button/button_group/__snapshots__/button_group.test.tsx.snap @@ -2316,7 +2316,6 @@ exports[`EuiButtonGroup button props isIconOnly is rendered for multi 1`] = ` class="euiButtonGroupButton euiButtonGroupButton--text euiButtonGroupButton--small euiButtonGroupButton-isIconOnly testClass1 testClass2" data-test-subj="test subject string" id="generated-id" - title="Option one" type="button" > = ({ : 'euiButtonGroupButton__textShift', ref: buttonTextRef, 'data-text': innerText, - title: innerText, }} - title={isIconOnly ? label?.toString() : undefined} + title={innerText} {...elementProps} {...rest} > From 6036326b6f457b8221aeb40403d4406a13fcb1cf Mon Sep 17 00:00:00 2001 From: Leonel Jara Date: Mon, 20 Sep 2021 16:19:39 -0400 Subject: [PATCH 5/5] Update CHANGELOG.md Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50b76a2d28e..450f6dc3bf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -- Moved `title` prop out of `textprops` to `EuiButtonDisplay` ([#5199](https://github.com/elastic/eui/pull/5199)) +- Fixed the `title` prop `EuiButtonGroup` to automatically display the `label` provided ([#5199](https://github.com/elastic/eui/pull/5199)) - Updated `barSeriesStyle.displayValue` of the elastic-charts `Theme` for better default styles ([#4845](https://github.com/elastic/eui/pull/4845)) - Updated `titleProps` and `descriptionProps` on `EuiDescriptionList` to extend `CommonProps` ([#5166](https://github.com/elastic/eui/pull/5166)) - Added the ability to return `visibleOptions` from `EuiSelectable` by using `onSearch` ([#5178](https://github.com/elastic/eui/pull/5178))