FFLOW 0.3.0: everything is a flow; steps set any properties, symbol and hotkeys share them
This commit is contained in:
1 parent
68e390fb37
commit
8553b7c75a
12 files changed
+423
-335
No files matched your search
@@ -4,25 +4,36 @@ Set frontmatter properties from the editor with trigger symbols, the way `#` aut
|
||||
|
||||
Type `@mee`, pick `meeting`: the text `@mee` disappears and the note gets `type: meeting`.
|
||||
|
||||
## Triggers
|
||||
|
||||
Each trigger (Settings → FFLOW) has:
|
||||
|
||||
- **Symbol**: one character that is not a letter, digit or space. `# [ / :` are reserved (tags, links, slash commands, emoji). Default: `@`.
|
||||
- **Values from**: *Vault (open list)* lists every value already used for that property in the vault, ranked by use, and accepts new values. *Fixed list* only offers the values listed in the settings. *Flow: …* offers the steps of a flow (see below).
|
||||
- **Property** and **value mode** (open and fixed lists): the frontmatter key to write (default `type`); *Single value* replaces the value, *List* appends without duplicates.
|
||||
|
||||
A trigger fires only at the start of a word (line start or after a space), and never inside frontmatter or code.
|
||||
|
||||
## Flows
|
||||
|
||||
A flow is an ordered list of values for one property, e.g. `status`: `todo` → `started` → `in-progress` → `done`.
|
||||
Everything is a flow (Settings → FFLOW). A flow has:
|
||||
|
||||
- Each flow adds two commands, **FFLOW: <name>: next step** and **previous step**. Assign hotkeys in Settings → Hotkeys (the *Hotkeys* button opens it filtered on FFLOW).
|
||||
- A note without a value, or with a value outside the flow, enters at the first step. At the ends, the move stops unless **Loop** is on.
|
||||
- Each step can list cssclasses (space-separated). Moving to a step removes the classes of the flow's other steps from `cssclasses` and adds its own; other classes are kept.
|
||||
- A trigger whose values come from a flow applies the same cssclasses, so `!done` and the hotkey give the same result.
|
||||
- cssclasses change only through FFLOW (hotkeys or triggers), not when the property is edited by hand.
|
||||
- **Name**: labels its hotkey commands.
|
||||
- **Symbol** (optional): one character that is not a letter, digit or space. `# [ / :` are reserved (tags, links, slash commands, emoji). It fires only at the start of a word (line start or after a space), never inside frontmatter or code.
|
||||
- **Property**: the frontmatter key the flow sets.
|
||||
- **Kind**:
|
||||
- **Ordered list**: fixed steps, in order. Each step can also set other properties (**Also sets**). Gets **FFLOW: <name>: next step** / **previous step** commands for hotkeys; **Loop** wraps around at the ends.
|
||||
- **Open (vault)**: suggests every value already used for the property in the vault, ranked by use, and accepts new values. *Single value* replaces, *List* appends without duplicates. No steps, no hotkeys.
|
||||
|
||||
### Step effects
|
||||
|
||||
Example, flow `status`:
|
||||
|
||||
| Step | Also sets |
|
||||
|---|---|
|
||||
| todo | `cssclasses: st-todo` |
|
||||
| started | `cssclasses: st-started`, `priority: high` |
|
||||
| done | `cssclasses: st-done`, `archived: true` |
|
||||
|
||||
Picking a step, by symbol or by hotkey:
|
||||
|
||||
1. sets the flow's property;
|
||||
2. undoes the other steps' effects: their items are removed from list properties, and scalar properties are removed only if they still hold the value the flow wrote (a value you edited by hand is kept);
|
||||
3. applies the step's effects.
|
||||
|
||||
List properties (`cssclasses`, `tags`, `aliases`, any property Obsidian types as a list, or one that already holds a list) take comma-separated items and are merged with what's there. Other properties are replaced; `true`/`false` and plain numbers are written typed.
|
||||
|
||||
A note without a value, or with a value outside the flow, enters at the first step. Properties change only through FFLOW, not when edited by hand.
|
||||
|
||||
## Development
|
||||
|
||||
@@ -33,4 +44,6 @@ npm run build
|
||||
|
||||
Copy `main.js`, `manifest.json` and `styles.css` to `<vault>/.obsidian/plugins/fflow/`.
|
||||
|
||||
Settings from 0.1–0.2 (separate triggers and flows) are converted to flows on first load.
|
||||
|
||||
See [ROADMAP.md](ROADMAP.md) for planned features.
|
||||
Reference in new issue
Block a user