Skip to content

[EuiBasicTable] Support indeterminate checkboxes in header row - #7817

Merged
cee-chen merged 2 commits into
elastic:mainfrom
cee-chen:table-selection-indeterminate
Jun 6, 2024
Merged

cee-chen merged 2 commits into
elastic:mainfrom
cee-chen:table-selection-indeterminate

Conversation

@cee-chen

@cee-chen cee-chen commented Jun 6, 2024 •

Copy link
Copy Markdown
Contributor

Summary

Before After
before after

I implemented this kind of on a whim while looking at our indeterminate EuiCheckboxes in #7814, and realizing we don't really utilize them 👀 UX is based off of Gmail's select all behavior.

QA

  • EuiBasicTable's header checkbox selection:
    • Shows an indeterminate checkbox whenever 1 or more (but less than all rows) are selected
    • Still shows a regular check if all rows are selected
    • Deselects all rows on click, if either checked or indeterminate
    • Shows a title & aria-label that accurately reflects the deselect/select all UX

General checklist

  • Browser QA
    • Checked for accessibility including keyboard-only and screenreader modes
    • Checked in Chrome, Safari, Edge, and Firefox
      - [ ] Checked in both light and dark modes
      - [ ] Checked in mobile
  • Docs site QA - N/A
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
      - [ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist - N/A

@cee-chen cee-chen changed the title Table selection indeterminate [EuiBasicTable] Support indeterminate checkboxes in header row Jun 6, 2024
@cee-chen cee-chen mentioned this pull request Jun 6, 2024
6 tasks done
@cee-chen
cee-chen force-pushed the table-selection-indeterminate branch from 8c93edc to 5d9c6e4 Compare June 6, 2024 18:07
@cee-chen
cee-chen marked this pull request as ready for review June 6, 2024 18:07
@cee-chen
cee-chen requested a review from a team as a code owner June 6, 2024 18:07
cee-chen added 2 commits June 6, 2024 11:33
…ion checkbox

- we have the technology!! I figured, why not?

- make clicking an indeterminate checkbox more like gmail's behavior (i.e., it deselects)

clarify deselect vs select behavior with more titles/aria labels
…e select all checkbox logic

- Since the mobile header no longer renders or non-mobile views, we don't need this conditional logic anymore wooo
@cee-chen
cee-chen force-pushed the table-selection-indeterminate branch from 5d9c6e4 to 39e6cb8 Compare June 6, 2024 18:41
@kibanamachine

Copy link
Copy Markdown
Contributor

@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

@mgadewoll mgadewoll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚢 🐈‍⬛ Approved as reviewed on the previous PR. Thanks for doing the extra step to separate the PRs! ❤️

@cee-chen
cee-chen merged commit 35caec6 into elastic:main Jun 6, 2024
@cee-chen
cee-chen deleted the table-selection-indeterminate branch June 6, 2024 21:08
cee-chen added a commit to elastic/kibana that referenced this pull request Jun 18, 2024
`v94.6.0` ⏩ `v95.0.0-backport.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

##
[`v95.0.0-backport.0`](https://github.com/elastic/eui/releases/v95.0.0-backport.0)

**This is a backport release only intended for use by Kibana.**

- Updated `EuiSteps` to support a new `titleSize="xxs"` style, which
outputs the same title font size but smaller unnumbered step indicators
([#7813](elastic/eui#7813))
- Updated `EuiStepsHorizontal` to support a new `size="xs"` style, which
outputs smaller unnumbered step indicators
([#7813](elastic/eui#7813))
- Updated `EuiStepNumber` to support new `titleSize="none"` which omits
rendering step numbers, and will only render icons
([#7813](elastic/eui#7813))

## [`v95.0.0`](https://github.com/elastic/eui/releases/v95.0.0)

- Added `move` glyph to `EuiIcon`
([#7789](elastic/eui#7789))
- Updated `EuiBasicTable` and `EuiInMemoryTable`s with `selection` - the
header row checkbox will now render an indeterminate state if some (but
not all) rows are selected
([#7817](elastic/eui#7817))

**Bug fixes**

- Fixed an `EuiDataGrid` visual bug when using `lineCount` row heights
where the clamped text was still visible for some font sizes
([#7793](elastic/eui#7793))
- Fixed `EuiSearchBar`'s filter configs to always respect `autoClose:
false` ([#7806](elastic/eui#7806))

**Breaking changes**

- Removed deprecated `EUI_CHARTS_THEME_DARK`, `EUI_CHARTS_THEME_LIGHT`
and `EUI_SPARKLINE_THEME_PARTIAL` exports
([#7682](elastic/eui#7682))
- Removed deprecated `euiPalettePositive` and `euiPaletteNegative`. Use
`euiPaletteGreen` and `euiPaletteRed` instead
([#7808](elastic/eui#7808))
- Removed `type="inList"` from `EuiCheckbox`. Simply omit passing a
`label` prop to render this style of checkbox
([#7814](elastic/eui#7814))
- Removed the unused `compressed` prop from `EuiCheckbox` and
`EuiRadio`. This prop was not doing anything on individual components.
([#7818](elastic/eui#7818))

**CSS-in-JS conversions**

- Converted `EuiCheckboxGroup` to Emotion
([#7818](elastic/eui#7818))
- Converted `EuiRadioGroup` to Emotion
([#7818](elastic/eui#7818))

---------

Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
bhapas pushed a commit to bhapas/kibana that referenced this pull request Jun 18, 2024
`v94.6.0` ⏩ `v95.0.0-backport.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

##
[`v95.0.0-backport.0`](https://github.com/elastic/eui/releases/v95.0.0-backport.0)

**This is a backport release only intended for use by Kibana.**

- Updated `EuiSteps` to support a new `titleSize="xxs"` style, which
outputs the same title font size but smaller unnumbered step indicators
([elastic#7813](elastic/eui#7813))
- Updated `EuiStepsHorizontal` to support a new `size="xs"` style, which
outputs smaller unnumbered step indicators
([elastic#7813](elastic/eui#7813))
- Updated `EuiStepNumber` to support new `titleSize="none"` which omits
rendering step numbers, and will only render icons
([elastic#7813](elastic/eui#7813))

## [`v95.0.0`](https://github.com/elastic/eui/releases/v95.0.0)

- Added `move` glyph to `EuiIcon`
([elastic#7789](elastic/eui#7789))
- Updated `EuiBasicTable` and `EuiInMemoryTable`s with `selection` - the
header row checkbox will now render an indeterminate state if some (but
not all) rows are selected
([elastic#7817](elastic/eui#7817))

**Bug fixes**

- Fixed an `EuiDataGrid` visual bug when using `lineCount` row heights
where the clamped text was still visible for some font sizes
([elastic#7793](elastic/eui#7793))
- Fixed `EuiSearchBar`'s filter configs to always respect `autoClose:
false` ([elastic#7806](elastic/eui#7806))

**Breaking changes**

- Removed deprecated `EUI_CHARTS_THEME_DARK`, `EUI_CHARTS_THEME_LIGHT`
and `EUI_SPARKLINE_THEME_PARTIAL` exports
([elastic#7682](elastic/eui#7682))
- Removed deprecated `euiPalettePositive` and `euiPaletteNegative`. Use
`euiPaletteGreen` and `euiPaletteRed` instead
([elastic#7808](elastic/eui#7808))
- Removed `type="inList"` from `EuiCheckbox`. Simply omit passing a
`label` prop to render this style of checkbox
([elastic#7814](elastic/eui#7814))
- Removed the unused `compressed` prop from `EuiCheckbox` and
`EuiRadio`. This prop was not doing anything on individual components.
([elastic#7818](elastic/eui#7818))

**CSS-in-JS conversions**

- Converted `EuiCheckboxGroup` to Emotion
([elastic#7818](elastic/eui#7818))
- Converted `EuiRadioGroup` to Emotion
([elastic#7818](elastic/eui#7818))

---------

Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants