Skip to content
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

Feature request: Class diagram display regions #3384

Closed
ArnaudB88 opened this issue Aug 31, 2022 · 7 comments
Closed

Feature request: Class diagram display regions #3384

ArnaudB88 opened this issue Aug 31, 2022 · 7 comments
Assignees
Labels
Graph: Class Status: Approved Is ready to be worked on Type: Enhancement New feature or request

Comments

@ArnaudB88
Copy link

ArnaudB88 commented Aug 31, 2022

We use the mermaid class diagram to design database schemes since that's easy for developers and a visual representation can be auto generated through the live editor. But when the diagram becomes bigger (+30 classes), the visual representation becomes complicated because relations will cross other relations. This is because we can't choose which classes are visualized from left-to-right (because of the relationships). The result is a visual scheme in which many relationships cross each other and classes which belong together are scattered from left to right.

I would like to suggest a feature of something like 'display regions'.

  • Display regions are squares which group classes together and are always displayed from left to right
  • You can declare display regions in the mermaid file
  • You can add classes (of a class diagram) to display regions
  • (optional) you can set a background color for each display region
  • (optional) give a title to a region, which is displayed at the top of the region
  • Display regions can be applied to the class diagram and entity relationship diagrams

The alternative I try to do now, is to reorder the class relations, but at this point (+30 classes) it's pointless because some classes jump visually from left to right because of the may relationships between the classes.

Note: this feature request is similar to the existing subgraph functionality of a flowchart diagram.

Example of a scheme without display regions (as-is):
image

Example of a scheme with display regions (to-be):
(Note: the scheme should be cleaner and relationships should cross less)
Capture2

@ArnaudB88 ArnaudB88 added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Aug 31, 2022
@knsv
Copy link
Collaborator

knsv commented Sep 2, 2022

We could use subgrapgs/clusters for this. It is possible. @ashishjain0512 What do you think? What should the syntax look like?

@jgreywolf jgreywolf self-assigned this Apr 6, 2023
@jgreywolf jgreywolf added Status: Approved Is ready to be worked on Graph: Class and removed Status: Triage Needs to be verified, categorized, etc labels Apr 6, 2023
@IceflowRE
Copy link

Pretty sure this is a feature like namespaces or packages.
Also discussed here #4618 .

@ArnaudB88
Copy link
Author

@IceflowRE Indeed, namespaces is almost exactly what I proposed.
Could it be possible to add styling to namespaces?

@mihaivader
Copy link

Any ETA for nested namespaces and/or packages for class diagrams ?

@skillmaker-dev
Copy link

skillmaker-dev commented May 26, 2024

This issue also requests the same feature #5487

@erickalmeidaptc
Copy link

Can we have this feature also added to the ERD diagrams?

@jgreywolf
Copy link
Contributor

I am closing this issue, as the original request can be handled by using namespaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph: Class Status: Approved Is ready to be worked on Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants