Cytoscape v4 -- planning for breaking API changes
See original GitHub issueBrainstorming 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 alsoexports
(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()
returnsclasses
as an array - Make percent values be specified on [0, 1] when no units are specified, e.g.
0.5
is the same as50%
. In v3, if you specify0.5
, you will get0.5%
. - Make the
{ nodes: [], edges: [] }
elements JSON format no longer the default forcy.json()
export. Instead use, the plain array format. - Rename the
core
selector tocy
, by default. Thecore
value should still work, but it won’t be returned bycy.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
andheight: 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 isfcose
. - 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 calleles.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.
- Remove edge operators in selectors (e.g.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Since a
class
is a concept in Javascript now, maybe it’s better to useclassNames
? Ecosystem seems to be standardising on this.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.