-
Notifications
You must be signed in to change notification settings - Fork 206
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
Need node IDs to be able to create more than one node with the same label #187
Comments
I am right now doing a big rewrite of the parser to support some new features, for example an ID field. |
What was your vision for ID syntax in case we decide to contribute and add it ourselves? |
You can track the rewrite from Jison to Peggy in the This is the new syntax: The plan is to allow any metadata to be added as key-value pairs within the angle brackets. |
Have a look at https://stage.nomnoml.com/ where I have deployed a release candidate for the new parser. I would be very grateful for some testing here before I deploy it to www.nomnoml.com 🙏 |
Thank you. I am getting a compile error on stage for a graph that works in the current version. There are no details to where the issue is. How would you like me to communicate the doc to you for troubleshooting? I'd prefer for it not to be in the public domain. |
You can email me on [email protected]. I'll delete it once I have identified the troublesome syntax. |
I tested the new parser for my current use case and it works. Do you have any other cases you need help testing? |
@tcbuzor nice to hear that it works. Just test it with whatever diagrams you usually write. You might be using a different "style" than me, one that I haven't anticipated. 😄 |
Sure, will test other scenarios. Do you mind also providing some insight into how one might implement the ERD associations? #185 |
Maybe this syntax would be a better way [foobar] Because this solution will be clearer when the engine will be expanded with additional arguments like this. |
Your project is really fantastic. I'm just looking for a simple JS library that is able to render a simple static flowchart out of a text definition. There are other really great projects like MermaidJS or jsPlump, but they are so huge and massive overkill. And your new parser was the feature I'm waiting for. Using numeric IDs for connecting elements, ex.:
is much easier than using long text labels. I love nomnoml. EDIT: The only thing I had to change is exporting |
New version deployed to https://stage.nomnoml.com And thank you @wurst-hans for your kind words 😍 |
@skanaar , thank you for fixing the issue. |
@skanaar I will do that. My nomnoml skills have been called magic over the last years, this is because my brain really loves and integrates that syntax so much more than plantuml or mermaid.
If there are specifics to test please feel free to ping me! |
There is a trick that I found with the old parser:
|
It looks like there are restrictions on what can be added as values? I tried
Right now the value is restricted to characters Edit: |
@zflat good feedback. |
Thanks! The only other thing I would request that could truly allow any metadata would be to support enough characters for base32 or base64 encoding, however supporting the |
I have deployed a new version to https://stage.nomnoml.com that solves some performance issues. I would really appreciate if you can guys can test it out. As soon as I am confident it works it'll be deployed to nomnoml.com |
New version released 🎉 |
Nomnoml syntax and graph rendering relies on node label for identity. Unfortunately, this is very limiting as there are many situations where one may have more than one node with the same label. Would it be possible to extend syntax and rendering to allow for optional IDs for all types of nodes (e.g. [<style> {id} label ]) where if ID is missing then the graph would continue to use label as ID, if its present then ID would be used as identifier of unique node instead of label? Use of curly brackets for syntax is just a suggestion, any syntax to indicate ID would be fine.
The text was updated successfully, but these errors were encountered: