-
Notifications
You must be signed in to change notification settings - Fork 199
feat: make default style properties globally configurable #932
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
Conversation
Extend StyleDefaultsConfig to allow customization of default style values that were previously hardcoded as constants. This enables global configuration without requiring stylesheet updates across all Graph instances. New configurable properties: - Font settings: fontFamily, fontSize - Arrow settings: arrowSize, arrowSpacing, arrowWidth - Size settings: markerSize, imageSize, startSize - Rounding: roundingFactor, lineArcSize All direct references to DEFAULT_* constants throughout the codebase have been replaced with StyleDefaultsConfig property access, allowing these defaults to be changed at runtime via the configuration object.
WalkthroughThis pull request centralizes default values from scattered constants throughout the codebase into a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (21)
🧰 Additional context used🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-04-28T08:24:39.831ZApplied to files:
📚 Learning: 2025-04-28T08:24:39.831ZApplied to files:
📚 Learning: 2025-02-08T16:39:11.178ZApplied to files:
📚 Learning: 2024-11-23T15:15:49.541ZApplied to files:
🧬 Code graph analysis (19)packages/html/stories/Labels.stories.js (1)
packages/core/src/view/shape/stencil/StencilShape.ts (1)
packages/core/src/view/style/edge/Orthogonal.ts (1)
packages/core/src/view/plugins/ConnectionHandler.ts (2)
packages/core/src/view/shape/node/TextShape.ts (2)
packages/core/src/view/plugins/CellEditorHandler.ts (2)
packages/core/src/view/shape/Shape.ts (1)
packages/core/src/view/canvas/XmlCanvas2D.ts (1)
packages/core/src/view/mixins/CellsMixin.ts (2)
packages/core/src/view/canvas/AbstractCanvas2D.ts (1)
packages/html/stories/FixedIcons.stories.js (1)
packages/core/src/view/shape/edge/ConnectorShape.ts (2)
packages/core/src/view/mixins/SwimlaneMixin.ts (1)
packages/core/src/util/config.ts (1)
packages/core/src/util/styleUtils.ts (2)
packages/core/src/view/shape/node/SwimlaneShape.ts (1)
packages/core/src/view/cell/CellRenderer.ts (1)
packages/core/src/view/canvas/SvgCanvas2D.ts (1)
packages/core/src/view/shape/node/LabelShape.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (36)
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. Comment |
|



Extend StyleDefaultsConfig to allow customization of default style values that were previously hardcoded as constants.
This enables global configuration without requiring stylesheet updates across all Graph instances.
New configurable properties:
All direct references to DEFAULT_* constants throughout the codebase have been replaced with StyleDefaultsConfig property access, allowing these defaults to be changed at runtime via the configuration object.
Notes
Covers #192
Users can now globally customize these defaults at runtime like this:
Summary by CodeRabbit