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

[EuiDataGrid] Fix header actions button causing cell height changes #7999

Merged

Conversation

mgadewoll
Copy link
Contributor

@mgadewoll mgadewoll commented Sep 4, 2024

Summary

This PR fixes an issue that was introducede with this previously merged PR that updated EuiDataGrid header cells to support interactive content. As part of that PR the size of the actions button was increased via padding to satisfy the min. target size accessibility requirements.

This causes the header cells to increase in height when the actions button is visible on hover/focus for small cell fontSize/lineHeight settings.

Changes

  • adds negative margin for the action button that is equivalent the added padding to ensure the button still uses the same vertical space

Screenshots

issue

Screen.Recording.2024-09-04.at.12.39.24.mov

fixed

Screen.Recording.2024-09-04.at.12.38.30.mov

QA

  • ensure the header cell does not increase in size when the action button is visible for a small fontSize/lineHeight variant
    • open the datagrid playground story
    • change the gridStyle prop:
      • change fontSize to "s"
      • add the key "lineHeight" and set its value to "1.6em" (1.6em is the value used on Kibana)

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • 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
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

…ght changes

- adds negative margin to account for added padding to ensure min. target size
@mgadewoll mgadewoll marked this pull request as ready for review September 4, 2024 12:49
@mgadewoll mgadewoll requested a review from a team as a code owner September 4, 2024 12:49
Copy link
Member

@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.

🚀 Super speedy one-liner fix!

@cee-chen cee-chen enabled auto-merge (squash) September 4, 2024 15:46
@cee-chen cee-chen merged commit cd89ebd into elastic:main Sep 4, 2024
5 checks passed
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

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.

3 participants