Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New focus ring getting clipped on checkboxes in tables #2757

Closed
ryankeairns opened this issue Jan 14, 2020 · 3 comments · Fixed by #2770
Closed

New focus ring getting clipped on checkboxes in tables #2757

ryankeairns opened this issue Jan 14, 2020 · 3 comments · Fixed by #2770
Assignees

Comments

@ryankeairns
Copy link
Contributor

The new, larger focus ring is getting clipped for checkboxes in EUI tables.

This was initially noticed by a Canvas engineer, but it is also visible in our EuiTable docs - see the checkbox focus getting clipped under the "Adding selection to a BasicTable" section:

Screenshot 2020-01-14 13 38 20

@andreadelrio
Copy link
Contributor

It looks like this was already happening with the old focus ring.

I’ve been looking into it and I’m not sure if this is a problem with EuiCheckbox itself or with the table, as those checkbox cells are getting an inline width of 24px that I can’t seem to override. I was thinking of doing something like Object.assign(styleObj, { minWidth: valueHigherThan24px}here https://github.com/elastic/eui/blob/master/src/components/table/table_header_cell_checkbox.tsx#L24 but the width gets applied and not the minWidth.

@cchaos do you have any thoughts?

@ryankeairns
Copy link
Contributor Author

ryankeairns commented Jan 16, 2020

I took a peek and the issue is on both the docs and Canvas side. My guess is that the docs example was copied and it applies a hard-coded 24px to the header td which then determines the width of the td's on down the column.

That said, we still need some tweaking on the EUI side as well. We currently set the td for checkboxes to 32px, but it is overridden by the th width. A couple of thoughts... increase the th width of our example tables that have checkboxes (currently set at 24px) and then match the td width for checkboxes to be the same.

I suspect setting that width on the td, while seemingly not being used, is necessary if there is no checkbox in the header?

@ryankeairns
Copy link
Contributor Author

The $euiTableCellCheckboxWidth is set here:

$euiTableCellCheckboxWidth: $euiSizeXL;

There are several table examples with checkboxes; here is one as an example:

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 a pull request may close this issue.

2 participants