Skip to content

Conversation

kpfefferle
Copy link
Member

  • Addepar's new visual look includes zebra-striping tables
  • Since ember-table uses vertical-collection to occlude rows during scroll, this can't be reliably done with CSS selectors like :nth-child(even) or :nth-child(odd)
  • A number of Addepar teams have manually added class="{{if (eq (modulus-of body.rowMeta.index 2) 0) 'is-even' 'is-odd'}}" to their ember-table row component calls to add stable row class names that indicate which rows have an even index vs an odd index
  • This PR brings this capability into ember-table itself so that we (and other consumers) don't have to repeat this pattern over and over in order to give ember-tables a zebra stripe styling

@kpfefferle kpfefferle force-pushed the kpfefferle/rt-3407-even-odd-rows branch from dbf8a78 to 0f42926 Compare August 19, 2025 21:04
@kpfefferle
Copy link
Member Author

This same test failure seems to also be happening on master, so I don't believe it has anything to do with this PR 🤔

Copy link
Contributor

@DanMonroe DanMonroe left a comment

Choose a reason for hiding this comment

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

Nice, thanks Kevin. This will clean up some code for us.

@kpfefferle kpfefferle merged commit f729f26 into master Aug 19, 2025
15 of 18 checks passed
@kpfefferle kpfefferle deleted the kpfefferle/rt-3407-even-odd-rows branch August 19, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants