question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cytoscape v4 -- planning for breaking API changes

See original GitHub issue

Brainstorming of improvements that would cause breaking changes for a potential, future v4:

Modernising:

  • Add support for ESM bundles referenced by package.json. This breaks support for CJS code that is bundled by Webpack. See also exports (e.g. is-promise).
  • Remove internal polyfills. If you want to support old browsers that are missing these objects, use a polyfill like core-js. Note which objects in the stdlib need polyfilling: Promise, Set, Map, etc.
  • Use browser-friendly module links #2661
  • Use Rust/WASM for increased performance (e.g. threading) #2799
  • Use WebGL #2798

Improving formatting & naming:

  • ele.json() returns classes as an array
  • Make percent values be specified on [0, 1] when no units are specified, e.g. 0.5 is the same as 50%. In v3, if you specify 0.5, you will get 0.5%.
  • Make the { nodes: [], edges: [] } elements JSON format no longer the default for cy.json() export. Instead use, the plain array format.
  • Rename the core selector to cy, by default. The core value should still work, but it won’t be returned by cy.json().

Removing deprecated features & other mistakes:

  • Remove cy.forceRender(). Deprecated long ago.
  • Remove ele.renderedStyle() (Deprecated in #2223)
  • Remove cy.batchData(). Deprecated long ago.
  • Don’t set concentric scratch values when running the concentric layout. The programmer can store values himself.
  • Remove support for event namespaces. It’s not all that useful and it adds complexity.
  • Remove non-JSON style formats and revise cy.style() to only be a JSON setter. Ref: https://github.com/cytoscape/cytoscape.js/issues/2637#issuecomment-600734097
  • Remove width: label and height: label. Ref. #2713

Moving features to external extensions or libraries:

  • Remove cose from the core bundle and make it an external extension. The force-directed layout that a programmer should choose by default is fcose.
  • Remove selectionType: 'additive' from the core lib and turn it into an extension
  • Remove pie chart properties. You can just use a library like Chart.js or C3 to generate charts as background images.

Removing features that are problematic for performance:

  • Remove array-like indexing support, e.g. eles[0]. You would need to call eles.at(0) instead.
  • Traversal selectors are expensive. They create additional expense every time any element gets modified. It would be better for performance for a consumer to use classes. The consumer can add or remove classes based on the graph topology, and he can do so more precisely than with a declarative selector.
    • Remove edge operators in selectors (e.g. node -> node).
    • Remove compound traversal selectors (e.g. node.parent > node.child). You can still use :parent or :child to generally style parent nodes and child nodes.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
StevenLangbroekcommented, Mar 13, 2018

Since a class is a concept in Javascript now, maybe it’s better to use classNames? Ecosystem seems to be standardising on this.

0reactions
maxkfranzcommented, Dec 19, 2019

This issue is for discussing v4 API – i.e. breaking API changes. If you have a general feature in mind that is additive w.r.t. API, then feel free to make an ordinary feature request and the corresponding pull request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developer Documentation - Cytoscape
This is the best introduction to Cytoscape App development. Publish Your Apps. Got a new App? Please send it to us. Once your...
Read more >
Martijn's Continuous Build System part 2 « Helixsoft
It is important that this interface is well defined and doesn't change over time. If the API unilaterally changes, all the plug-ins will...
Read more >
Untitled
Type de fichier video psp, Infinite stratos episode 4 english dub, ... Stylista house, Eona el ultimo ojo de dragon pdf, Planner decoration...
Read more >
AVe - River Thames Conditions - Environment Agency - GOV.UK
Sims freeplay climate change update, Metoprolol succ er dose, ... Yoga toe stand tips, Sales business plan presentation ppt, Robbie ellis wfmt, ...
Read more >
A Cytoscape app for fast and interactive network alignment ...
This thesis focuses on the global network alignment problem for pairs of PPI networks: Given two input networks, find the best corresponding partner...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found