Do a significant % of users realistically read stuff like this? We've had exactly the same ongoing problem for over a decade, and walls of text, FAQs, etc just don't allay concerns. People are just too cycnical to believe it, maybe rightly.
We found the best solution was to claim that pricing kicked in at certain usage tiers, whereas everything is actually free all the time.
Well, now they've got a well-written explanation they can link to any time someone asks "so.. how is this free?"
Plus, this is a great blog post on its own merits. Someone like me (who has never used Tailscale) might find this interesting just as an explanation of SaaS economics. That might lead to me actually using Tailscale, or applying for a job there, or whatever.
Even if 1% of users are satisfied by this post... that's a lot of people!
And if it gains them even one enterprise client, I'm sure that's a massive ROI.
That's funny. Are you saying you had a website or product doc somewhere that said "When you get to 20k connections, you'll be charged $X/month" and then you never bothered implementing payment logic?
Yeah, it’s the google drive integration on draw.io/diagrams.net . Big companies want some cozy feeling so we tell them over 25 users per org is pay for.
We don’t measure it at all, but there’s plenty of companies we know are over 1k users.
Thank you for providing such a great service! Especially love the fact that exporting to PNG allows embedding the diagram data into the image, so it can be still edited later. Genius idea and implementation!
I think this isn't a good strategy for the project, at a commercial level. They currently have a well define niche. Competing in a much larger market without a clear competitive advantage won't work.
Foreign Object support in SVG is an optional part of the 1.1 SVG. Yes, it's true that only browsers support it in practice.
The reason for its usage is historic. Originally, this project was the underlying diagramming library only, that uses the SVG DOM for rendering. There was no application and no SVG export, that wasn't a function of the library.
FOs in SVG gave us the whole range of HTML in shape labels. So, as well as complex text formatting, we used it for tables, complex composites, etc. There a large legacy of shapes that use complex HTML for labels, we can't drop support for those.
The app itself came later and the SVG export function even later. It was fairly easy to generate because we can take it from the SVG DOM. But, converting HTML to SVG requires parsing the full HTML specification and generating the SVG to maintain compatibilty. This is an horrifically large task, it would require probably 5+ people full time, we don't have that resource.
I'm not sure calling it SVG is "tacky". It is part of the SVG 1.1 spec, albeit an optional one, it's not like it's isn't SVG at all. But yes, it causes confusion, thus the entry in the README [1], "It is not an SVG editing app, the SVG export is designed only for embedding in web pages, not for further editing in other tools."
Even using SVG for word wrapping alone, we've repeatedly asked critics how to do that without HTML for measuring the font metrics, we're yet to receive an answer how to do that in JavaScript. We've had plenty of comments pointing out this is wrong, we need a practical alternative thought out in detail.
<foreignObject> is a required part of SVG; but specific foreign namespaces like HTML, well, they’re not part of the spec at all; it just so happens that browsers all implement the same obvious but unspecified behaviour. In fact, the spec’s quite silly on the point of HTML in SVG, because you should be able to do something like this to use HTML in renderers that support that and fall back to SVG text otherwise:
… except that no values for requiredExtensions were ever specified, so including this attribute will make some HTML-capable renderers use the fallback, and omitting it will cause all correct SVG renderers to use the <foreignObject> (rendering nothing if they don’t support the HTML namespace) and ignore the <text>. Quite why they preemptively didn’t declare XML namespaces valid extensions, I don’t know; not doing so rendered the entire feature uselessly broken for its main intended use case! (I dunno, maybe all browsers implement requiredExtensions="http://www.w3.org/1999/xhtml" now; the thread at https://www.w3.org/Graphics/SVG/WG/track/issues/2053 talks of Amaya emitting it and Firefox not liking it back in 2008, and https://github.com/w3c/svgwg/issues/138 talks of Firefox accepting it in 2016. I haven’t tested anything.)
—⁂—
To do manual word wrapping, you have two main choices:
(a) If it’s acceptable to use HTML at conversion time, Range does all you need, with Range.getClientRects on a range spanning an element returning more than one value if wrapping has occurred, and then you can do something like binary search on the process to find the point of line break, or you can get cleverer if you like to speed it up.
(b) If not, you’ll need to embed at least an OpenType font loader and shaper. HarfBuzz is a good choice for this, with a WASM version readily available (among other options); https://harfbuzz.github.io/harfbuzzjs/ demonstrates it. There are at least three pretty decent options in Rust, too (in alphabetical order: Allsorts, RustyBuzz, Swash), and a few immature libraries covering more to do with rich text formatting (including wrapping) rather than just stopping at shaping.
I’m pretty sure I’ve heard of at least one full HTML-to-SVG renderer that ran in the browser, too, used in such places as filing bug reports to take a “screenshot” of the page. HTML → PDF → SVG is very probably a more practical path for this in your case.
Hey David, thanks for draw.io/diagrams.net and I hope you liked the article!
I've found both of these before attempting any of this (I think you linked them to me on Twitter?), but was happy with neither of them: the point was to not depend on Docker, or Node, or have a solution that's Linux-only.
My solution integrates well with the rest of the pipeline that's all-Rust, and it works at least on Linux and Windows (macOS would probably be easy to support as well but I don't use it currently). It's very similar to `draw-image-export2` in spirit.
In my solution I made sure to ship a font I always use in diagrams (Iosevka) as a webfont, so I don't have to rely on fontconfig to find it - I'm not sure how that would work with either of the readily available solutions. And finally, I've left as a next step but: I am planning on keeping a Chrome instance running in the background (and an http server), and re-use it so there's less setup/teardown for each export.
Yes, I confess to enjoying a long hack to achieve an end goal, even if it's working around issues I helped to cause :).
But yes, I see the problem with docker, we don't actually use any of the docker images anywhere. Why is node a problem?
We are thinking about adding an option to make the SVG export go via PDF through inkscape to make the labels all SVG. The end SVG is actually smaller than the one we produce in initial testing.
Do you know, does this also work in WSL nowadays. Some time ago I've tried to generate a PDF/SVG using mermaid.js' CLI and it failed miserably with a Chrome stacktrace.
Edit: I'd also like to point out that depending on Chrome just to support headless exports seems a bit much, but I've also got 32GB of ram to spare, so I might be fine.
You think space are bad (and yes I'm old enough that I don't use them)... We work with a company that has forward slashes "/" in their trading name and insist on shared cloud directories involving them to be prefixed with that trading name.
As you as you do anything programmatic in/out of these drives it all hits the fan. So I'd add to the original statement - "Avoid 'technical' companies with special characters in their name", it's just not right...