Skip to content

[EuiDataGrid] Fix inconsistent focus halo#5522

Merged
elizabetdev merged 7 commits intoelastic:mainfrom
Al-0:5479/fix/inconsistent-halo-euiDataGrid
Jan 14, 2022
Merged

[EuiDataGrid] Fix inconsistent focus halo#5522
elizabetdev merged 7 commits intoelastic:mainfrom
Al-0:5479/fix/inconsistent-halo-euiDataGrid

Conversation

@Al-0
Copy link
Contributor

@Al-0 Al-0 commented Jan 7, 2022

Summary

Closes #5479

The outline property for the control columns of the EuiDataGrid element is modified in order to keep color theme consistent along the grid. The outline property of euiCustomControlFocused is fixed, as it failed due to not being properly declared for chrome and being declared in the incorrect order for other browsers. Also added the property for _data_grid_data_row for entries with class .euiButtonIcon, as also the columns with this class didn't comply with the grid's color.
first_column
last_column

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
    - [ ] Props have proper autodocs and playground toggles
  • Added documentation
  • Checked Code Sandbox works for any docs examples
    - [ ] 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

Al-0 added 2 commits January 6, 2022 21:53
The outline property for the control columns of the EuiDataGrid element is modified in order to keep color theme consistent along the grid.
The outline of euiButtonIcons is moved to the _data_grid_data_row in order to not modify outlines in buttons outside of euiDataGrids
@kibanamachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@cla-checker-service
Copy link

cla-checker-service bot commented Jan 7, 2022

💚 CLA has been signed

Added a more complete description of the changes made.
@Al-0 Al-0 changed the title 5479/fix/inconsistent halo eui data grid [EuiDataGrid] Fix inconsistent focus halo Jan 7, 2022
@thompsongl
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

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

@Al-0
Copy link
Contributor Author

Al-0 commented Jan 10, 2022

@thompsongl sorry, I'm kinda new to this, how do I Jenkin test my PR?

@thompsongl
Copy link
Contributor

sorry, I'm kinda new to this, how do I Jenkin test my PR?

No worries! A maintainer needs to start the CI process for you.

Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

Thanks, @Al-0 for opening this PR,

It's looking good! 🎉

But we don't want to change the styles in euiCustomControlFocused() mixin in __form.scss. This changes multiple components and we just want to enhance the focus states for the EuiDataGrid.

So I would recommend overriding the control column checkboxes focus styles rather than updating all EUI checkboxes focus states.

@Al-0
Copy link
Contributor Author

Al-0 commented Jan 10, 2022

Thanks for the review @miukimiu !
I'll work on the recommended changes ASAP.

Al-0 and others added 3 commits January 11, 2022 11:57
The following changes are made:
* CHANGELOG.md: Title is changed to enhancements and description is updated.
* _form.scss: File is restored to its original state, as it was modyfing a whole mixin.
* _dara_grid_data/header_row.scss: The property from the mixin is moved to each of these files to overwrite the checkbox modifiers.
@elizabetdev
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

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

Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

Thanks @Al-0, 🎉

Your PR looks great but internally our team decided that we shouldn't have specific outlines styles only for some components. With time, this would bring inconsistency. For example, in chrome, the data grid checkboxes would have blue outlines, and then in other components, they would be black.

However, we agree that the black outline creates some confusion for our consumers so our team decided that we're going to update them so that they always be blue no matter which browser. We see this as an enhancement and not a bug fix. So we are not in a rush, and we prefer to update all focus rings/outlines in different PRs.

Because the original issue #5479 was related to checkboxes I pushed a commit where I'm updating the mixing euiCustomControlFocused to have an outline offset of 2px which makes it consistent with our range slider.

From now on, checkboxes and radio have a blue outline no matter the browser.

Frame 1@2x

For buttons outlines, we're keeping the current color. We prefer to tackle this in another PR. We have to think if we want to have the blue outline for all the buttons or keep the current color (warning, danger...) and possibly just update the black outlines.

Let's wait for @1Copenut approval and if everything seems ok, we can merge the PR! 😄

@Al-0
Copy link
Contributor Author

Al-0 commented Jan 13, 2022

Very well @miukimiu, I understand the reason behind the change and greatly appreciate the explanation provided.

Thank you very much! It has been very interesting and a great experience working on this PR!

Copy link
Contributor

@1Copenut 1Copenut left a comment

Choose a reason for hiding this comment

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

🎉 This looks good to me as well. I pulled the branch to my local machine and tested with Chrome on MacOS Big Sur. The change helps me distinguish checkbox focus in data grids and standalone checkboxes and radio buttons.

Thank you all for the conversation and enhancement!

@elizabetdev
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

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

@elizabetdev elizabetdev merged commit 3f617e1 into elastic:main Jan 14, 2022
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.

[EuiDataGrid][KEYBOARD]: Update data grid control cells' focus halo to same blue as other cells

5 participants