Repository navigation
refactor(dia.Graph): remove extra cell collection - #3084
Merged
kumilingus merged 74 commits intoOct 29, 2025
Merged
Conversation
…a-cell-collection
Geliogabalus
approved these changes
Oct 29, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the layer API in JointJS by renaming classes and updating method names to be more consistent and clear. The main changes include renaming CellLayer to GraphLayer, GraphCells to CellCollection, and updating related API methods from cellLayer prefixes to just layer.
Key changes:
- Renamed
CellLayer→GraphLayerandGraphCells→CellCollection - Updated API methods:
addCellLayer()→addLayer(),getCellLayer()→getLayer(), etc. - Changed option names:
insertBefore→before,cellLayers→layersin JSON - Updated test snapshots to reflect CSS class name change from
joint-cell-layertojoint-cells/joint-graph-layer
Reviewed Changes
Copilot reviewed 47 out of 49 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/joint-core/types/joint.d.ts | TypeScript definitions updated with renamed classes and methods |
| packages/joint-core/test/ts/layers.test.ts | New TypeScript test file for layer API |
| packages/joint-core/test/jointjs/graph.js | Extensive formatting changes and API method name updates |
| packages/joint-core/test/jointjs/paper.js | Updated method calls to use new getLayerView().el pattern |
| packages/joint-core/test/jointjs/layers/basic.js | Updated all layer-related method and property names |
| packages/joint-core/test/jointjs/index.html | Updated script references for renamed test files |
| packages/joint-core/test/jointjs/dia/*.js | Updated method calls and layer references throughout |
| packages/joint-react/src/components/**/snapshots/*.snap | Updated snapshots with new CSS class names |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 47 out of 49 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Revision of #3025.
This PR refactors the layer API in JointJS by renaming classes and updating method names to be more consistent and clear.
Remove the redundant graph cell collection that existed solely as an event proxy and for quick lookups.
Rename models:
Updated Graph API methods:
addLayer(),moveLayer(),removeLayer().mvc.Collectionnow supportsdryflagMove port namespace logic to Element (was executed for all cells)