-
Notifications
You must be signed in to change notification settings - Fork 199
feat: CellStateStyle port constraints accept multiple DirectionValue #721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: CellStateStyle port constraints accept multiple DirectionValue #721
Conversation
Previously, the properties only accept a single DIRECTION enum value. It wasn't possible to pass a string related to the DirectionValue type, it generated a TS error. In addition, it is now possible to pass several values, as this was possible in mxGraph. This is what the Orthogonal story requires for example. For backward compatibility, the implementation still support the former mxGraph configuration where the directions were passed as a concatenated string. This ensures that the mxGraph XML models can be correctly loaded. About 20 tests have been added to validate the implementation.
WalkthroughThis pull request updates the XML serialization tests by adding a new edge element and enhancing vertex styling with a Changes
Sequence Diagram(s)sequenceDiagram
participant T as Test Suite
participant F as getPortConstraints Function
participant Term as Terminal State
participant Edge as Edge State
T->>F: Invoke getPortConstraints(terminal, edge, source, defaultValue)
F->>Term: Retrieve port constraint from terminal
F->>Edge: Retrieve port constraint from edge
F-->>T: Return computed port constraint mask based on constraints and rotation settings
Suggested labels
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used🧬 Code Definitions (1)packages/core/__tests__/util/mathUtils.test.ts (2)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (8)
✨ Finishing Touches
🪧 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 (
|
|



Previously, the properties only accept a single DIRECTION enum value. It wasn't possible to pass a string related to the DirectionValue type, it generated a TypeScript error.
In addition, it is now possible to pass several values, as this was possible in mxGraph. This is what the Orthogonal story requires for example.
For backward compatibility, the implementation still supports the former mxGraph configuration where the directions were passed as a concatenated string. This ensures that the mxGraph XML models can be correctly loaded.
About 20 tests have been added to validate the existing implementation.
Tasks
Summary by CodeRabbit