sporritt
Joined 15 years ago
Joined 15 years ago
Perhaps also I have missed something when I say that although this capability concept seems kind of cool on paper, who's writing the contracts to which the agents must adhere? Will they not just end up writing the contracts for themselves, in the most permissive way, slapping themselves on the back and continuing? It feels like turtles all the way up/down.
The trick with posting this sort of stuff (or finding out someone else posted your stuff) to forums, particularly this one, is to never read the comments. Ignorance really is bliss.
https://jsplumbtoolkit.com/blog/2024/07/18/wrapping-data-in-...
TL;DR I ended up creating a context object and a BaseComponent that can access the context. Subclasses of the base component prefix their attributes with a colon to instruct the code to look in the context:
<date-label :value="now"></date-label>
One day in a bookstore my son pointed out The Emigrants to me, which seemed serendipitous, so I bought it and took it home. Only after getting home did I realise The Emigrants by W.G. Sebald was not the book I'd had on my list all those years.
It turns out that the situation was very serendipitous indeed. Sebald was an amazing writer with a voice all his own, dreamlike and meditative, full of insight. The Emigrants is a story of loss and exile and yet somehow optimistic, or perhaps not; with Sebald it's enjoyably unclear.
I went on to read The Rings of Saturn, which I also enjoyed. The setup for the book is that a man is going to walk around Suffolk for a few days, basically. But it's not about that at all - as the man wanders so does his mind, and the book is basically an endless stream of digressions about any topic that enters his head. He might round a corner and see a church spire, for instance, and then before you know it he's talking about the colonial history of the Congo, which perhaps makes him think of Conrad, and suddenly we're onto the history of the church in Poland, etc etc. He never loses the thread, though. All of the digressions are interesting and insightful and together they all add up to something. Really great author.
https://jsplumbtoolkit.com/blog/2024/07/18/wrapping-data-in-...
Once I introduced a basic mechanism for injecting data it all seemed to be a lot more useful.
I really enjoy this state, but I find it hard to keep it going for very long. Pretty soon I think about how great it is that I'm not thinking, and it's all over.
https://www.jointjs.com/blog/jointjs-vs-gojs
but without any direct references to GoJS.
The emphasis on the foreign object tag in this most recent article ties in with their latest release, in which one of the selling points is the ability to embed HTML elements inside SVG elements. What they fail to mention is that an even more flexible approach, not supported by JointJS, is to render HTML elements as the vertices and embed SVG inside the HTML.
The article does make some valid points but on the whole comes over as slightly disingenuous. "A painful amount of code" has to be written to support a `:hover` class with canvas may be a true statement, but done properly it only has to be written once, and most likely not by the customer of a diagramming library vendor but by the vendor themselves. It's true also that a basic canvas setup "doesn’t preserve clarity when resized" but I've read a few things written by the author of GoJS in which a clear strategy is presented to mitigate the issue. There are many other small points like these peppered throughout.
Regarding accessibility, I have also wondered about this since seeing Google switch over to canvas for docs. It seemed extremely unlikely that they would have done so and abandoned accessibility, and a cursory search shows that they're currently using a 'side DOM', ie. maintaining a DOM that contains only accessibility stuff. This is again not something that a user of a library should expect to have to maintain themselves. You'd expect to add a vertex to some library and for that library to handle the side DOM, using accessibility information that you've provided, and that you would have needed to provide had you used a library that renders to SVG instead.