zhoumin79 / humble-outliner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Humble Outliner

This is a demo project implementing an outliner view inspired by Logseq using HumbleUI.
It is based on the humble-starter template.
The focus of the demo is on the UI, it is not indented for use as it does not store data permanently.

outliner-demo.mp4

Features

  • up/down go up/down
  • enter new item
  • backspace join items
  • tab indent
  • shift+tab outdent
  • alt+shift+up/down move item up/down
  • switch between light and dark theme

Not Implemented

Features they might be interesting to implement as an exercise in the future:

  • block-wise selection
  • collapse/expand
  • zoom in/out
  • undo/redo
  • copy/paste
  • dragging
  • text wrapping
  • rich text formatting

Demo

Run the app with:

script/run.sh

Building executable with GraalVM native-image

Make sure to have GRAALVM_HOME env variable pointing to your GraalVM installation, e.g.:

export GRAALVM_HOME="$HOME/Downloads/graalvm-jdk-21.0.1+12.1"

Compile with:

clj -T:build native

Run the executable:

target/outliner

See humble-graal for more details.

Development

Run the app including nREPL server:

script/nrepl.sh

Run tests with:

clj -M:test

Run tests with alternative reporter:

clj -M:test --reporter kaocha.report/documentation

Run tests in watch mode:

clj -M:test --watch

Generate code coverage report:

clj -M:test:coverage

Reloading

To reload the app and see your changes reflected, you can:

  1. Evaluate individual forms via the REPL, reset the state/*app atom, and then call state/redraw!
  2. Make changes to the files, save them, then call reload from the user ns, which will use clojure.tools.namespace to detect which ns' should be refreshed, evaluate them, and then call state/redraw!.

License

Licensed under MIT.
Copyright Jakub Dundalek 2023.
Parts of the code Copyright Will Acton 2022.

About

License:MIT License


Languages

Language:Clojure 99.6%Language:Shell 0.4%