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
[ErDiagram] Allow comments after entity name #2548
Comments
The documentation is using single quotes while the jison file asks for double quotes. You can see the proper use in the spec file too. Looks like when I originally added the example image and code I didn't add in the example code, which was added in here. And, I'm not remembering why I even used single quotes in the docs there. I think it had something to do with double quotes not behaving right? It's fuzzy. Either way, the fix for this would be to update the doc to use double quotes. Going to ping @ddemoss222 since their ping is what pulled me over to look. Oddly, even when using the right quotes, or just using PK/FK the ER diagram looks odd to me on the live editor. Which definitely wasn't how it looked when I originally pulled it together. |
@RonaldZielaznicki Yes, this is how it is rendering for me as well. It looks as though it renders the text on top of each other. From some of the comments I reviewed within the issues it seemed as though the feature was supposed to add a column to the rendering for PK/FK, but I never saw a mock for how the comments were meant to render. Thanks for looking into this |
Looking a bit deeper, and at the second issue that I found on the live-editor side of things. It looks like the error comes down to some math that wasn't done right here and here. Both use So there are two things needing to be done to fix what's going on. First is the single quotes in the docs. The second is this math that isn't showing right. I'm currently not on a computer that can easily do development work. Those are where I'm seeing the problems. Still confounds me, because I rather vividly remember using this code to make my own diagrams at the time for a project of my own I was working on at the time. Hence why I did the change in the first place. Bah, guess hindsight is 20/20 and memory is short. If no one fixes these issues by Wednesday I'll nab them on Thursday. |
Just came to say the comments aren't rendering and they're also broken on the project's website: https://mermaid-js.github.io/mermaid/#/entityRelationshipDiagram?id=attribute-keys-and-comments Glad to see you're already on this! Thanks 👍 |
It looks like this issue was fixed by @ebjornset in January with #2598. Many thanks for grabbing it! Small snag, it renders correctly in the live editor. But, it doesn't look to be doing the same in the docs The docs are using 8.13.0, and the fix went through in release 8.13.9. That would explain why it's happening, but it's not a good look for the project and could cause confusion. Let's get that updated. |
My issue is about describing the whole entity, not its attributes. |
you should force github to update their mermaid version, it doesn't render correctly on github becuase they are probably pre-8.14 |
Is your feature request related to a problem? Please describe.
Usually, there is a need to describe the entity. So the ability to write a comment after an entity name would be extremely helpful!
Describe the solution you'd like
Add ability to specify a comment using
''
quotes after an entity name at the end of the line or before the{
The text was updated successfully, but these errors were encountered: