-
Notifications
You must be signed in to change notification settings - Fork 166
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
Overlapping legend entries #1547
Labels
bug
Something isn't working
Comments
I noticed the "rate" legend shows duplicate entires in the reported build. So I downloaded and viewed the build locally and get console warnings of duplicate keys: I think the overlap somehow a result of the non-unique keys, but I'm not entirely sure how? |
Oh that could be it for sure -- react not reconciling the DOM properly due to duplicate keys. |
jameshadfield
added a commit
that referenced
this issue
Oct 20, 2022
Fixes the bug described in #1547 caused by identical legend entries which therefore had the same react key and thus DOM reconciliation failed. The cause of the bug was identified by @joverlee521 in #1547 (comment) The legend entries (array) do not change for a given coloring, and thus I believe it's safe to use the index in the key. It's certainly better than duplicating keys. There is a deeper problem which is why we have identical entries in the legend, which I'll attempt to solve in the subsequent commit but since we allow dataset-defined legend entries it's a good idea to handle the case of duplicated values. Closes #1547
Repository owner
moved this from Backlog
to Done
in Nextstrain planning (archived)
Oct 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the user successively changes the “Color By” parameter the legend entries can overlap. This is not resolvable in-app (as far as I can tell), but has no other side-effects.
First reported in https://discussion.nextstrain.org/t/captions-overlap-due-to-color-by-parameter/1241
The text was updated successfully, but these errors were encountered: