drawio icon indicating copy to clipboard operation
drawio copied to clipboard

[Bug] Mermaid Import has trouble with namespaces

Open ravensorb opened this issue 1 year ago • 1 comments

Preflight Checklist

  • [x] I agree to follow the Code of Conduct that this project adheres to.
  • [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

If you are technical, you should reporting bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.

Describe the bug Importing mermaidjs that contains multiple namespaces seems to causes issues in the rendering.

To Reproduce Steps to reproduce the behavior:

  1. Create blank diagram at https://app.diagrams.net/
  2. Select Arrange > Insert > Advanced > Mermaid...
  3. Paste in some mermaid text with multiple namespaces (see example below)
classDiagram
    namespace Profile {
        class ProfileEntity {
            +GUid Id
            +string FirstName
            +string LastName
        }
    }

    namespace Poster {
        class PosterTypes {
            <<Enumeration>> 
            Movie
            TV
        }

        class PosterMetadata {
            +Date ReleaseDate
        }

        class PosterEntity {
            +Guid Id
            +enum PosterType
            +string Name
            +List~string~ tags 

            +PosterMetadata MetaData
            +PosterTypes PosterType

            +ProfileEntity Owner
        }
    }

    PosterMetadata --> "0..1" PosterEntity
    ProfileEntity --> "0..1" PosterEntity

    PosterEntity --> "0..*" PosterEntity 

Expected behavior All of the attributes for the classes are not rendered. You can see with the hover over that it looks like the data is there, its just not rendered.

Screenshots image

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version 22.1.18
  • running in docker from official image

Desktop (please complete the following information):

  • OS: Windows or Ubuntu
  • Browser: Chrome and Edge
  • Browser Version: latest stable build

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:

  • This problem exists when testing from multiple browsers and Operating Systems

Additional context Add any other context about the problem here.

ravensorb avatar Jan 16 '24 03:01 ravensorb

Note that mermaid isn't part of the core draw.io functionality, it's provided in a best effect fashion. The version is likely out of date.

davidjgraph avatar Jan 16 '24 09:01 davidjgraph

Please test with 24.4.11.

davidjgraph avatar May 31 '24 09:05 davidjgraph