Skip to content

[EuiComboBox] Remove dropdown arrow when disabled; [EuiSelect] Remove Chrome opacity when disabled#6768

Merged
breehall merged 7 commits intoelastic:mainfrom
breehall:select/disabled-icon
May 12, 2023
Merged

[EuiComboBox] Remove dropdown arrow when disabled; [EuiSelect] Remove Chrome opacity when disabled#6768
breehall merged 7 commits intoelastic:mainfrom
breehall:select/disabled-icon

Conversation

@breehall
Copy link
Contributor

@breehall breehall commented May 10, 2023

Fixes #6601

Summary

Increase uniformity of dropdown components by:
✅ Removing the dropdown icon for EuiComboBox when the component is disabled.
✅ Updating the styling of EuiSelect to match the visual likeness of EuiComboBox by applying a style override to ensure the opactiy is set to 1 when it's disabled.

image

QA

  • View the EuiComboBox example in the PR Preview. When the select is disabled, we should not see the dropdown icon on the right hand side.
  • View a disabled EuiComboBox and EuiSelect in dark mode and they should have the same border and appearance.

General checklist

  • Checked in both light and dark modes
  • Added or updated jest and cypress tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

…n icon to be displayed if the form control is disabled.
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6768/

@breehall breehall marked this pull request as ready for review May 10, 2023 20:56
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6768/

@breehall breehall requested a review from cee-chen May 11, 2023 14:10
Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than only fixing this for EuiSelect, we should be standardizing behavior across all components with dropdown icons. The list of these components are:

  • EuiComboBox
  • EuiSelect
  • EuiSuperSelect
  • EuiColorPicker

Based on the fact that Caroline made the decision fairly recently - last year- to hide the arrow for disabled components - I don't think the resolution here is to show the arrow, I think it's to hide it for the 1 outlier, EuiComboBox. The UX decision makes sense to me honestly - a dropdown arrow indicates interactivity, usually, so hiding it when disabled will lead fewer people to try and click on it.

The linked issue also notes the disabled border colors are different on EuiComboBox, that's also something that needs to be fixed.

@breehall breehall marked this pull request as draft May 11, 2023 18:21
breehall added 3 commits May 11, 2023 14:23
… dropdown icon to be displayed if the form control is disabled."

This reverts commit d7cb27a.

Revert changes made to EuiSelect
…moving the dropdown icon when EuiComboBox is disabled.
…y to 1 when the select is disabled. Chrome applies an opinionated override that lowers the opacity
@breehall breehall force-pushed the select/disabled-icon branch from 22336a7 to 7b5a9c1 Compare May 11, 2023 20:36
@breehall breehall marked this pull request as ready for review May 11, 2023 20:47
@breehall breehall requested a review from cee-chen May 11, 2023 20:47
Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo - this feels much cleaner all around :) I think my only comments are around the changelog and how we categorize these changes - lmk what you think!

breehall and others added 2 commits May 11, 2023 16:59
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
@breehall breehall added the breaking change PRs with breaking changes. (Don't delete - used for automation) label May 11, 2023
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6768/

Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Thanks for this work Bree!

@cee-chen cee-chen changed the title [EuiSelect] Allow Dropdown Icon to Be Displayed When Select is Disabled [EuiComboBox] Remove dropdown arrow when disabled; [EuiSelect] Remove Chrome opacity when disabled May 12, 2023
@breehall breehall merged commit 3ab325b into elastic:main May 12, 2023
tkajtoch added a commit to elastic/kibana that referenced this pull request May 18, 2023
## Summary

`@elastic/eui@79.0.1` ⏩ `@elastic/eui@80.0.0`

---

## [`80.0.0`](https://github.com/elastic/eui/tree/v80.0.0)

- Improved the contrast ratio of meta labels within
`EuiSelectableTemplateSitewide` to meet WCAG AA guidelines.
([#6761](elastic/eui#6761))
- Added `vulnerabilityManagementApp` glyph to `EuiIcon`
([#6762](elastic/eui#6762))
- Added `logoVulnerabilityManagement` icon to `EuiIcon`
([#6763](elastic/eui#6763))
- Added `onPanelChange` callback to `EuiContextMenu` to provide consumer
access to `panelId` and `direction`.
([#6767](elastic/eui#6767))

**Bug fixes**

- Fixed `EuiComboBox` so `append` and `prepend` icon buttons are full
height and vertically centered.
([#6766](elastic/eui#6766))
- Improved the uniformity of dropdown components by hiding the dropdown
icon of disabled `EuiComboBox`s.
([#6768](elastic/eui#6768))

**Breaking changes**

- `EuiFieldNumber` now defaults the `step` prop to `"any"`
([#6760](elastic/eui#6760))
- EUI now globally resets a default Chromium browser style that was
decreasing the opacity of disabled `select` items.
([#6768](elastic/eui#6768))

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
delanni pushed a commit to delanni/kibana that referenced this pull request May 25, 2023
## Summary

`@elastic/eui@79.0.1` ⏩ `@elastic/eui@80.0.0`

---

## [`80.0.0`](https://github.com/elastic/eui/tree/v80.0.0)

- Improved the contrast ratio of meta labels within
`EuiSelectableTemplateSitewide` to meet WCAG AA guidelines.
([elastic#6761](elastic/eui#6761))
- Added `vulnerabilityManagementApp` glyph to `EuiIcon`
([elastic#6762](elastic/eui#6762))
- Added `logoVulnerabilityManagement` icon to `EuiIcon`
([elastic#6763](elastic/eui#6763))
- Added `onPanelChange` callback to `EuiContextMenu` to provide consumer
access to `panelId` and `direction`.
([elastic#6767](elastic/eui#6767))

**Bug fixes**

- Fixed `EuiComboBox` so `append` and `prepend` icon buttons are full
height and vertically centered.
([elastic#6766](elastic/eui#6766))
- Improved the uniformity of dropdown components by hiding the dropdown
icon of disabled `EuiComboBox`s.
([elastic#6768](elastic/eui#6768))

**Breaking changes**

- `EuiFieldNumber` now defaults the `step` prop to `"any"`
([elastic#6760](elastic/eui#6760))
- EUI now globally resets a default Chromium browser style that was
decreasing the opacity of disabled `select` items.
([elastic#6768](elastic/eui#6768))

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@breehall breehall deleted the select/disabled-icon branch October 6, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change PRs with breaking changes. (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiComboBox] Disabled Combobox looks different than disabled Select

3 participants