ipysigma icon indicating copy to clipboard operation
ipysigma copied to clipboard

Any plan to update sigma.js v3?

Open leovan opened this issue 10 months ago • 4 comments

Is there any plan to update sigma.js v3? It has some breaking changes when migrating from v2 to v3. And the yomguithereal/sigma-experiments-renderers dependency shoud be updated too.

leovan avatar Mar 11 '25 07:03 leovan

Sure, there is a plan to update to sigma v3. I actually co-maintain sigma. This said, I must find time to do so. Is there some feature for the v3 that you feel is lacking from ipysigma currently?

Yomguithereal avatar Mar 13 '25 11:03 Yomguithereal

I want use ipysigma to generate HTML code and embed it into another HTML file. And I found there are some problems to fix.

https://github.com/medialab/ipysigma/blob/b2c1f63de0df39b8fb392d8d1354e6861545b8df/src/widget.ts#L1038-L1054

https://github.com/medialab/ipysigma/blob/b2c1f63de0df39b8fb392d8d1354e6861545b8df/css/widget.css#L65-L67

The .hidden is already defined in my css and also some css frameworks, which will make the entire panel hidden. Then I tried to make some changes, like change it to .ipysigma-right-panel-hidden. And I found it uses sigma 3.0.0-alpha2, then I think maybe better to update it to v3 release version.

https://github.com/medialab/ipysigma/blob/b2c1f63de0df39b8fb392d8d1354e6861545b8df/package.json#L79

I also found sigma-experiments-renderers depends on sigma v2, so the migration is beyond my capability.

https://github.com/medialab/ipysigma/blob/b2c1f63de0df39b8fb392d8d1354e6861545b8df/package.json#L59

I think I can make some contribuates on some small problems, such as:

  1. Bootstrap css compatibility, including .hidden problem. I use quarto to generate the HTML file, which use bootstrap too.
  2. The i18n.

With reference of https://neo4j.com/blog/graph-visualization/neo4j-graph-visualization-tools/, after my comparision, I found ipysigma is the best choice in my scenario. Hope it can be updated with sigma.

leovan avatar Mar 13 '25 12:03 leovan

@leovan I would accept a PR changing the hidden class to something more namespaced indeed. This is not the only class like this though (I think there is also full, selectable, disabled and so on but they are linked to the choices.js library.

Regarding the transition to sigma v3 I can guarantee it will be done at some point but I cannot say when, because it is actually more involved that what it might look like indeed.

Yomguithereal avatar Mar 20 '25 09:03 Yomguithereal

Sure, there is a plan to update to sigma v3. I actually co-maintain sigma. This said, I must find time to do so. Is there some feature for the v3 that you feel is lacking from ipysigma currently?

1: intractability ie we can move nodes around 2: two node cycle i'e two way edges it overlap 3: cant add a edge attribute as a clicable link (hyperlink cant be added as a attribute variable) 4: arrow in curve edges

deepak1h avatar May 13 '25 09:05 deepak1h