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

Empty namespace in classdiagram #4625

Closed
kostkams opened this issue Jul 10, 2023 · 6 comments
Closed

Empty namespace in classdiagram #4625

kostkams opened this issue Jul 10, 2023 · 6 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect Type: Enhancement New feature or request

Comments

@kostkams
Copy link

Description

It's not possible to create an empty namespace without any class.

Steps to reproduce

  1. Create only namespace without content

Screenshots

No response

Code Sample

classDiagram
namespace Test

Setup

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

Suggested Solutions

No response

Additional Context

No response

@kostkams kostkams added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jul 10, 2023
@Yokozuna59
Copy link
Member

Yokozuna59 commented Jul 10, 2023

In mermaid, namespaces are rectangles with a title wraps classes, does it make sense to create an empty one with height and width?

@kostkams
Copy link
Author

How could I create a rectangle? I haven't found something in the docu.
That would solve my need.

@Yokozuna59
Copy link
Member

That's my question, why do need an empty rectangle? It would take up space in the diagram and make other classes/namespaces have more padding, which would make the diagram look worse.

@kostkams
Copy link
Author

Ah sry, we use mermaid as an uml data model design tool. The user can create emtpy classnames and add the class later.
Right now, we add a dummy class with "hidden"-class. But that is just a workaround

@nirname nirname added the Type: Enhancement New feature or request label Jul 11, 2023
@jgreywolf
Copy link
Contributor

Ah sry, we use mermaid as an uml data model design tool. The user can create emtpy classnames and add the class later. Right now, we add a dummy class with "hidden"-class. But that is just a workaround

My suggestion would be to create a class within the namespace, just the name of the class itself. That should give you your box. Otherwise, the namespace will not draw

@jgreywolf jgreywolf added roadmap items to add to roadmap for auto workflow and removed roadmap items to add to roadmap for auto workflow labels Nov 16, 2023
@jgreywolf
Copy link
Contributor

Closing as this is not something, and there is a workaround available

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: Bug / Error Something isn't working or is incorrect Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants