Skip to content

Commit

Permalink
Merge branch '69-init-flows-on-new-files-in-function-of-folder'
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGB committed Jun 17, 2024
2 parents 01bfc64 + 01079e3 commit c3a02ee
Show file tree
Hide file tree
Showing 27 changed files with 2,207 additions and 3,342 deletions.
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run commitlint ${1}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint
1 change: 1 addition & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { extends: ['@commitlint/config-conventional'] };
88 changes: 88 additions & 0 deletions docs/folder-flows/FolderFlowsIntro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# ZettelFlow Plugin Documentation

## Introduction to Folder-Level Automated Flows

### Overview

The ZettelFlow plugin supports a powerful feature: **Folder-Level Automated Flows**. This feature allows you to assign specific workflows to individual folders. Whenever a file is created in one of these configured folders, an automatic modal will trigger, guiding you through the workflow you have set up for that folder.

### Key Benefits

- **Automation**: Streamline your note-taking process by automating repetitive tasks.
- **Consistency**: Ensure that all files created in a specific folder follow the same process, enhancing organization and standardization.
- **Ease of Use**: Activate workflows without needing to manually trigger them, improving efficiency and user experience.

### How It Works

1. **Assigning a Workflow to a Folder**:
- Right-click on the folder you want to assign a workflow to.
- Select the option to configure the workflow for that folder.
- This action will create a canvas file in a configurable path (default: `_ZettelFlow`).
- The filename will be the path of the folder with slashes (`/`) replaced by underscores (`_`).

2. **Configuration File**:
- The created canvas file will store the workflow configuration for the folder.
- You can adjust the configuration by editing this canvas file as needed.

3. **Automatic Modal Activation**:
- Whenever a new file is created in a folder that has an assigned configuration, the associated workflow modal will automatically appear.
- This ensures that every file created in this folder follows the specified workflow, regardless of the creation method (e.g., directly in Obsidian, through a synced service, etc.).

### Example Use Case

Consider you have a folder named `Profiles`. You can configure a workflow for this folder to collect essential information such as email, team, and name whenever a new profile document is created.

#### Steps to Configure:

1. **Open ZettelFlow Settings**:
- Go to the ZettelFlow plugin settings in Obsidian.

2. **Assign Workflow**:
- Select the `Profiles` folder.
- Assign the desired workflow (e.g., Profile Creation Workflow).

3. **Create a File**:
- Create a new file in the `Profiles` folder.
- Watch as the Profile Creation Workflow modal appears, prompting you to fill out the necessary details like email, team, and name.

### Example Use Case

Consider you have a folder named `Profiles`. You can configure a workflow for this folder to collect essential information such as email, team, and name whenever a new profile document is created.

#### Steps to Configure:

1. **Open ZettelFlow Settings**:
- Go to the ZettelFlow plugin settings in Obsidian.

2. **Assign Workflow**:
- Right-click on the `Profiles` folder.
- Select the configuration option to assign the Profile Creation Workflow.
- This will create a file named `_ZettelFlow/Profiles.canvas`.

3. **Create a File**:
- Create a new file in the `Profiles` folder.
- Watch as the Profile Creation Workflow modal appears, prompting you to fill out the necessary details like email, team, and name.

### Configuration Details

To set up Folder-Level Automated Flows, follow these detailed steps:

1. **Access Plugin Settings**:
- Go to `Settings` > `Community Plugins` > `ZettelFlow`.

2. **Select Folder**:
- Right-click on the folder you want to configure and choose the option to configure the workflow.

3. **Assign Workflow**:
- The system will create a configuration file in the default path (`_ZettelFlow`) with the folder's path name.
- Adjust the workflow configuration in this file as needed.

4. **Save Settings**:
- Ensure you save your settings to apply the changes.

### Troubleshooting

- **Modal Not Appearing**: Ensure that the folder is correctly configured in the ZettelFlow settings and the configuration file exists in the `_ZettelFlow` directory (or the custom path you have set).
- **Workflow Not Triggering**: Check if the workflow is active and correctly assigned to the folder by reviewing the canvas file.

> If the note was create with the Ribbon button inside one of the folders with a workflow, the modal will not appear. This is a expected behavior to avoid the modal to appear twice for the same note.
199 changes: 0 additions & 199 deletions jest.config.ts

This file was deleted.

2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "zettelflow",
"name": "ZettelFlow",
"version": "2.4.2",
"version": "2.5.0",
"minAppVersion": "1.4.11",
"description": "Helps you to create and manage your notes in a Zettelkasten way via Canvas.",
"author": "RafaelGB",
Expand Down
5 changes: 3 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ nav:
- 2.8 CssClasses: actions/CssClasses.md
- 2.9 TaskManagement: actions/TaskManagement.md
- 2.10 Script: actions/Script.md
- 3. How to Contribute:
- 3.1 Wiki: how-to-contribute/Wiki.md
- 3. Folder Automatic Flows: folder-flows/FolderFlowsIntro.md
- 4. How to Contribute:
- 4.1 Wiki: how-to-contribute/Wiki.md
extra_javascript:
- "extra_javascript/navigationInstant.js"
Loading

0 comments on commit c3a02ee

Please sign in to comment.