SanichKotikov / react-family-tree

React component that renders a family tree
MIT License
57 stars 21 forks source link

Weird behaviour with shared parents on changing the root #6

Open fcsonline opened 3 years ago

fcsonline commented 3 years ago

First of all, thanks for this package! It is awesome! :clap: I really appreciate all the time you invested in it.

I'm using this package to render my family tree, but I'm getting weird behavior when I change the root id. As you can see in the picture there are couples sharing the same parents. I have checked the provided relations and they look ok. It only happens when I change the root. Never happened to me, with the initial root.

image

I'm not sure if is related to this commit you did a few months ago:

https://github.com/SanichKotikov/relatives-tree/commit/71fb50ad648221dd692937c8e9ebfee2c69de182#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519

If I can help with something, I'm open to collaborate

SanichKotikov commented 3 years ago

Hi, thanks.

First of all you can try previous version with npm i relatives-tree@2.1.0 and let me know it it works. If it doesn't, please share your json here, but don't forget to remove any sensitive data before.

fcsonline commented 3 years ago

The problem is that the current version of this package requires 2.0.x here:

https://github.com/SanichKotikov/react-family-tree/blob/master/package.json#L37

Maybe I can try to local link but it is always tricky to test.

fcsonline commented 3 years ago

I just tested with the latest version of relative-tree and the bug continues happening. I'll try to share the smallest json to be able to reproduce the bug.

fcsonline commented 3 years ago

Wow, I was going a bit mad trying to have a small set of nodes to reproduce the bug, and suddenly I realized that this bug only happens in Firefox. In Chrome is rendered properly :/ Do you know anything about this behavior?

SanichKotikov commented 3 years ago

Thanks, I see some problem in Firefox and will try to fix. Maybe it will help.

SanichKotikov commented 3 years ago

https://github.com/SanichKotikov/relatives-tree/releases/tag/v3.0.1

fcsonline commented 3 years ago

Awesome, I'll give it a try later. Thanks!

fcsonline commented 3 years ago

Thank you so much. Now it works as expected in Firefox! :clap:

Closing issue.

fcsonline commented 3 years ago

Ouch. Reopening again. There is a weird behavior without changing the rootId. You can see it in the center of the picture. The behavior is exactly the same in Firefox and Chrome.

image

Always it happens with parents that have non-married children. Not sure if this gives you any clue.