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

Add nomnoml rendering feature #820

Closed
wants to merge 1 commit into from
Closed

Conversation

korroz
Copy link

@korroz korroz commented Jun 9, 2015

Makes StackEdit capable of rendering nomnoml code within fences, much like the other uml features. Fixes issue #645.

This is how it looks in action:

nomnoml in stackedit


I kept the commit clean, but I'm not entirely sure that's what I should do. Or should I commit the minified build and the messy updates following gulp bower-requirejs as well (I think RequireJS got upgraded as well)?

Let me know how you want it and I'll fix it.

Makes StackEdit capable of rendering nomnoml code within fences, much like
the other uml features.
@benweet
Copy link
Owner

benweet commented Jun 9, 2015

Hi @korroz
The commit looks good. Just 1 thing, I'm not confortable including lodash and underscore in the same project. I think nomnoml was using underscore before your Librarify task. Is there any strong dependency on lodash or could it work with underscore only?

@benweet
Copy link
Owner

benweet commented Jun 9, 2015

By the way, SVG rendering would be great (portability, support for CSS theming). I had a quick look at skanaar/nomnoml#15, but it looks like @ctzurcanu didn't make his pull request. Is there any blocking issue?

@ctzurcanu
Copy link

@benweet Yes: I was talking with @korroz about other ways to render svg besides canvas2svg lib and there are 1-2 nontrivial bugs that are related to nomnoml not providing sufficient data to an outside renderer. Had not have the chance to check if nomnoml library solves this.

@korroz
Copy link
Author

korroz commented Jun 9, 2015

@benweet yeah that bothered me as well actually. Especially since there is no specific reason anymore. In my work I made an attempt to upgrade dagre as you can read in the commit message of 16c7e400. But later I had to revert the upgrade for reasons mentioned in the commit message of 968dfd00.

The bottom line is that nomnoml is compatible with either lodash or underscore. I'll take a look at solving this dependency.

Regarding SVG rendering, this should probably be viewed as a medium term milestone for now, unless there is a pull request that satisfies @skanaar. We're discussing it already.

The current state of nomnoml (in StackEdit) is still made portable by rendering an <img> instead of leaving it as a <canvas>. This means that Export as HTML and similar functions work as expected in StackEdit. Talking about theming, that is injected as a preset directive for now. I was going to see if the theme palette could be accessed programatically but I'm still new to the StackEdit code base.

Lastly I'd just like to say that I also, in the end, think SVG is a better match for nomnoml. In fact that was one of the first things I discussed with @skanaar.

@jakupmichaelsen
Copy link

When will this feature be integrated into StakEdit, or what do I need to get it to work?

andriipatsula added a commit to andriipatsula/stackedit that referenced this pull request Sep 9, 2016
@benweet benweet closed this Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants