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 stripes incorrectly alternating on sort/pagination #5070

Merged
merged 4 commits into from
Sep 13, 2021

Conversation

cee-chen
Copy link
Member

@cee-chen cee-chen commented Aug 23, 2021

Summary

closes #4705

Apologies if the striping is hard to see on my recorded gif settings! 🙈

Before

before

After

after

Checklist

This is a fairly straightforward JS fix, so I opted not to thoroughly frontend test it. I'm also 50/50 on adding unit tests for this fix; if we didn't have unit tests already written for striping I'm not a massive fan of adding ones now for a primarily visual bugfix, but I can do so if folks feel strongly about it!

- [ ] 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 the any docs examples

- [ ] Checked for breaking changes and labeled appropriately
- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

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

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

One line fix!

I'm also 50/50 on adding unit tests for this fix

I wouldn't mind seeing a test or two here if the setup isn't overly tedious.

@cee-chen
Copy link
Member Author

Per our discussion at sync today, I'm going to be writing shallow unit tests for all DataGrid child components this week. As such I'm going to hold off on merging this PR/revert it to draft mode until there's unit tests for this bug that I can update.

@cee-chen cee-chen marked this pull request as draft August 24, 2021 16:53
@cee-chen cee-chen marked this pull request as ready for review September 13, 2021 18:25
@cee-chen
Copy link
Member Author

@thompsongl 👋 Here's the unit tests I ended up writing specifically for stripes + one for the rowIndex behavior! 661c20a

Cell itself could likely use even more more specific unit tests written for its logic, but I didn't want to overcomplicate this PR, plus I figured we'll also add more unit tests as we fix bugs, haha 😅

@kibanamachine
Copy link

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

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

LGTM! Confirmed the fix with the preview deployment.

@cee-chen
Copy link
Member Author

Sweeet! Thanks for the master merge! 🙏

@cee-chen cee-chen enabled auto-merge (squash) September 13, 2021 20:54
@kibanamachine
Copy link

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

@cee-chen cee-chen merged commit f3b8c1a into elastic:master Sep 13, 2021
@cee-chen cee-chen deleted the datagrid-stripes branch September 13, 2021 21:27
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] stripes in gridStyle alternates bewteen pages
3 participants