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

Support nested Namespaces #6018

Open
hjamaleddine opened this issue Nov 2, 2024 · 2 comments
Open

Support nested Namespaces #6018

hjamaleddine opened this issue Nov 2, 2024 · 2 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@hjamaleddine
Copy link

Description

i use namespaces to draw packages and it is imposible to add subpackages, i mean sub namesapce.
second, i want to create a namespace with label like the class and also it is impossible
third, it is also imposible to add an annotation to a namespace

Steps to reproduce

try to define a namespace inside an other and use a try to annotate a namesapce like a class

Screenshots

No response

Code Sample

classDiagram
namespace BaseShapes <<enumeration>>{

    class Triangle
    class Rectangle {
      double width
      double height
    }
}

classDiagram
namespace [namespace's label] {

    class Triangle
    namespace SubNamespace {
      <<annotation>>
      class Rectangle {
        double width
        double height
      }
    }
}

Setup

  • Mermaid version: 11.4.0
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

No response

@hjamaleddine hjamaleddine added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Nov 2, 2024
@D0kRay
Copy link

D0kRay commented Nov 27, 2024

There is a workaround for the nesting of namespaces.
But it doesn't work in 11.4

classDiagram
  
  namespace presentation{
      class auth
      class main
  }
  namespace auth{
      class AuthScreen
      class AuthViewModel
  }
  namespace main{
      class MainScreen
      class MainViewModel
  }

@jgreywolf jgreywolf added Type: Enhancement New feature or request and removed Type: Bug / Error Something isn't working or is incorrect labels Nov 29, 2024
@jgreywolf jgreywolf changed the title Namespaces structure Support nested Namespaces Nov 29, 2024
@dtcaobao
Copy link

dtcaobao commented Dec 9, 2024

Can confirm, I'm having the same issue here.
Using the PyCharm Mermaid plugin, 0.0.22+IJ.232 using Mermaid v10.9.1, I am able to make use of nested Namespaces.
It doesn't display any errors and the live editor isn't able to render it nor the Wiki in Azure DevOps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants