diff --git a/README.md b/README.md index 7f6ea8e..0e431f8 100644 --- a/README.md +++ b/README.md @@ -2,353 +2,91 @@ [![GitHub release](https://img.shields.io/github/v/release/devonthesofa/obsidian-note-status)](https://github.com/devonthesofa/obsidian-note-status/releases) [![Obsidian Downloads](https://img.shields.io/badge/dynamic/json?logo=obsidian&color=%23483699&label=downloads&query=%24%5B%22note-status%22%5D.downloads&url=https%3A%2F%2Fraw.githubusercontent.com%2Fobsidianmd%2Fobsidian-releases%2Fmaster%2Fcommunity-plugin-stats.json)](https://obsidian.md/plugins?id=note-status) [![GitHub License](https://img.shields.io/github/license/devonthesofa/obsidian-note-status)](https://github.com/devonthesofa/obsidian-note-status/blob/master/LICENSE) -Enhance your Obsidian workflow with a powerful status tracking system for your notes. Keep track of whether your notes are active, on hold, completed, or dropped - or create your own custom statuses. - -![Hello World Screenshot](images/hello-world.png) - -## Table of Contents - -- [Features](#features) -- [Installation](#installation) -- [User Guide](#user-guide) -- [Configuration](#configuration) -- [Performance Recommendations](#performance-recommendations) -- [Development](#development) -- [Roadmap](#roadmap) -- [Support](#support-the-development) +Track the status of your notes with a powerful, customizable status management system. Mark notes as active, completed, on hold, or create your own custom workflows. ## Features -- **Status Assignment**: Mark notes with statuses (active, on hold, completed, dropped) -- **Multiple Statuses**: Apply more than one status to a single note -- **File Explorer Integration**: View status icons directly in your file explorer -- **Status Bar**: Quick access status indicator in the editor -- **Dropdown Menu**: Easily change status from the editor toolbar -- **Status Pane**: Dedicated view that organizes notes by status -- **Batch Updates**: Apply statuses to multiple files at once -- **Custom Statuses**: Create your own statuses with icons and colors -- **Status Templates**: Choose from predefined templates or create your own -- **Highly Customizable**: Configure where and how statuses appear -- **Large Vault Support**: Optimized for performance with pagination and filtering options +- **๐Ÿ“‹ Status Assignment**: Mark notes with workflow statuses +- **๐ŸŽฏ Multi-Status Support**: Assign multiple statuses per note +- **๐Ÿ“ File Explorer Icons**: Visual indicators in the file tree +- **๐Ÿงญ Status Bar Integration**: View current status at a glance +- **โฌ‡๏ธ Toolbar Dropdown**: Change statuses quickly from the editor +- **๐Ÿ“Š Status Pane**: Dedicated view organizing notes by status +- **โšก Batch Operations**: Update multiple files simultaneously +- **๐ŸŽจ Custom Statuses**: Define your own statuses +- **๐Ÿงฉ Templates Library**: Use built-in templates +- **๐Ÿ”ง Full Customization**: Control how and where statuses appear +- **๐Ÿš€ Performance**: Optimized for large vaults (40k+ notes tested) + ![Hello World Screenshot](images/hello-world.png) -## Installation +## Quick Start -### Marketplace Installation (Recommended) +### Install -1. Open Obsidian โ†’ Settings โ†’ Community plugins -2. Disable Safe mode -3. Click "Browse" and search for "Note Status" -4. Click Install and Enable +1. **Obsidian โ†’ Settings โ†’ Community plugins** +2. **Search "Note Status" โ†’ Install โ†’ Enable** -### Manual Installation - -1. **Download the Plugin**: - - Grab the latest release from the [GitHub Releases page](https://github.com/devonthesofa/obsidian-note-status/releases). - - Download the files `main.js`, `styles.css` and `manifest.json` -2. **Install in Obsidian**: - - Open your Obsidian vault and navigate to `.obsidian/plugins/`. - - Create a folder named `obsidian-note-status` into this directory. - - Copy the downloaded files in the `obsidian-note-status` folder. -3. **Enable the Plugin**: - - In Obsidian, go to Settings > Community Plugins. - - Ensure "Safe Mode" is turned off. - - Find "Note Status" in the list and toggle it on. - -## User Guide - -### Basic Usage - -#### 1. Assign Status from the Toolbar - -The simplest way to set a note's status is using the toolbar button: - -![Status From Toolbar](images/status-from-toolbar.png) +### First Use 1. Open any note -2. Click the status icon in the toolbar (looks like a "?" by default) -3. Select a status from the dropdown -4. The status will be applied and visible in both toolbar and status bar +2. Click the `โ“` icon in toolbar +3. Select a status (e.g., "active") +4. Status appears in status bar and file explorer -#### 2. Status Bar +## Example Workflows -The status bar at the bottom of your editor shows the current status of your note: +### Personal Knowledge Management -![Status Bar](images/status-bar.png) +``` +๐Ÿ’ก idea โ†’ ๐Ÿ“ draft โ†’ โœ๏ธ editing โ†’ โœ… completed โ†’ ๐Ÿ“ฆ archived +``` -- When multiple statuses are enabled, all applied statuses will be displayed here +### Project Management -#### 3. Status Pane +``` +๐Ÿ“‹ backlog โ†’ ๐Ÿšฆ ready โ†’ ๐Ÿ‘จโ€๐Ÿ’ป inDevelopment โ†’ ๐Ÿงช testing โ†’ ๐Ÿš€ live +``` -The Status Pane provides an overview of all your notes grouped by status: +### Academic Research -![Status Pane](images/status-pane.png) +``` +๐Ÿ” research โ†’ ๐Ÿ“‘ outline โ†’ โœ๏ธ draft โ†’ ๐Ÿ”ฌ review โ†’ ๐Ÿ“š final +``` -To open the Status Pane: +## Documentation -- Click the status pane icon in the left sidebar -- Use the command palette: "Open status pane" - In the Status Pane you can: -- View all notes grouped by status -- Click on any note to open it -- Search for specific notes -- Toggle between compact and standard views -- Right-click on notes for more options +### For Users -#### 4. File Explorer Integration +- **[๐Ÿ“š Quick Start Guide](https://github.com/devonthesofa/obsidian-note-status/wiki/๐Ÿ“š-Quick-Start-Guide)** - Get running in 5 minutes +- **[๐Ÿ“– User Manual](https://github.com/devonthesofa/obsidian-note-status/wiki/๐Ÿ“–-User-Manual)** - Complete feature documentation +- **[โš™๏ธ Configuration Guide](https://github.com/devonthesofa/obsidian-note-status/wiki/โš™%EF%B8%8F-Configuration-Guide)** - Settings and customization +- **[๐Ÿš€ Performance Tuning](https://github.com/devonthesofa/obsidian-note-status/wiki/๐Ÿš€-Performance-Tuning)** - Optimize for large vaults -Status icons appear directly in your file explorer: +### For Developers -![File Explorer](images/file-explorer.png) +- **[๐Ÿ—๏ธ Architecture Overview](https://github.com/devonthesofa/obsidian-note-status/wiki/%F0%9F%8F%97%EF%B8%8F-Architecture-Overview)** - Plugin structure and design +- **[๐Ÿ”ง Development Setup](https://github.com/devonthesofa/obsidian-note-status/wiki/%F0%9F%94%A7-Development-Setup)** - Contributing guide -- Right-click on any file to change its status -- Select multiple files to batch update their statuses +### Reference -### Advanced Usage +- **[๐Ÿ“ Frontmatter Format](https://github.com/devonthesofa/obsidian-note-status/wiki/%F0%9F%93%9D-Frontmatter-Format)** - Technical specification -#### Multiple Statuses +## Data Format -When enabled in settings, you can assign multiple statuses to a single note: - -![Multiple Statuses Selector](images/multiple-statuses-selector.png) - -![Multiple Statuses File Explorer](images/multiple-statuses-file-explorer.png) - -![Multiple Statuses Status Bar](images/multiple-statuses-status-bar.png) - -To add additional statuses: - -1. Open the status dropdown -2. Click on another status to add it -3. Click on an active status to remove it - -#### Batch Updates - -To update multiple files at once: - -1. Select multiple files in the file explorer (using Ctrl/Cmd or Shift) -2. Right-click and choose "Change status" -3. Select whether to replace or add the status -4. Choose the status to apply - -![Batch Updates](images/batch-updates.png) - -#### Large Vault Performance - -If you have a large vault with thousands of notes, use these features for better performance: - -1. Enable "Exclude unassigned notes from status pane" in settings -2. Use the search function to filter notes ![Show Unassigned Notes](images/show-unassigned-notes.png) -3. Use pagination controls to navigate through large status groups ![Pagination](images/pagination.png) - -## Configuration - -### Status Management - -Access plugin settings via Settings โ†’ Note Status - -#### Status Templates - -Choose from predefined status templates: - -- **Colorful workflow**: A colorful set of workflow statuses with descriptive icons -- **Minimal workflow**: A simplified set of essential workflow statuses -- **Academic research**: Status workflow for academic research and writing -- **Project management**: Status workflow for project management and tracking - -![Status Templates](images/status-templates.png) - -#### Custom Statuses - -Create your own statuses by: - -1. Clicking "Add Status" in settings -2. Setting a name, icon, color, and optional description -3. Saving your settings - -![Custom Statuses](images/custom-statuses.png) - -### Display Options - -Configure how statuses are displayed: - -- Show/hide status bar -- Auto-hide status bar when status is unknown -- Show/hide status icons in file explorer -- Hide unknown status in file explorer -- **Exclude unassigned notes from status pane** (recommended for large vaults) -- Toggle compact view in status pane -- Enable/disable multiple statuses mode -- Customize frontmatter tag name - -## Performance Recommendations - -If you have a large vault (1000+ notes), consider these settings for optimal performance: - -1. Enable "Exclude unassigned notes from status pane" -2. Enable "Hide unknown status in file explorer" -3. Use specific searches rather than browsing all notes -4. Consider using "Compact view" in the status pane - -## Commands - -The plugin provides several commands accessible via the Command Palette: - -- `Open status pane` - Opens the status view -- `Refresh status` - Refreshes current note's status -- `Add status to current note` - Shows status menu -- `Insert status metadata` - Adds status frontmatter -- `Force refresh user interface` - Complete UI refresh - -## Technical Details - -### Frontmatter Format - -Status information is stored in your note's frontmatter using the following format: +Statuses are stored in note frontmatter: ```yaml --- -obsidian-note-status: ["active"] +obsidian-note-status: + - HelloWorld + - draft --- +# Your note content ``` -Multiple statuses: - -```yaml ---- -obsidian-note-status: ["active", "inProgress"] ---- -``` - -The frontmatter tag name can be customized in settings. - -## Development - -### Project Structure - -The plugin has been recently restructured with a modern, modular architecture: - -``` -note-status/ -โ”œโ”€โ”€ src/ -โ”‚ โ”œโ”€โ”€ main.ts # Main plugin entry point -โ”‚ โ”œโ”€โ”€ constants/ # Constants and defaults -โ”‚ โ”‚ โ”œโ”€โ”€ icons.ts # SVG icon definitions -โ”‚ โ”‚ โ”œโ”€โ”€ defaults.ts # Default settings and colors -โ”‚ โ”‚ โ””โ”€โ”€ status-templates.ts # Predefined status templates -โ”‚ โ”œโ”€โ”€ models/ # TypeScript interfaces and types -โ”‚ โ”‚ โ””โ”€โ”€ types.ts # Core type definitions -โ”‚ โ”œโ”€โ”€ ui/ # UI components -โ”‚ โ”‚ โ”œโ”€โ”€ components/ # Core UI components -โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ status-pane-view.ts # Status pane sidebar -โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ status-dropdown.ts # Dropdown management -โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ status-dropdown-component.ts # Dropdown UI component -โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ status-bar.ts # Status bar component -โ”‚ โ”‚ โ”œโ”€โ”€ integrations/ # External integrations -โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ explorer-integration.ts # File explorer integration -โ”‚ โ”‚ โ””โ”€โ”€ menus/ # Menu handlers -โ”‚ โ”‚ โ””โ”€โ”€ status-context-menu.ts # Context menu handlers -โ”‚ โ”œโ”€โ”€ services/ # Core services -โ”‚ โ”‚ โ”œโ”€โ”€ status-service.ts # Status management logic -โ”‚ โ”‚ โ””โ”€โ”€ style-service.ts # Dynamic styling service -โ”‚ โ”œโ”€โ”€ utils/ # Utility functions -โ”‚ โ”‚ โ””โ”€โ”€ file-utils.ts # File-related helpers -โ”‚ โ””โ”€โ”€ settings/ # Settings UI -โ”‚ โ””โ”€โ”€ settings-tab.ts # Settings tab definition -โ”œโ”€โ”€ styles/ # Modular CSS files -โ”‚ โ”œโ”€โ”€ base.css # Variables and base styles -โ”‚ โ”œโ”€โ”€ utils.css # Utility classes -โ”‚ โ”œโ”€โ”€ components/ # Component-specific styles -โ”‚ โ”‚ โ”œโ”€โ”€ status-bar.css # Status bar styles -โ”‚ โ”‚ โ”œโ”€โ”€ status-pane.css # Status pane styles -โ”‚ โ”‚ โ”œโ”€โ”€ dropdown.css # Dropdown component styles -โ”‚ โ”‚ โ”œโ”€โ”€ explorer.css # File explorer styles -โ”‚ โ”‚ โ””โ”€โ”€ settings.css # Settings UI styles -โ”‚ โ””โ”€โ”€ index.css # Main CSS import file -โ””โ”€โ”€ styles.css # Auto-generated final CSS -``` - -### Prerequisites - -- Node.js and npm installed. -- Obsidian API knowledge (TypeScript-based). - -### CSS Modularization - -The plugin's CSS has been modularized to improve maintainability: - -- **Component-based**: Each UI component has its own CSS file -- **Auto-bundling**: The build process automatically bundles all CSS files into `styles.css` -- **Development workflow**: CSS changes are hot-reloaded during development - -When making CSS changes: - -1. Modify the appropriate file in the `styles/` directory -2. For new components, create a dedicated CSS file and import it in `styles/index.css` -3. The build process will automatically bundle everything into `styles.css` - -### Building the Plugin - -1. Clone this repository: - -```bash -git clone https://github.com/devonthesofa/obsidian-note-status.git -cd obsidian-note-status -``` - -2. Install dependencies: - -```bash -npm install -``` - -3. Build the plugin: - -```bash -npm run build -``` - -4. For development with auto-rebuilding: - -```bash -npm run dev -``` - -5. The compiled plugin will be in the root directory, ready to copy into `.obsidian/plugins/`. - ## Contributing -Contributions welcome! Please feel free to submit a Pull Request. - -1. Fork the repository -2. Create your feature branch: `git checkout -b feature/my-new-feature` -3. Commit your changes: `git commit -am 'Add some feature'` -4. Push to the branch: `git push origin feature/my-new-feature` -5. Submit a pull request - -- Report issues or suggest features via the Issues tab. - -## Roadmap - -The following features and improvements are planned for upcoming releases: - -### Short-term - -- **Batch Modification Enhancement**: Implement a modal dialog with file preview and status selection for more intuitive batch operations -- **Dropdown Refinement**: Restructure status options to be grouped by categories (workflow, templates, custom) with visual separators -- **Obsidian API Compliance**: Refactor code to follow Obsidian guidelines for better performance and compatibility: - - Use proper event lifecycle management - - Implement debounced operations for file operations - - Improve plugin teardown process to prevent memory leaks - -### Medium-term - -- **Export/import configurations**: Share your status setups with others - -### Long-term - -- **Canvas integration**: Show status on canvas cards -- **Graph view integration**: Visualize notes by status in graph view -- **Mobile optimization**: Improved experience on mobile devices +Contributions welcome! See [๐Ÿ”ง-Development-Setup](https://github.com/devonthesofa/obsidian-note-status/wiki/๐Ÿ”ง-Development-Setup) for details. ## Support the Development diff --git a/wiki/Architecture Overview.md b/wiki/Architecture Overview.md new file mode 100644 index 0000000..5fcbfb8 --- /dev/null +++ b/wiki/Architecture Overview.md @@ -0,0 +1,76 @@ +Technical documentation for developers working with the Note Status plugin. + +## High-Level Architecture + +### Plugin Structure + +``` +note-status/ +โ”œโ”€โ”€ main.ts # Plugin entry point and orchestration +โ”œโ”€โ”€ constants/ # Static configuration and defaults +โ”œโ”€โ”€ models/ # TypeScript interfaces and types +โ”œโ”€โ”€ services/ # Core business logic services +โ”œโ”€โ”€ components/ # Reusable UI components +โ”œโ”€โ”€ integrations/ # External system integrations +โ”œโ”€โ”€ views/ # Complex UI views and controllers +โ””โ”€โ”€ styles/ # Modular CSS architecture +``` + +## Core Services + +### Status Change Flow + +1. **User Interaction** โ†’ Component captures intent +2. **Component** โ†’ Calls StatusService.handleStatusChange() +3. **StatusService** โ†’ Updates file frontmatter +4. **StatusService** โ†’ Dispatches status-changed event +5. **All Components** โ†’ Update their displays + +## CSS Architecture + +### Modular CSS Structure + +``` +styles/ +โ”œโ”€โ”€ index.css # Main import file +โ”œโ”€โ”€ base.css # Variables and base styles +โ”œโ”€โ”€ utils.css # Utility classes +โ””โ”€โ”€ components/ # Component-specific styles + โ”œโ”€โ”€ status-bar.css + โ”œโ”€โ”€ status-pane.css + โ”œโ”€โ”€ dropdown.css + โ”œโ”€โ”€ explorer.css + โ””โ”€โ”€ settings.css +``` + +### CSS Variable System + +```css +:root { + --status-transition-time: 0.22s; + --status-border-radius: var(--radius-s, 4px); + --status-box-shadow: var(--shadow-s, 0 2px 8px rgba(0, 0, 0, 0.15)); + --status-hover-shadow: var(--shadow-m, 0 4px 12px rgba(0, 0, 0, 0.2)); + --status-icon-size: 16px; +} +``` + +### Build Process + +**Development**: CSS files watched and bundled automatically +**Production**: Minified and optimized CSS output +**Hot Reload**: CSS changes reflected immediately in development + +## Security Considerations + +### Data Validation + +- Frontmatter parsing with error handling +- Status name validation (prevent injection) +- File path sanitization + +### Privacy + +- All data stored locally in vault +- No telemetry or external communication +- User content never transmitted diff --git a/wiki/Configuration Guide.md b/wiki/Configuration Guide.md new file mode 100644 index 0000000..0c2b115 --- /dev/null +++ b/wiki/Configuration Guide.md @@ -0,0 +1,325 @@ +# Configuration Guide + +Complete guide to customizing the Note Status plugin. + +## Settings Overview + +Access via Settings โ†’ Note Status + +### Status Templates + +Controls which predefined status sets are available. + +#### Template Selection + +``` +โ˜ Colorful workflow (9 statuses with full lifecycle) +โ˜ Minimal workflow (4 essential statuses) +โ˜ Academic research (7 research-focused statuses) +โ˜ Project management (8 development statuses) +``` + +**Impact**: Enabled templates add their statuses to dropdown. + +#### Template Details + +**Colorful Workflow** - Complete content lifecycle: + +``` +๐Ÿ’ก idea (#FFEB3B) - Initial concepts and brainstorming +๐Ÿ“ draft (#E0E0E0) - First draft creation +๐Ÿ”ง inProgress (#FFC107) - Active development work +๐Ÿ–Š๏ธ editing (#2196F3) - Review and editing phase +โณ pending (#9C27B0) - Waiting for external input +โธ onHold (#9E9E9E) - Temporarily paused +๐Ÿ”„ needsUpdate (#FF5722) - Requires updates/revision +โœ… completed (#4CAF50) - Finished and ready +๐Ÿ“ฆ archived (#795548) - Long-term storage +``` + +**Minimal Workflow** - Essential only: + +``` +๐Ÿ“Œ todo (#F44336) - Needs attention +โš™๏ธ inProgress (#2196F3) - Currently working +๐Ÿ‘€ review (#9C27B0) - Needs review +โœ“ done (#4CAF50) - Completed +``` + +**Academic Research** - Research-focused: + +``` +๐Ÿ” research (#2196F3) - Information gathering +๐Ÿ“‘ outline (#9E9E9E) - Structure planning +โœ๏ธ draft (#FFC107) - Writing phase +๐Ÿ”ฌ review (#9C27B0) - Peer review stage +๐Ÿ“ revision (#FF5722) - Revisions needed +๐Ÿ“š final (#4CAF50) - Final version +๐ŸŽ“ published (#795548) - Published work +``` + +**Project Management** - Development workflow: + +``` +๐Ÿ—“๏ธ planning (#9E9E9E) - Planning phase +๐Ÿ“‹ backlog (#E0E0E0) - Backlog items +๐Ÿšฆ ready (#8BC34A) - Ready to start +๐Ÿ‘จโ€๐Ÿ’ป inDevelopment (#2196F3) - Development phase +๐Ÿงช testing (#9C27B0) - Testing phase +๐Ÿ‘๏ธ review (#FFC107) - Code review +๐Ÿ‘ approved (#4CAF50) - Approved +๐Ÿš€ live (#3F51B5) - Production/live +``` + +![File Explorer Screenshot](images/status-templates.png) + +### User Interface Settings + +#### Status Bar Configuration + +``` +โœ… Show status bar + Shows "Status: active" at bottom of editor + +โ˜ Auto-hide status bar + Hides when status is "unknown" + Useful for clean interface when no status assigned +``` + +#### File Explorer Integration + +``` +โœ… Show status icons in file explorer + Displays status icons next to filenames + +โ˜ Hide unknown status in file explorer + Improves visual clarity by hiding โ“ icons + Recommended for large vaults +``` + +#### Status Pane Options + +``` +โ˜ Default to compact view + Starts status pane in dense layout mode + +โœ… Exclude unassigned notes from status pane + Skips files with "unknown" status + CRITICAL for performance with large vaults (>5000 notes) +``` + +### Status Behavior + +#### Multiple Status Support + +``` +โœ… Enable multiple statuses + Allows notes to have multiple simultaneous statuses + Changes dropdown behavior from replace to toggle +``` + +**When Enabled**: + +- Clicking status toggles it on/off +- Notes can have combinations like ("active", "inProgress",....) +- Status bar shows all assigned statuses + **When Disabled**: +- Clicking status replaces current status +- Notes have single status only +- Simpler workflow for basic usage + +#### Status Tag Configuration + +``` +Status tag prefix: "obsidian-note-status" +``` + +**Purpose**: YAML frontmatter key for storing statuses **Default**: `obsidian-note-status` **Custom example**: `project-status`, `task-state` + +**Frontmatter examples**: + +```yaml +# Default +--- +obsidian-note-status: + - active +--- +# Custom prefix +--- +project-status: + - inProgress + - testing +--- +``` + +#### Strict Status Validation + +``` +โ˜ Strict status validation + Only allows statuses defined in templates/custom + โš ๏ธ WARNING: Removes unknown statuses when editing +``` + +**Impact when enabled**: + +- Dropdown only shows defined statuses +- Unknown statuses automatically removed during edits +- Ensures consistency but may lose data + +**Use cases**: + +- Team environments with standardized workflows +- Clean data requirements +- Migration from other systems + +### Custom Status Management + +#### Creating Custom Statuses + +1. **Navigate to Custom Statuses section** +2. **Click "Add Status"** +3. **Configure fields**: + +``` +Name: [unique identifier] +Icon: [emoji or symbol] +Color: [CSS color value] +Description: [optional tooltip text] +``` + +#### Field Specifications + +**Name Field**: + +- Must be unique across all statuses +- Case-sensitive +- No spaces +- Used in frontmatter and commands + +**Icon Field**: + +- Emoji recommended: ๐Ÿ”ฅ, โญ, ๐ŸŽฏ +- Unicode symbols: โ—†, โ–ฒ, โ— +- Text symbols: !, ?, + +- Fallback: โ“ if empty + +**Color Field**: + +- Hex format: `#FF5722` +- CSS variables: `var(--text-success)` +- Named colors: `red`, `blue` +- RGB/HSL: `rgb(255, 87, 34)` + +**Description Field**: + +- Optional tooltip text +- Shows on hover in dropdowns +- Useful for team workflows +- Example: "Waiting for client feedback" + +#### Custom Status Examples + +**Personal Workflow**: + +``` +urgent ๐Ÿ”ฅ #FF0000 "Requires immediate attention" +someday ๐Ÿ’ญ #9E9E9E "Future consideration" +waiting โฐ #FFC107 "Waiting for external input" +delegated ๐Ÿ‘ฅ #2196F3 "Assigned to someone else" +``` + +**Content Creation**: + +``` +brainstorm ๐Ÿ’ก #FFEB3B "Initial idea development" +research ๐Ÿ” #9C27B0 "Gathering information" +outline ๐Ÿ“‹ #E0E0E0 "Structuring content" +writing โœ๏ธ #2196F3 "Active writing phase" +editing โœ๏ธ #FF9800 "Revision and editing" +published ๐ŸŒŸ #4CAF50 "Live and published" +``` + +#### Custom-Only Mode + +``` +โ˜ Use only custom statuses + Ignores all template statuses + Uses only custom-defined statuses +``` + +**Use cases**: + +- Highly specialized workflows +- Team standardization +- Legacy system migration + +### Quick Status Commands + +Configure which statuses get dedicated commands in Command Palette. + +#### Command Generation + +For each enabled status, creates: + +- `Set status to [status]` - Direct assignment +- `Toggle status [status]` - Toggle on/off (if multiple statuses enabled) + +#### Recommended Quick Commands + +``` +โœ… active - Most common work status +โœ… completed - Frequently used completion +โœ… onHold - Common pause state +โ˜ todo - Redundant with "active" +โ˜ archived - Infrequent use +``` + +#### Hotkey Assignment + +1. **Settings โ†’ Hotkeys** +2. **Search "note-status"** +3. **Assign keys to quick commands** + +**Suggested hotkeys**: + +``` +Ctrl+Shift+A โ†’ Set status to active +Ctrl+Shift+D โ†’ Set status to completed +Ctrl+Shift+H โ†’ Set status to onHold +Ctrl+Shift+S โ†’ Change status of current note +``` + +## Advanced Configuration + +### Performance Tuning + +#### Large Vault Settings (5000+ notes) + +``` +โœ… Exclude unassigned notes from status pane +โœ… Hide unknown status in file explorer +Items per page: 50 (reduce from default 100) +``` + +#### Memory Optimization + +``` +โ˜ Show status icons in file explorer (disable if slow) +โ˜ Auto-hide status bar (reduce DOM updates) +``` + +### Import/Export Configuration + +WIP + +#### Export Settings + +WIP + +#### Import Process + +WIP + +#### Migration Between Vaults + +WIP diff --git a/wiki/Development Setup.md b/wiki/Development Setup.md new file mode 100644 index 0000000..1d53360 --- /dev/null +++ b/wiki/Development Setup.md @@ -0,0 +1,150 @@ +# Development Setup + +Get the plugin running locally for development. + +## Prerequisites + +- Node.js 16+ +- npm or yarn +- Git +- Obsidian installed + +## Quick Start + +```bash +# Clone and setup +git clone https://github.com/devonthesofa/obsidian-note-status.git +cd obsidian-note-status +npm install + +# Development mode (hot reload) +npm run dev + +# Build for production +npm run build +``` + +## Development Workflow + +### 1. Link to Test Vault + +```bash +# Symlink to your test vault +ln -s /path/to/obsidian-note-status /path/to/vault/.obsidian/plugins/note-status + +# Windows +mklink /D "C:\Vault\.obsidian\plugins\note-status" "C:\Dev\obsidian-note-status" +``` + +### 2. Enable Plugin + +1. Open Obsidian +2. Settings โ†’ Community plugins โ†’ Disable Safe Mode +3. Enable "Note Status" + +### 3. Hot Reload + +Development mode watches for changes: + +- TypeScript changes โ†’ Auto rebuild +- CSS changes โ†’ Instant update +- Full reload: Ctrl+R in Obsidian + +## Common Development Tasks + +### Add New Status Template + +```typescript +// constants/status-templates.ts +export const PREDEFINED_TEMPLATES: StatusTemplate[] = [ + { + id: "new-workflow", + name: "New Workflow", + description: "Description", + statuses: [{ name: "status1", icon: "๐Ÿ”ฅ", color: "#FF0000" }], + }, +]; +``` + +### Add New Command + +```typescript +// integrations/commands/command-integration.ts +this.plugin.addCommand({ + id: "new-command", + name: "New Command", + callback: () => { + // Implementation + }, +}); +``` + +### Add New Setting + +```typescript +// 1. Update interface in models/types.ts +export interface NoteStatusSettings { + newSetting: boolean; +} + +// 2. Add default in constants/defaults.ts +export const DEFAULT_SETTINGS: NoteStatusSettings = { + newSetting: false, +}; + +// 3. Add UI in integrations/settings/settings-ui.ts +new Setting(containerEl) + .setName("New Setting") + .addToggle((toggle) => + toggle + .setValue(settings.newSetting) + .onChange((value) => + this.callbacks.onSettingChange("newSetting", value), + ), + ); +``` + +## Build & Release + +### Production Build + +```bash +npm run build +# Creates: main.js, manifest.json, styles.css +``` + +### Version Bump + +```bash +npm version patch # or minor/major +# Updates: package.json, manifest.json, versions.json +``` + +### Release Process + +1. Create git tag: `git tag 1.0.13` +2. Push tag: `git push origin 1.0.13` +3. GitHub Actions creates draft release +4. Edit release notes and publish + +### Obsidian DevTools + +- Ctrl+Shift+I โ†’ Console +- Check for plugin errors +- Monitor performance tab + +## Code Style + +- TypeScript strict mode +- Use `const` by default +- Explicit return types +- Handle null/undefined +- Clean up in unload() + +## Contributing + +1. Fork repository +2. Create feature branch +3. Follow existing patterns +4. Test with large vault +5. Submit PR with description diff --git a/wiki/Frontmatter Format.md b/wiki/Frontmatter Format.md new file mode 100644 index 0000000..1a10998 --- /dev/null +++ b/wiki/Frontmatter Format.md @@ -0,0 +1,115 @@ +# Frontmatter Format + +Technical specification for Note Status metadata storage. + +## Format Overview + +Status metadata is stored in YAML frontmatter using a configurable tag prefix. + +```yaml +--- +obsidian-note-status: + - active +--- +``` + +## Specification + +### Field Name + +- **Default**: `obsidian-note-status` +- **Type**: String or Array +- **Configurable**: Yes, via `tagPrefix` setting + +### Value Types + +#### Single Status (Array) + +```yaml +--- +obsidian-note-status: + - active +--- +``` + +#### Multiple Statuses (Array) + +```yaml +--- +obsidian-note-status: + - active + - hello + - world +--- +``` + +## Valid Status Values + +### Default Statuses + +- `unknown` - No status assigned +- Template Statuses: Any status defined in enabled templates + - Must match exact name (case-sensitive) + - Icon and color stored separately +- Custom Statuses: User-defined statuses + - Any string value allowed + - No spaces + - Case-sensitive matching + +## Validation + +With `strictStatuses: true`: + +- Only defined statuses allowed +- Unknown statuses removed on save +- Case-sensitive matching + +## Custom Tag Prefix + +### Configuration + +```javascript +settings.tagPrefix = "project-status"; +``` + +### Result + +```yaml +--- +project-status: + - inDevelopment + - testing +--- +``` + +## Integration Examples + +### Dataview Query + +```dataview +TABLE obsidian-note-status as Status +FROM "" +WHERE contains(obsidian-note-status, "active") +``` + +### Templater + +```yaml +--- +obsidian-note-status: ["<% tp.system.prompt("Status?") %>"] +--- +``` + +### QuickAdd + +```yaml +--- +obsidian-note-status: ["{{VALUE:active,onHold,completed}}"] +--- +``` + +### Reserved Values + +- `unknown` - System reserved +- Empty string - Converted to unknown +- `null`/`undefined` - Treated as unknown diff --git a/wiki/Home Page.md b/wiki/Home Page.md new file mode 100644 index 0000000..f5c7b54 --- /dev/null +++ b/wiki/Home Page.md @@ -0,0 +1,87 @@ +# Note Status Plugin Wiki + +Welcome to the comprehensive documentation for the Note Status plugin for Obsidian. + +## ๐Ÿ“š Documentation Index + +### For Users + +- **[[Quick Start Guide|๐Ÿ“š Quick Start Guide]]** - Get running in 5 minutes +- **[[User Manual|๐Ÿ“– User Manual]]** - Complete feature documentation +- **[[Configuration Guide|โš™๏ธ Configuration Guide]]** - Settings and customization +- **[[Performance Tuning|๐Ÿš€ Performance Tuning]]** - Optimize for large vaults + +### For Developers + +- **[[Architecture Overview|๐Ÿ—๏ธ Architecture Overview]]** - Plugin structure and design +- **[[Development Setup|๐Ÿ”ง Development Setup]]** - Contributing guide + +### Reference + +- **[[Frontmatter Format|๐Ÿ“ Frontmatter Format]]** - Technical specification + +## ๐Ÿ“ˆ Features Overview + +### Core Features + +- โœ… Status assignment (active, on hold, completed, dropped) +- โœ… Multiple statuses per note +- โœ… File explorer integration +- โœ… Status bar display +- โœ… Dropdown status selector +- โœ… Dedicated status pane +- โœ… Batch operations +- โœ… Custom statuses and templates + +### Advanced Features + +- โœ… Large vault optimization (40k+ notes tested) +- โœ… Pagination and filtering +- โœ… Context menus and commands +- โœ… Auto-hide behaviors +- โœ… Search and organization +- โœ… Import/export configurations + +## ๐ŸŽฏ Use Cases + +### Personal Knowledge Management + +- Track reading progress on books and articles +- Manage project statuses and milestones +- Organize research notes by completion stage + +### Academic Research + +- Track paper review stages +- Manage thesis chapter progress +- Organize literature review statuses + +### Project Management + +- Monitor task completion +- Track feature development stages +- Manage backlog items + +### Content Creation + +- Track blog post drafts +- Manage video script statuses +- Organize creative project stages + +## ๐Ÿ’ก Getting Help + +1. **Review [GitHub Issues](https://github.com/devonthesofa/obsidian-note-status/issues)** +2. **Create a new issue** with detailed information + +## ๐Ÿค Contributing + +We welcome contributions! See the [[Development Setup]] guide to get started. + +- **Report bugs** via GitHub Issues +- **Suggest features** in GitHub Discussions +- **Submit code** via Pull Requests +- **Improve documentation** by editing wiki pages + +--- + +_Last updated: [Current Date]_ _Plugin version: 1.0.12_ diff --git a/wiki/Performance Tuning.md b/wiki/Performance Tuning.md new file mode 100644 index 0000000..6c86122 --- /dev/null +++ b/wiki/Performance Tuning.md @@ -0,0 +1,86 @@ +# Performance Tuning + +Optimize Note Status for large vaults (tested up to 40k notes). + +## Quick Wins + +### Essential Settings for 5k+ Notes + +``` +โœ… Exclude unassigned notes from status pane +โœ… Hide unknown status in file explorer +Pagination: 50-100 items per page +``` + +### Disable Heavy Features + +``` +โ˜ Show status icons in file explorer (if slow) +โ˜ Auto-hide status bar (reduces DOM updates) +``` + +## Minimal Performance Config + +```json +{ + "showStatusIconsInExplorer": false, + "excludeUnknownStatus": true, + "hideUnknownStatusInExplorer": true, + "compactView": true, + "enabledTemplates": ["minimal"] +} +``` + +## Troubleshooting Lag + +### Status Pane Slow + +1. Enable compact view +2. Close unused status groups + +### File Explorer Sluggish + +1. Disable status icons temporarily +2. Restart Obsidian +3. Check for conflicting plugins + +### Dropdown Delay + +Normal behavior - uses debouncing. If excessive: + +- Check console for errors +- Disable strict validation +- Reduce custom statuses count + +## Advanced Optimization + +### Browser DevTools Analysis + +``` +1. Ctrl+Shift+I โ†’ Performance tab +2. Record while opening status pane +3. Look for: + - Long tasks > 50ms + - Excessive DOM operations + - Memory leaks +``` + +## Known Limitations + +### File Explorer Integration + +- Uses private Obsidian APIs +- May break with updates +- Fallback: Disable icons + +### Metadata Cache + +- Triggers on every frontmatter change +- Batched with 100ms debounce +- Can't be optimized further + +### DOM Mutations + +- File explorer recreates elements +- Status pane uses virtual scrolling +- Limit: ~10k visible items diff --git a/wiki/Quick Start Guide.md b/wiki/Quick Start Guide.md new file mode 100644 index 0000000..732d529 --- /dev/null +++ b/wiki/Quick Start Guide.md @@ -0,0 +1,129 @@ +# Quick Start Guide + +Get the Note Status plugin working in under 5 minutes. + +## Installation + +### Method 1: Community Plugin Store (Recommended) + +1. Open Obsidian โ†’ Settings โ†’ Community plugins +2. Disable Safe mode +3. Click "Browse" โ†’ Search "Note Status" +4. Install and Enable + +### Method 2: Manual Installation + +1. Download latest release from [GitHub](https://github.com/devonthesofa/obsidian-note-status/releases) +2. Extract the following files into your Obsidian vault under `.obsidian/plugins/note-status/`: + - `main.js` + - `manifest.json` + - `styles.css` +3. In Obsidian, go to **Settings โ†’ Community plugins** and enable **Note Status**. + +## First Status Assignment + +### Using the Toolbar + +1. Open any note +2. Click the `โ“` icon in the toolbar: + - ![Status From Toolbar Screenshot](images/status-from-toolbar.png) +3. Select a status (e.g., "active") +4. Status appears in status bar and file explorer: + - ![Status Bar Screenshot](images/status-bar.png) + - ![File Explorer Screenshot](images/file-explorer.png) + +### Using Commands + +1. Press `Ctrl/Cmd + P` for command palette +2. Type "Change status" +3. Select status from dropdown + +## Essential Settings + +Access via Settings โ†’ Note Status: + +``` +โœ… Show status bar +โœ… Show status icons in file explorer +โœ… Enable multiple statuses +โŒ Auto-hide status bar (disable for learning) +``` + +## Status Templates + +Enable a template for instant statuses: +**Recommended for beginners: "Minimal workflow"** + +- `todo` ๐Ÿ“Œ +- `inProgress` โš™๏ธ +- `review` ๐Ÿ‘€ +- `done` โœ“ + +## First Workflow + +1. **Create a project note** โ†’ Set status to `todo` +2. **Start working** โ†’ Change to `inProgress` +3. **Need feedback** โ†’ Change to `review` +4. **Complete** โ†’ Change to `done` + +## Viewing Your Statuses + +### Status Pane (Recommended) + +- Click status icon in left sidebar +- See all notes grouped by status +- Click any note to open + ![Status Pane Screenshot](images/status-pane.png) + +### File Explorer + +- Status icons appear next to file names +- Right-click files to change status +- Select multiple files for batch updates - ![Status Pane Screenshot](images/batch-updates.png) + ![File Explorer Screenshot](images/file-explorer.png) + +## Performance Setup (Large Vaults) + +If you have 1000+ notes, set the settings: + +``` +โœ… Exclude unassigned notes from status pane +โœ… Hide unknown status in file explorer +``` + +## Frontmatter Format + +The plugin stores statuses in YAML frontmatter: + +```yaml +--- +obsidian-note-status: + - active +--- +``` + +Multiple statuses: + +```yaml +--- +obsidian-note-status: + - idea + - HelloWorld +--- +``` + +## Next Steps + +- **[[User Manual]]** - Complete feature guide +- **[[Configuration Guide]]** - Custom statuses and templates +- **[[Performance Tuning]]** - Optimize for your vault size + +## Quick Reference + +| Action | Method | +| ----------------- | -------------------------- | +| Set status | Click toolbar icon | +| Batch update | Select files โ†’ right-click | +| View all statuses | Open status pane | +| Add custom status | Settings โ†’ Custom statuses | +| Remove status | Click status chip โ†’ X | diff --git a/wiki/User Manual.md b/wiki/User Manual.md new file mode 100644 index 0000000..62d0851 --- /dev/null +++ b/wiki/User Manual.md @@ -0,0 +1,220 @@ +# User Manual + +Complete guide to all Note Status plugin features. + +## Core Concepts + +### Status System + +- **Status**: A label applied to notes (active, completed, etc.) +- **Multiple Statuses**: Notes can have multiple statuses simultaneously +- **Unknown Status**: Default for notes without assigned status +- **Templates**: Predefined sets of statuses for different workflows + +### Storage Format + +Statuses are stored in YAML frontmatter: + +```yaml +--- +obsidian-note-status: + - idea + - HelloWorld +--- +``` + +## Interface Components + +### 1. Toolbar Button + +**Location**: Editor toolbar (rightmost icon) **Appearance**: Shows current status icon or `โ“` for unknown **Function**: Click to open status dropdown + +**Visual Indicators**: + +- Single status: Shows status icon +- Multiple statuses: Shows primary status + count badge +- Unknown status: Shows `โ“` icon + +### 2. Status Bar + +**Location**: Bottom of editor **Display**: `Status: active` or `Statuses: active, inProgress` **Behavior**: + +- Click to open dropdown +- Auto-hide when status is unknown (configurable) + +### 3. Status Dropdown + +**Trigger**: Click toolbar button, status bar, or context menu **Features**: + +- Current status chips (removable) +- Search/filter statuses +- Status options with icons +- Multi-file support + +### 4. File Explorer Integration + +**Visual**: Status icons next to file names +**Interaction**: Right-click for context menu +**Multi-select**: Select multiple files for batch operations + +### 5. Status Pane + +**Location**: Left sidebar +**Access**: Ribbon icon or Command Palette +**Features**: + +- Notes grouped by status +- Search functionality +- Compact/standard view toggle +- Pagination for large groups + +## Basic Operations + +### Setting Status (Single Note) + +#### Method 1: Toolbar + +1. Open note +2. Click toolbar status icon +3. Select status from dropdown + +#### Method 2: Right-click + +1. Right-click note in file explorer +2. Select "Change status" +3. Choose status + +#### Method 3: Command Palette + +1. `Ctrl/Cmd + P` +2. Type "Change status" +3. Select status + +### Multiple Statuses + +When enabled in settings: + +**Add Status**: + +- Click non-selected status in dropdown +- Status is added to existing ones + +**Remove Status**: + +- Click X on status chip +- Status is removed + +**Toggle Mode**: + +- Each click toggles status on/off +- Useful for quick status management + +### Batch Operations + +**Select Multiple Files**: + +- `Ctrl/Cmd + Click` for individual selection +- `Shift + Click` for range selection + +**Apply Status**: + +1. Right-click selection +2. Choose "Change status" +3. Select status +4. Chooses add/remove based on majority + +**Batch Logic**: + +- If >50% of files have status โ†’ Remove +- If <50% of files have status โ†’ Add +- Smart handling preserves other statuses + +## Advanced Features + +### Status Pane Operations + +#### Views + +- **Standard**: Full file icons and spacing +- **Compact**: Dense list format + +#### Search + +- Filters notes by filename +- Real-time filtering +- Case-insensitive + +#### Pagination + +- Configurable items per page (default: 100) +- Prevents performance issues +- Per-status pagination state + +#### Group Management + +- Click group header to collapse/expand +- State persisted between sessions +- Shows file count per status + +### Context Menus + +#### Single File + +- **File Explorer**: Right-click โ†’ "Change status" +- **Editor**: Right-click โ†’ "Change note status" + +#### Multiple Files + +- **Batch Selection**: Right-click โ†’ "Change status" +- **Status Management**: Dedicated multi-file interface + +### Commands + +All commands available via Command Palette: + +#### Core Commands + +- `Open status pane` - Show status sidebar +- `Change status of current note` - Open dropdown +- `Add status to current note` - Add mode dropdown +- `Insert status metadata` - Add frontmatter +- `Cycle to next status` - Rotate through statuses +- `Clear status` - Set to unknown + +#### Quick Commands (Configurable) + +- `Set status to [status]` - Direct status assignment +- `Toggle status [status]` - Toggle specific status + +#### Utility Commands + +- `Copy status from current note` - Copy to clipboard +- `Paste status to current note` - Apply from clipboard +- `Toggle multiple statuses mode` - Enable/disable multi-status +- `Search notes by current status` - Global search + +## Global Search Integration + +Use Obsidian's global search with status queries: + +``` +[obsidian-note-status:"active"] +[obsidian-note-status:"inProgress" OR "review"] +``` + +## Keyboard Shortcuts + +### Default Shortcuts + +None assigned by default - customize in Obsidian settings. + +### Recommended Shortcuts + +- `Ctrl/Cmd + Shift + S` - Change status +- `Ctrl/Cmd + Shift + P` - Open status pane +- `Ctrl/Cmd + Shift + A` - Set status to active +- `Ctrl/Cmd + Shift + D` - Set status to done + +### Quick Status Commands + +Configure in settings to enable hotkeys for frequently used statuses.