7 ms·
JSON Canvas – An open file format for infinite canvas data
- ramses0 3y agoThe spec basically fits on a page: https://jsoncanvas.org/spec/1.0/ https://jsoncanvas.org/spec/1.0/ Summary: "node: { type: ..., x/y/color }; edge: { from/to: ..., color/label/... }" Refreshingly simple, especially paired with their "gif of usage": https://obsidian.md/canvas https://obsidian.md/canvas
- jakelazaroff 3y agoI really like the idea of a format for interchange between infinite canvas apps, but the preset colors and list of node types makes this spec feel strangely opinionated. You could build something like Kinopio [1] but not much beyond that. It looks really promising though! I'm definitely interested in seeing this grow. [1] https://kinopio.club https://kinopio.club
- iainmerrick 3y agoThinking about it, I'm not sure any interchange spec would leave useful room for innovation. This isn't like EPS or PDF or something where the kind of output is well-defined (printable graphics + text) and the innovation is in the editing interface. The innovation in canvas apps is surely in the semantics of the nodes themselves; but if you add some new node type with special behavior, how can you usefully export that to other apps? You could make it a black box that can round-trip safely, but that doesn't seem very useful. Maybe if it's something like an HTML embed or iframe?
- heleninboodler 3y agoMy very first thought about this format was that someone is definitely going to pervert it to be used as a graphics format, and for that it's woefully inadequate. I decided to hold my tongue since it's not the creators' fault that someone will misuse it, but I can totally see people adding optional ad hoc fields to nodes to allow for example all sorts of fancy line styles.
- cmgriffing 3y agoI think a baseline spec would be really useful. I like to think of it like the unist ecosystem for ASTs. Unist provides a baseline spec that compatible tools can use to comb an AST. Then, specific AST tools like hast for HTML or sast for CSS/SCSS can add their own metadata on top. I'm imagining an ecosystem of "adapters" that would help you translate some of the metadata across providers.
- gcr 3y agoIt would be fun to go the postscript route and have the nodes be specified by some bytecode on some VM that lays the objects out on the canvas while specifying their editable properties. Then, conforming implementations could render any document just by following the instructions, while editors that actually understand them can provide their own high-level control. The trick is keeping it editable, which postscript doesn’t do well. Example: if the language is strong enough to, say, implement force-directed node layout, an editor that doesn’t understand it could still add nodes and they would move around according to the document author’s wishes whereas perhaps the original editor might have more powerful editing capabilities.
- jimmySixDOF 3y agoKinopio have already implemented this for import/export and according to the dev "not all apps support every feature, so the core content and it's placement is what you'll carry over" [1]. Great tool by the way its so whimsical and fun to play with you can explore what other people share once in a while you find something they obviously put a lot of time and care into. [1] https://twitter.com/KinopioClub/status/1768037179400331692?t=bED-Hhj7TdgX_cO_RiZq4A&s=19 https://twitter.com/KinopioClub/status/1768037179400331692?t...
- Caddickbrown 3y agoJust realised this is by the Obsidian guys! Good on them!
- mock-possum 3y agoLove obsidian and it’s cute that the site itself is presented as a ‘canvas’ interface element, but… not a great experience on mobile (iOS/safari) - pinch to zoom and drag to scroll are both a bit busted, the zoom ui controls can disappear altogether, and there’s no ui indication that the box on the right, that contains the details of the spec, is actually a scrollable container (ie no scroll bar visible)
- subtra3t 3y agoReally? I used the website on Chrome on my Samsung Galaxy M12 (a fairly average smartphone) and the experience was fine.
- regus 3y agoWhat is the upside of using an infinite canvas? I tried playing around with them in the past but I think my brain's mental model of how to parse data is incompatible with "clutter" (for lack of a better term) of an infinite canvas.
- aragonite 3y agoCheck out this video from one of my favoriate infinite canvas softwares, especially beginning around 1:25 (which I'm deep-linking to): https://youtu.be/GblI7GI0jQ4?t=85 https://youtu.be/GblI7GI0jQ4?t=85 (Alas, the original desktop app (iMapping, in Java) as shown in the video is no longer being developed, and now they are only developing the web app (Infinitymaps) only run in the browser, which imo is not the best fit for infinite canvas apps which can be very resource-intensive) Also see the app author's own all-purpose mega-map that he used to organize everything: https://youtu.be/bTQWL5wmdZY?si=6VrnPIErOzasisEe https://youtu.be/bTQWL5wmdZY?si=6VrnPIErOzasisEe
- DrDeadCrash 3y agoImo it would need to show varying levels of information density depending on scale. Otherwise, as another commenter stated it's overwhelming....
- Sakos 3y agoOne of my favourite implementations is a note-taking app on Android/iOS named ZoomNotes, where you can add a "sub-canvas" anywhere that lets you click into it, taking you into a different infinite canvas. This helped me organize my information better. You could nest canvases as much as you wanted.
- allenu 3y agoI've always wanted to build an infinite canvas idea to try it out, but whenever I've used implementations of it (such as in the Muse app), it just feels wrong. It feels like a beautiful way to interact with essentially fractal information, but in practice it doesn't quite work to me. I agree with you that I don't think it maps well to the mental model of the brain. Seeing the youtube video link in the sibling comment, when the user is completely zoomed out and can see everything, I just feel overwhelmed looking at it all. Maybe it's the nature of the boxes having different scales that you can't compare them as easily to each other compared to just a regular canvas where things just place in two dimensions. Each time you zoom into a canvas, the transition causes a lost sense of place and space, akin to walking into a doorway to a room and wondering why you walked there to begin with.
- theogravity 3y agoIt would be nice to see actual examples. We use an infinite canvas (https://switchboard.app https://switchboard.app), but it's hard for me to map the objects we have on our virtual-desktop-like-canvas with the file format described here. The items on our infinite canvas are more akin to a desktop app, where most objects are application windows.
- m12k 3y ago> It would be nice to see actual examples If you click "Toggle output" on the linked page, you can see the code for the page itself
- theogravity 3y agoThanks. The available types definitely do not map to what we do. It seems the format is more suited for displaying DAGs.
- heleninboodler 3y agoSuggestion: add some metadata at the top level, including a bounding box that includes all nodes so that you can encapsulate a canvas and include it within another context before having created all the elements within it. It's redundant information and it needs to be kept in sync with the nodes and edges, but it's very useful for applications working with your data. Also, this is not very json-ish, but optimizing your serializer so your metadata is always written first is pretty handy for embedding, since it allows you to use a pull parser and do useful things before the entire doc is parsed. (e.g. picture a huge doc being embedded and starting out as just a box and having its elements filled in async. You can't do that well if you don't know the bounding box ahead of time)
- kijin 3y ago+1 for bounding box. It would save a lot of computation when trying to determine the initial scale for the canvas, especially if text is involved. It would also make the format useful for fixed-size canvases, not only infinite ones.
- heleninboodler 3y ago> not only infinite ones I don't think this really has much to do with the "infinite" nature of the canvas. Individual instances of infinite canvases have a finite size. :)
- deleted 3y ago[deleted]
- iainmerrick 3y agoThis looks a little pre-1.0, it's quite short on detail. For example: file (required, string) is the path to the file within the system. What kind of path, within what system? It's not clear that the 'file' type couldn't just be another kind of 'link'. If various fields like 'background' were defined to be URLs, that would offload a lot of complexity onto existing web specs.
- gvx 3y agoYeah, other details are missing too. For example backgroundStyle: > cover fills the entire width and height of the node. Does that work like the CSS background-size: cover; or background-size: 100% 100%;? > ratio maintains the aspect ratio of the background image. Does that mean CSS cover? contain? Something else?
- wongarsu 3y agoColors can be specified in hex format, e.g. "#FFFFFF". Six preset colors exist, mapped to the following numbers: 1 red 2 orange 3 yellow 4 green 5 cyan 6 purple I'm sure everyone will infer the same color codes here. Maybe the file format isn't meant to reproduce the exact same look in different software, but merely communicate user intent. Your guess is as good as mine.
- gcr 3y agoI’d almost prefer string literals for color with constants like “red”, “blue”, etc. that compatible implementations could theme as they see fit (eg terminal emulators). Perhaps that’s the intent behind the numeric constants but string literals would convey that better IMO
- adamfeldman 3y agoThis was released (and originally implemented) by Obsidian: https://obsidian.md/blog/json-canvas https://obsidian.md/blog/json-canvas (see also https://news.ycombinator.com/item?id=39670684 https://news.ycombinator.com/item?id=39670684)
- mstipetic 3y agoI would highly recommend using this plugin with it - https://github.com/rpggio/obsidian-chat-stream https://github.com/rpggio/obsidian-chat-stream It has basically changed the way I interact with LLMs and research and plan things
- kepano 3y agoWhoa! Didn't expect this to bubble up to the top of HN. Some context about why we created JSON Canvas: https://obsidian.md/blog/json-canvas/ https://obsidian.md/blog/json-canvas/ We just released it today, so this is still a very nascent project. A little over a year ago we released Obsidian Canvas. The .canvas file format has felt stable enough to give it a name and resources that other apps can freely use. See the original Show HN: https://news.ycombinator.com/item?id=34066824 https://news.ycombinator.com/item?id=34066824 The spec is conservative, and definitely does not support many features canvas apps will want to implement (yet). The purpose of giving JSON Canvas a name and site is to encourage an interoperable ecosystem to grow around this format. We're definitely looking for feedback of all kinds! It's great to see all the suggestions already shared in this thread because it starts to provide a roadmap for how this could become a more useful format for other apps.
- remram 3y agoWho was involved in this open spec? Or was it built by Obsidian with a hope that it works for everyone else? Which existing formats were considered before building your own, e.g. SVG/Excalidraw/draw.io/...?
- eichin 3y agoYeah, didn't see any discussion in the other thread, do you have any notes on why this isn't SVG?
- npunt 3y agoIt makes sense if you see Obsidian as the starting point - it's a document store. While other canvas products may be more graphics-oriented, Obsidian's is about laying out documents and objects and providing simple relationships between them. For this purpose, JSON's probably a lot easier to work with than XML/SVG.
- remram 3y agoObsidian's own file format might have merit, but posting it as an "open file format", "created to provide (...) interoperability, and extensibility to data created with infinite canvas apps"... and then publishing 1.0 without consulting with anybody else... is rather egregious, I think. I agree with you that posting Obsidian's spec to start the conversation would have been welcome, but this is not what they did.
- lovasoa 3y agoAs a maintainer of an open source JavaScript infinite canvas application [1], I was very interested, and now I am a little disappointed. The set of supported objects on the canvas is quite minimal. [1] https://github.com/lovasoa/whitebophir https://github.com/lovasoa/whitebophir
- Retr0id 3y agoIf ids are unique strings, then why are `nodes` and `edges` arrays, as opposed to id-string-keyed maps?
- desmondl 3y agoAn object in JSON is meant to be unordered [1], so arrays are better if you want order to be preserved. [1] https://www.json.org/json-en.html https://www.json.org/json-en.html
- Retr0id 3y agoSure, but why do you want order to be preserved? The spec never says the order of nodes is pertinent. Is there undocumented z-index behavior?
- Retr0id 3y agoLooking at their reference impl, it does seem that array index implies z-index, in which case fair enough, I suppose an array does make the most sense - they should probably document the z-indexing though!
- desmondl 3y agoSometimes you have nodes that overlap each other, so you want to control whether or not a node is in front of or behind another node. Though yes, they could have explicitly defined a z-index or defined a convention on how the ordering should work (first nodes top and last nodes bottom or vice versa?). It's interesting to think about the trade offs between explicitly defining these things vs. leaving the application to implicitly make the choice. JSON Canvas seems to be designed to use in tandem with markdown files in a note taking app, so it makes sense why they opted for the more implicit design to be similar to markdown
- kepano 3y agoThis clarification has been added to the spec: > Nodes are placed in the array in ascending order by z-index. The first node in the array should be displayed below all other nodes, and the last node in the array should be displayed on top of all other nodes.
- tiborsaas 3y agoI really like that you commit to keep this stable and open. Do you plan to make the TypeScript definition part of this new site? https://github.com/obsidianmd/obsidian-api/blob/master/canvas.d.ts https://github.com/obsidianmd/obsidian-api/blob/master/canva... For me it's easier to read TS format.
- egeozcan 3y agoI didn't know about this and made ChatGPT prepare me a typescript definition form the markdown: https://gist.github.com/egeozcan/27db06f6771dcf214f0f92bce8c4fe79 https://gist.github.com/egeozcan/27db06f6771dcf214f0f92bce8c... :) Perhaps I shouldn't be too lazy to google things.
- raggi 3y agoI would love to see this and excalidraw converge feature & spec wise.
- desmondl 3y agoAny reference for obsidian's specs? The closest thing I could find is this: https://docs.excalidraw.com/docs/codebase/json-schema https://docs.excalidraw.com/docs/codebase/json-schema but it seems to be really minimal and doesn't go into detail on what properties belong in elements
- dekhn 3y agoIs this infinite canvas similar to QGraphicsView? I've been looking for a good equivalent to QGraphicsView and HTML Canvas is not it (HTML Canvas is a raster image, QGraphicsView is a size-independent fixed-sized, scrollable canvas with indexed objects).
- tonyarkles 3y agoWould it be possible to bang SVG into what you’re looking for? It’s a little bit quirky but I’ve used it to draw some pretty wild diagrams with a small amount of JS for pan and zoom.
- CubsFan1060 3y agoIs there any control over the routing of the edges?
- ianbicking 3y agoThere's some questions about interoperability, which I imagine to be hard since any canvas app involves viewing and editing and probably has unique entities and approaches which other apps wouldn't be able to handle. BUT, I imagine this being more useful for creating non-frontend tools. For instance a server that returns subsets of nodes for a particular viewport. Or something that may index nodes, or produce search results. Or tools that simply generates canvases from other data as a one-way operation.
- treflop 3y agoSince a whiteboard is much more a visual thing, I imagine the spec should spend a lot of space defining the visual elements like specifying the control points of the Beizer curves because where a line is drawn and what it overlaps matters a lot on a whiteboard. But to be a total downer, this spec looks like an extremely rudimentary graph file format, of which there are already like a hundred and all define more visual aspects than this spec.
- xamde 3y agoFrom my Analysis, GraphML, although specified in XML, seems to be one of the most widely used exchange formats, especially with the yWorks extensions for yEd.
- asa400 3y agoI've worked a few jobs now where application data was stored in text files of various kinds (homegrown as well as well-defined formats, JSON included) and it pretty quickly becomes a mess when you start talking about modifying it over time, evolving its schema, validating it in the face of end-user edits, ensuring threads don't write to it concurrently, etc. This strikes me as exactly the type of application data that would benefit from being represented in SQLite. Of course, JSON is a `JSON.parse` away, but now you're building your own...everything else. Storage/retrieval, validation, querying/filtering/indexing, graph traversal, etc. It's all yours. There's so many benefits to building this kind of thing in SQLite. You get data validation, atomic transactions in memory and on disk, a high-level query interface, lazy loading (i.e., only load nodes at most 2 edges away), triggers (when I delete this node, automatically delete edges that point to it), and a stable on-disk format, to say nothing of the fact that SQLite itself is just about the most stable software there is. By the way, no disrespect to JSON Canvas, it looks like good work, just trying to offer the perspective of someone who has done stuff like this in the past.
- simonw 3y agoI'm usually the first person to suggest SQLite for just about anything, but in this particular case I do feel like JSON is a better default format. Interacting with SQLite from different programming languages is easier than most other formats, but you still need a SQLite binding. They're available for every language but that's still a not-completely-trivial dependency. I expect most tools that people build against JSON Canvas will run in a web browser. Adding SQLite as a dependency means you need SQLite running in WebAssembly - totally possible, and even officially supported these days (the SQLite team run their own WASM builds now) but still a sizable piece of extra complexity over just using JSON.parse(...) Also: SQLite files aren't very easy to diff, so they're not great for collaboration in version control. JSON is better for that. I'm 100% with you on the schema changes and versioning challenge. The best way to address this IMO would be for the spec to include a top-level "version": key which indicates the version of the spec that a file was created against. Handled carefully and introduced right at the start of the project this could ensure an ecosystem grows up around the standard such that older spec versions can always be opened by newer implementations, and any implementation can fail-fast if it is given a file that it doesn't yet know how to handle.
- simonw 3y agoIt would be neat if the README or spec included links to some real-world examples of files - would be easier to start playing with building simple tools on top of this if there was already an example file to start experimenting with, without me having to learn Obsidian first. UPDATE: Figured out how to create one: 1. Install and then open Obsidian 2. Click the "Create new canvas" icon - third down of the icons on the left 3. Add some stuff to the canvas - I double clicked to create a few boxes, put some text in them and then dragged lines between them 4. In the ... menu on the top right click "Reveal in Finder" You can then open the file it reveals in a text editor to see the JSON Canvas format.
- jakelazaroff 3y agoIf you hit "toggle output" on the bottom right, it shows a JSON Canvas representation of the page's content.
- simonw 3y agoIs that an icon? I can't seem to find it (Obsidian 1.4.16 on macOS)
- jakelazaroff 3y agoSorry — I mean on the bottom right of https://jsoncanvas.org https://jsoncanvas.org!
- dolmen 3y agoThere is one example in the repo: https://github.com/obsidianmd/jsoncanvas/blob/main/sample.canvas https://github.com/obsidianmd/jsoncanvas/blob/main/sample.ca...
- politelemon 3y ago> The JSON Canvas format was created in hopes of providing longevity, readability, interoperability, and extensibility to data created with infinite canvas apps. If I'm reading between the lines, this is only supported by Obsidian (as it's by Obsidian)? Considering the complexities and 'malleability' of infinite canvas tools, it would have been prudent to have involved or approached some of the major players in this space, like Excalidraw, Draw.io, Microsoft, Figma. Or at least started at version 0.1 and once it gained a wider consensus, release 1.0.
- wongarsu 3y agoBased on the title I would have expected this to be about describing images on an infinite canvas, where different parts have different zoom levels. This is instead about whiteboard-style graphs. Which is useful, but I find the branding "An open file format for infinite canvas data" to be confusing. Nothing in it implies whiteboards or graphs to me. The fact that the canvas is infinite doesn't even have an obvious influence on the file format, apart from the absence of a canvas size property.
- airstrike 3y agoThis is neat, I'll definitely try it out. I do have a related question: what are people using to implement high performance canvases on React these days?
- WuxiFingerHold 3y agoThe canvas in Obsidian is as the whole app very well made. I wondered what they are using as well. My guess is https://www.xyflow.com/ https://www.xyflow.com/, which is for drawing nodes. More general purpose would be http://fabricjs.com/ http://fabricjs.com/. Or very low level https://pixijs.com/ https://pixijs.com/.
- airstrike 3y agoThank you very much!
- catapart 3y agoOh sweet! I was in the middle of building my own version of a node-graph component (ref: https://github.com/catapart/Magnit.NodeGraph https://github.com/catapart/Magnit.NodeGraph), but the `canvas.js` implementation from this JsonCanvas repo is exactly what I was trying to build. I really, really like how elegantly uncomplex it is. Could not have been more exactly what I was looking for. So thanks for this! As far as the spec, I don't really like the idea of forcing well-known types for the nodes. A generic spec should allow for entirely generic nodes that can represent themselves to consuming functions with a 'type' property as a key, as well as arbitrary data types linked to arbitrary nodes. For instance: one of my use cases is an 'addition' node, which would take two number values and produce a number value. This node would also use an entrance execution pin as well as an exit execution pin. If the spec were to include a 'pin' data type and capture the type keys and labels for pins, those pins could be stored as a list on the node. Then, the type property could just tell the executing context how to route the node data and the pin properties would bring type safety to the functional inputs passed to the mapped function. Anyway, I assume all of that is out of scope for initial offerings, but that's my two cents on a generalized node spec. Regardless, thanks again for the sweet, simplistic node graph implementation!
- Macha 3y agoOne of the big reasons I use Obsidian is the data portability - while it provides some nice enhancements, if Obsidian went evil tomorrow and I had to use my notes in VS Code tomorrow, then even reduced to just "a folder full of markdown", I'd get 90% of the value without relying on any convoluted importers/exporters. I've stayed away from their Canvas feature largely because it is.. not that. Not because the Obsidian developers have kept it locked down in some crazy proprietary format, but like a JSON file representing the canvas is pretty useless without something to interpret it and these days Obsidian is still the only implementation. So I kind of hope this takes off. Having a second source available would make me feel a lot more comfortable trying out the canvas feature.
- chatmasta 3y agoI've stayed away from their Canvas feature because the Excalidraw plugin for Obsidian is unbelievably good. I love it.
- skadamat 3y agoCurious to know which projects & companies were involved in creating this. Ideally an open standard has a bunch of folks involved & informed of the design process so we get a design that lasts! Braintree payments did this well when they were still a startup. They had to collaborate with their direct competitors to create a standard for the entire POS induustry. What prevents us from doing this here as well?
- gcr 3y agoThis is a great idea. For now though, the spec is under-specified and ambiguously terse. A few points that could be clarified: - How do coordinates work? Does +Y point up (OpenGL) or down (web)? Is the origin meaningful? What are the units - how does this interact with font sizes? High-DPI displays? - What’s the difference between a file node and a URL node linking to file://./? Are files supposed to be transcluded? What filetypes are allowed? The home page seems to have an image — was this done using a file node or a markdown node with an <img /> element? - What HTML tags are allowable in markdown? Is JavaScript allowed? - Why does the group node allow a background image? If both image and color are specified, which takes precedence? How are children of the group specified? A couple feature requests for extensibility or interoperability with Excalidraw and TLDRaw and friends: drawings / scribbles, predefined shapes like circle or rectangles, ability to specify fill style, edge width, transparency, ability to embed images, more detailed placement for connector start/end points, etc.
- SpaghettiCthulu 3y ago> Is the origin meaningful? I assume no. > What are the units Arbitrary. The website says pixels, but the demo lets you zoom in and out, so I think defining the unit as pixels is pretty meaningless, except as a hint to the viewer of the initial scale for the canvas. Even then I can see good reasons for a viewer program to just ignore that and use whatever initial scale allows everything to fit on screen. > how does this interact with font sizes? Seems like the font size can't be changed, but I'd imagine it's a specific number of units. > High-DPI displays? Not sure what kind of answer you're looking for here. You can just scale everything, so support for High-DPI displays would be up to the viewer program.
- gcr 3y agoI know this isn’t intended as a document presentation format, but for a consistent layout, it would be a good idea to specify the ratio between pixels (for layout) and font size (in pt). Otherwise, viewers would render text inconsistently-each node would be some ratio too big or too small for its contents.
- gitgud 3y ago
- curtisblaine 3y agoWhat I would expect from an infinite canvas app would be a streamable data structure, that can be rendere on demand on a "virtual" canvas - let's say you have a window from 0,0 to 100,100 - you can query the data structure to give you only the nodes in the viewport + the nodes connected to them.
- mywacaday 3y agoFYI only the spec canvas is black on chrome mobile with dark mode enabled.
- apitman 3y agoObsidian is one of the few closed-source applications I would consider relying on, due to their commitment to building around simple, open file formats. Sure, they could screw me over and start charging absurd amounts of money for their app, but high quality open source alternatives would pop up immediately. Meanwhile, as long as they don't screw me over, it's unlikely an open source alternative is going to be able to catch up to a profitable business that keeps their users happy. It's an interesting approach, focused on incentive alignment, which is the best way to ensure quality long term.
- desmondl 3y agoI completely agree. Even if they completely tank I can open my obsidian directory in a text editor or command line and still use it. I would still have access to features that are common in other apps like full text search or plain file sync. Attachments are just files in the filesystem that can be opened in any image viewer. Basically if i can’t use obsidian anymore i can still use my notebook and take notes without implementing or finding new software
- chatmasta 3y agoI love Obsidian. I wish they would consider open sourcing the application. It doesn't even seem in conflict with their monetization plans, because they're already distributing the app for free, and making money with things like "Obsidian publish." They've got enough critical mass and a sufficiently thriving ecosystem of community plugins that they could only stand to benefit from open sourcing the core app. See Mattermost for an example of a similarly positioned product that is fully open source.
- dugite-code 3y agoThe big gap I would love to be solved is a, preferably selfhosted, browser based view into my notes. That way I could access my notes from computers you can't or won't install obsidian on. If it was open source that would be more likely to happen
- Brajeshwar 3y ago
- ivanjermakov 3y agoActual spec: https://jsoncanvas.org/spec/1.0/ https://jsoncanvas.org/spec/1.0/
- RyanHamilton 3y agoI would like to take this opportunity to implore everyone to not invent a new format. Avoid it at all costs. First try to follow an existing standard or say that you will support a subset. When you invent a new standard, you start small and say oh users just need to know this and look it's so simple. Then you find all the edge cases, add all the features and voila you have created a half baked implementation of an existing standard. Only if you can explicitly say many reasons why you haven't used standard X or Y create something new. To take this specific example, some of it feels very similar to HTML. label, links, sections, groups, anchors, background fill options...I would have been tempted to define as a subset of HTML that is supported. Then if I wanted JSON, say how JSON maps to HTML. voila suddenly everything is standardly named and creatable. This means backgroundStyle is replaced by background-size = cover or contain. It means that those six preset colors are replaced by all HTML standard colors. Voila no one needs to learn different concepts or definitions. Try that existing standard, try 2 more and only if they don't work invent a new one. Please. I say this as someone that inherited standards invented by teams that I then had to try and train hundreds of users on. Funnily enough the previous people left when the coding was done, without teaching the users. THey probably left to implement version 2 elsewhere. :)
- account-5 3y agoIn a similar vein I prefer Treesheets to this sort of thing. I like grids better.
- darkteflon 3y agoHow interesting. I was just this weekend looking to implement a DAG/multitree-based tasks app as a side project, and my first thought was to do it as an obsidian plugin with D3 for rendering. I ended up canning that idea because it felt like a bridge too far to cram nodes and links into a human-readable format like markdown. I went with SQLite and a TUI instead. Seeing this spec emerge makes me think that Obsidian might be a good place for that kind of plugin after all. It’s becoming something of an emacs, Obsidian is!
- darkest_ruby 3y agoIs that what nodered uses for its diagrams?
- cyanydeez 3y agoneed, but on mobile I want to double tap to zoom and fit content
- dorian-graph 3y agoI was hoping this would include infinite _nesting_!
- mcqueenjordan 3y agoExploring the concept of files > app deeper, it would be interesting if we were able to foster a culture of website apps writing to local storage with files (in a similar manner to Obsidian), and if we had a common format for doing so, with an open-source daemon that sync'd writes to and from that directory to e.g. some other folder. That would unlock ownership of data even in web apps. The daemon could be app-agnostic and just dutifully sync all the things.
- GuB-42 3y agoWhy make so many fields required? Node: only id, x, y would be necessary. This would allow for point nodes. We could even imagine letting go of x and y to signify that the position of the node is not fixed and could be recomputed in real time by the program. Even ids could be optional, why require them if they are not referenced? An added bonus of having point nodes is that you get freehand drawings for free: every stroke is a series of connected dots. Maybe it is an anti-feature though, depending on your vision.
- dleeftink 3y agoGood to see this moving ahead, but doesn't a well-defined graph format already exist in Argdown? [0] While its renderer uses auto layouting instead of user defined coordinates, the principle of using Markdown files instead of JSON seems more appealing to me considering the Obsidian/git workflow. Besides Argdown, Markdown itself provides some built-in features that can be utilised to construct graphs. Coordinates for instance, can be stored as HTML comments or link alt texts, e.g. `[node](# ("x:25,y:50"))`. Edge, shape types and other data could similarly be stored in alt text fields as serialised JSON or in separate blocks using link reference definitions. [1] One step further, Markdown lists could be used to store subtrees while cycles as Obsidian block links. This also allows you to encode ancestral, sibling and descendant relations: - [root](# ("x:25,y:50")) - leaf - [link](#^id) - another leaf^id You'd then be able to interleave prose and graph structures in a single file rather than dealing with two separate parsing structures. Even better, the end result would still be Markdown compliant. [0]: https://argdown.org/ https://argdown.org/ [1]: https://github.github.com/gfm/#link-reference-definition https://github.github.com/gfm/#link-reference-definition
- iJohnDoe 3y agoI’m confused by the comments. This seems really cool. Are there other solutions that take JSON and do the same thing just as easily?
- henrun12 3y agoI'd love to see this get adoption, I use a few different whiteboarding apps for the different features they offer, but would be great to have more portability between them. e.g. I find tldraw great for creating diagrams, but when I have to share them with people I end up screenshotting and pasting into figma
- hacker_88 3y agoNever Let Software kill your data. Excellent
- sigmonsays 3y agothis seems like vendor lock in and hardly solves anything complicated