-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] develop from mermaid-js:develop #24
Conversation
…saurabh/refactor/convert-stateDb-to-class
…saurabh/refactor/convert-classDb-to-class
…teDb-to-class Refactor: Change StateDB to class based architecture.
…saurabh/refactor/convert-classDb-to-class
…ssDb-to-class Refactor: Change ClassDB to class based architecture.
…rchitecture Revert state diagram class based architecture
Reviewer's Guide by SourceryThis pull request refactors the class diagram database to be a class, which allows for multiple class diagrams to be rendered on the same page. It also fixes an issue where the state diagram database was being cleared when a new diagram was rendered. Class diagram showing the new ClassDB structureclassDiagram
class ClassDB {
-relations: ClassRelation[]
-classes: Map<string, ClassNode>
-styleClasses: Map<string, StyleClass>
-notes: ClassNote[]
-interfaces: Interface[]
-namespaces: Map<string, NamespaceNode>
-namespaceCounter: number
-functions: any[]
+constructor()
+addClass(id: string)
+addRelation(classRelation: ClassRelation)
+addMember(className: string, member: string)
+addNote(text: string, className: string)
+setDirection(dir: string)
+getData()
+clear()
}
note for ClassDB "Refactored from global variables to class instance"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
See Commits and Changes for more details.
Created by pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
Refactor the class diagram database to create a new instance for each diagram.
New Features:
mermaidAPI.getDiagramFromText()
function now returns a new, distinct database instance for each class diagram, ensuring that changes to one diagram do not affect others.Tests:
mermaidAPI.getDiagramFromText()
returns different database instances for class diagrams and state diagrams, while returning the same instance for sequence diagrams.