Install this theme component
| A Box |----->|Another box |
Will render as a high fidelity SVG in your post.
The component re-packages the open source
Svgbob library, an online playground for svgbob is at: Svgbob editor
Minimal requirements: The component leans on very recent changes to Discourse core and will require Discourse 2.9.0.beta4 or a current default install.
It isn’ working out of the box:
Did you update discourse to latest today?
Of course not
My bad. Normally I do that everytime when some new structures has introduced.
This is so cool
is it possible for the component to add
wasm extension to
settings.theme_authorized_extensions by itself (it requires an additional manual step now)
svg lines and text are rendered in black, which makes them invisible in dark mode. Is it possible to detect dark mode and render lines and text in white.
Chart.js as a theme component next!!! (the Discourse-chart plugin exists, but is very limited).
Already changed in core to add wasm in the default allow list, are you sure you did not fiddle with extensions on your install?
Great suggestion will see if I can add dark mode support!
@sam even it is really good idea update, that wasn’t the issue this time. There was a conflict between this and unanswered filter.
Edit: and this isn’t issue any more
You’re right, I added extensions to the list manually before.
Dark mode support
Does it have any advantages over yUML?
discourse-yuml adds yUML support to discourse.
From the readme
Add the ability to write yUML class diagrams directly into a discourse post.
[Example of yUML diagram in discourse]
To install in docker, add the following to your app.yml in the plugins section:
- mkdir -p plugins
- git clone https://github.com/discourse/docker_manager.git
- git clone htt…
# instead of a theme-component # means it can be installed easily, even on shared hosting, and there is no need for rebuilds. plugin
yuml also draws, well, UML diagrams, while svgbob is a free form drawing tool.
Email notification for post containing svgbob displays ASCII diagram rendered as a
<pre><code> block rather than svg, is there any chance the diagram could be converted to svg or png prior to sending an email?
# won’t be able to do it cleanly. theme-component
Wow. I love it!
yeah it auto calculates the height, I totally can get that it can be somewhat annoying if you want to override, can you paste the ascii for diagram? Is it cropped at height 21?
In some iterations it was cropping at 21. Currently it isn’t, though it is cropping a little bit short of full height and the SVG is displaying a scrollbar on the right hand side.
Here’s the code, I copied it from the svgbob examples, and added a small piece of my own at the top.
o-> Simple Things
| user | o--> | notes |
.----> Initial Release
Planning *-------. / \
\ / '---> Patch 1
Initial research \ / \
* \ / '--> Patch 2
\ \ /---------> Beta
\ \ /
\ o o _______
\ .---. *--.___ / \
'------> ( ) '------O-> . Release .
`---' o \_______/
o o o \
/ \ \ \
.--' \ \ \
/ \ \ '----+-> Push backs
/ \ \ \
/| \ \ '----> Setbacks
/ | \ \
V /| \ '-----> Reception
Team / | \
v /| \
Worklaod / . '-->> Career change
Oh I think we have a 500px max height on code blocks (just like your example above). svgbob is inheriting it.
I guess there is no huge harm in removing this limitation? In the mean time you can easily just add a theme component to your site that overrides this.
That’s good to know. I’ll watch and see how it’s used. The initial feedback is negative