jhrcek / graph-editor

Simple editor for creating graphs implemented purely in Elm.
http://janhrcek.cz/graph-editor/
35 stars 4 forks source link

Some ideas #5

Closed thdoan closed 6 months ago

thdoan commented 6 months ago

This is not an issue -- I just have a few things fresh on my mind after stumbling onto your excellent work...

This project has a lot of potential. If I were to create a mindmapping app in Elm, this could come in very handy! The design would go something like this:

  1. Click anywhere on the canvas to create a note (node).
  2. Click anywhere inside a note to create a child note (in theory you can nest as much as memory allows).
  3. You can zoom in and out using mouse or keyboard (useful if a note contains a ton of child notes).
  4. You can search for notes.
    1. Search results are rendered as a list of links showing the full node path to the note.
    2. When you click on a search result link, you go directly to the note with the optimal zoom level applied.
  5. You can filter notes, which is similar to search except that instead of showing a list of results, you remain in the graph view with only the matching notes visible, and the optimal zoom applied such that all notes are in view.
  6. Notes are resizable.
  7. A note can have two modes: Edit and View.
    1. Edit mode: write notes in Markdown format.
    2. View mode: Markdown rendered as HTML.
  8. Notes can have relationships.
    1. You can link to other notes with autocomplete using [[ syntax similar to Obsidian.
    2. Connectors are automatically generated for backlinks.
    3. If you manually connect two notes, it also generates a backlink.
    4. Backlinks are visible in a panel like Obsidian.
  9. Each note is stored as a plain text file with metadata containing such things as backlinks at the top in frontmatter format.
  10. Syncing notes would be trivial since, like Obsidian, you can use whatever service you already use (e.g., Dropbox, Google Drive) as the notes are plain text files.
  11. Both the canvas and notes are themeable (light, dark, custom).

I literally just thought of everything I wrote above, so I'm sure new ideas will come in time. Thanks for the jolt of inspiration 🌟

jhrcek commented 6 months ago

Hello @thdoan thanks for the ideas! Currently I don't have a plan to develop this project any further. It was just playing around to see what is it like to develop this kind of drag and drop interface in elm. There are far more polished and full-featured graph drawing applications implemented in elm. If you're interested in something like this I recommend you also check out https://github.com/erkal/kite

thdoan commented 6 months ago

Oh wow, that's awesome! I'm new to Elm, so everything is a new discovery coming from imperative world ^^.