| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Doing an export/encode of a Graph generated an error "Maximum call stack size exceeded. RangeError: Maximum call stack size exceeded". In `GraphCodec`, the list of excluded fields was incorrect: - `selection` was in the list, but this field doesn't exist, it is named `selectionModel`. The bug already existed in mxGraph https://github.com/jgraph/mxgraph/blob/v4.2.2/javascript/src/js/io/mxGraphCodec.js#L26 - `plugins` was missing. There is currently no codec for Plugin so it is not supported for now Tests have been added to validate that the Graph import/export works. In all existing tests involving Codecs, unregister all codecs before and after to ensure there is no side effects between tests.
|
""" WalkthroughThe changes introduce a new test suite for graph serialization and deserialization, enhance codec registration management in existing test files, and refactor codec registration logic for better modularity. The GraphCodec and GraphViewCodec constructors are updated to set explicit codec names and adjust transient fields. Codec registration functions are refactored to use a shared createObjectCodec utility, which is newly exported for centralized codec creation. Additional codecs for Rectangle and ImageBox are registered. Lifecycle hooks are added to tests to unregister codecs and prevent state leakage between tests. Changes
Sequence Diagram(s)sequenceDiagram
participant TestSuite as Test Suite
participant Codec as Codec Registry
participant Graph as Graph Instance
TestSuite->>Codec: unregisterAllCodecs() (beforeAll/afterEach)
TestSuite->>Codec: register codecs as needed
TestSuite->>Graph: create Graph instance (with/without plugins)
TestSuite->>Codec: export Graph to XML
TestSuite->>Codec: import XML to Graph
TestSuite->>Graph: verify properties after import/export
Possibly related PRs
Suggested labelsdocumentation 📜 Recent review details Configuration used: CodeRabbit UI Reviewing files that changed from the base of the PR and between 2a41d4c and 2a6852f. 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ Share 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (.coderabbit.yaml)
Documentation and Community
|
Sorry, something went wrong.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Doing an export/encode of a Graph generated an error "Maximum call stack size exceeded. RangeError: Maximum call stack size exceeded".
In GraphCodec, the list of excluded fields was incorrect:
The bug already existed in mxGraph https://github.com/jgraph/mxgraph/blob/v4.2.2/javascript/src/js/io/mxGraphCodec.js#L26
Tests have been added to validate that the Graph import/export works.
In all existing tests involving Codecs, unregister all codecs before and after to ensure there is no side effects between tests.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores