-
Notifications
You must be signed in to change notification settings - Fork 122
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
fix(waffle): use descend sortPredicate by default #1510
Conversation
What's the sort predicate doing? It'd be nice to lock in the effect with a new eg. URL based image test so it's caught if there's regression. One thing I remember waffle still needed is a tooltip approach where the entire color block, rather than just a single square is highlighted on hover, though I'm not too sure about how it should go with the tooltip. Ideally the entirety of a block of a given color would be perceived by the tooltip as one unit, so the tooltip location not jump as the user moves the mouse across multiple cells in a row. Same with events. One option for that is to treat the unison of cells of a category as one thing, but render it to make it appear cell by cell. Another option is to, at least, virtually overlay the visuals with invisible, unrendered, larger geoms. One challenge is that cells of a color don't necessarily form a contiguous block, they can split in a way to form two disjunct areas. For example, consider the O:
Sometimes it's contiguous but still a rectilinear hexagon/octogon |
@monfera you are right, I will add a knob for that so we can control and test this. I've found anyway something that we can probably fix on the current implementation, but please tell me if that was wanted: const sorter = (layout: PartitionLayout) => ({ sortPredicate }: Layer, i: number) =>
sortPredicate ||
(isTreemap(layout) || isSunburst(layout)
? descendingValueNodes
: isMosaic(layout)
? i === 2
? ascendingValueNodes
: descendingValueNodes
: null); Applying the |
@markov00 yes as we discussed it's the sensible approach |
# [40.2.0](v40.1.0...v40.2.0) (2021-12-09) ### Bug Fixes * **partition:** linkLabel textColor override ([#1498](#1498)) ([3013310](3013310)) * **waffle:** use descend sortPredicate by default ([#1510](#1510)) ([763e2e3](763e2e3)) * **xy:** stacked polarity ([#1502](#1502)) ([920666a](920666a)), closes [#1280](#1280) ### Features * **xy:** expose style for interpolation fit functions ([#1505](#1505)) ([3071457](3071457))
Summary
I've added to the Waffle story the
sortPredicate
configuration and removed an unnecessary layer configuration.Checklist
:xy
,:partition
)dark
,light
,eui-dark
&eui-light