react-d3-graph icon indicating copy to clipboard operation
react-d3-graph copied to clipboard

Directed graph with viewGenerator

Open lironhl opened this issue 4 years ago • 18 comments

Closes #389

This PR creates the expected link behavior, when viewGenerator is used, it supports the symbols: square, circle and rectangle.

This PR is very liberal with code structure changes, waiting to work with you @danielcaldas.

This PR still needs a little bit of work:

  1. Tests.
  2. There's a bug involving the links when two nodes that are connected, are too close to each other.

Circle

circle

Square

square

Rectangle

rectangle

lironhl avatar Nov 14 '20 20:11 lironhl

Hi @lironhl, @danielcaldas,

I allowed myself to drop a few comments since I worked on the circle version of this node calculation.

Amazing work on generalizing the concept on all symbol types!

antoninklopp avatar Nov 15 '20 13:11 antoninklopp

@antoninklopp Thanks for the CR, will fix the issues in the weekend, just wanted to say I forgot to add a comment about the source of the formula I used to calculate the length of a vector inside a rectangle.

Here it's: https://stackoverflow.com/a/3197924

lironhl avatar Nov 15 '20 19:11 lironhl

@danielcaldas @antoninklopp Thank you both for the quality code review.

lironhl avatar Nov 28 '20 13:11 lironhl

My biggest one is for custom node support. Should it be supported for now? Since it would be the user that should choose the symbol that is the closest to its custom node shape. I personally think that it would still be a good addition, but should maybe be discussed?

I think it's ok to leave the responsibility of choosing the correct node symbol to the user, in order for him to have optimized positioning (in case the user specifies other symbol, we fallback to the previous behaviour, this is also the main mission of this PR (directed graph with viewGenerator).

Below is a screenshot from the custom-node data where we expect a square node but the custom node does not exactly render as a square and causes some inaccurate pointing at one edge.

Yep, that was totally my responsibility to pick custom-node that's rectangle in shape, but I didn't care that much, I thought people could still understand the value of the PR, even though the custom-component is not exactly a rectangle (maybe I can change it's CSS).

lironhl avatar Dec 04 '20 22:12 lironhl

@antoninklopp @danielcaldas This is no longer in a draft status for me.

lironhl avatar Dec 05 '20 18:12 lironhl

@danielcaldas any idea why the node@10 test fails?

lironhl avatar Feb 06 '21 11:02 lironhl

I'll let @antoninklopp have a look at this one I think he's been involved in the PR discussions at a deeper level than me.

danielcaldas avatar Feb 12 '21 07:02 danielcaldas

@danielcaldas any idea why the node@10 test fails?

Hi @lironhl ,

I am not seeing any check failing. Which one are you referring to?

antoninklopp avatar Feb 16 '21 19:02 antoninklopp

@danielcaldas any idea why the node@10 test fails?

Hi @lironhl ,

I am not seeing any check failing. Which one are you referring to?

I thought some build failed, seems like I was wrong.

On another note, what do you think should happen, in order for us to merge this PR?

lironhl avatar Feb 16 '21 19:02 lironhl

hi, how do i incorporate this into the graph config?

henri-edinb avatar Mar 11 '21 19:03 henri-edinb

Hey @lironhl it appears there are some conflicts, it would be awesome if you could attend to those and the comments lefted by @antoninklopp. Thanks!

danielcaldas avatar Mar 18 '21 11:03 danielcaldas

@danielcaldas I'll find time to fix the PR in the following couple of days, let's hope for a merge in the span of the next two weeks!

lironhl avatar Mar 19 '21 16:03 lironhl

Hi @lironhl ,

Thank you very much for updating this PR !

Could you please fix the tests? I see that some are still not successful?

I will review again as soon as this is fixed.

Hope that we will be able to merge this soon !

Cheers!

antoninklopp avatar Apr 03 '21 13:04 antoninklopp

Hi @lironhl ,

Did you have any opportunity to fix the failing tests?

I think that it would be really great if we could merge this !

antoninklopp avatar May 13 '21 13:05 antoninklopp

This looks great! Hoping it can be merged 😃

GraemeF avatar Aug 09 '21 11:08 GraemeF

Hi @lironhl ,

Did you have any opportunity to fix the failing tests?

I think that it would be really great if we could merge this !

@antoninklopp The tests seem to work now, can we merge this?

lironhl avatar Aug 09 '21 13:08 lironhl

I'll let @antoninklopp have a look at this one I think he's been involved in the PR discussions at a deeper level than me.

@danielcaldas can you match @antoninklopp approval?

lironhl avatar Aug 09 '21 22:08 lironhl

@danielcaldas excuse me. When do you plan to merge this pr.

fortune-cook1e avatar Dec 09 '22 08:12 fortune-cook1e