diff --git a/CHANGELOG.md b/CHANGELOG.md index 9acf0ea..369dfaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,110 @@ All notable changes to Project Notes will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.3.0] - 2025-11-11 + +### Added + +- **Favorites System** ⭐ + - Star notes and folders for quick access + - Favorites section in sidebar with expandable folders + - Persistent storage in `.favorites.json` + - Hover to reveal star buttons on notes/folders + - Complete REST API for favorites management (`/api/favorites`) + +- **Comprehensive Keyboard Shortcuts** ⌨️ + - 10 global shortcuts for navigation and editing + - `Ctrl/Cmd+K` - Open search modal + - `Ctrl/Cmd+S` - Save note + - `Ctrl/Cmd+D` - Open daily note + - `Ctrl/Cmd+N` - Create new note + - `Ctrl/Cmd+H` - Go home + - `Ctrl/Cmd+B` - Toggle sidebar + - `Ctrl/Cmd+,` - Open settings + - `Ctrl/Cmd+P` - Toggle preview (changed from `/` for AZERTY compatibility) + - `Ctrl/Cmd+Shift+F` - Create new folder + - `Escape` - Close modals + - Full documentation in `docs/KEYBOARD_SHORTCUTS.md` + - Help section on About page + +- **Font Customization** 🔤 + - 8 font options: JetBrains Mono, Fira Code, Inter, Poppins, Public Sans, Cascadia Code, Source Code Pro, Sans-serif + - 4 size options: Small (14px), Medium (16px), Large (18px), X-Large (20px) + - Font selector in settings modal with live previews + - Preferences saved in localStorage + +- **Vim Mode Support** 🎮 + - Full Vim keybindings in CodeMirror editor + - hjkl navigation, insert/normal/visual modes + - All standard Vim commands and motions + - Toggle in Settings → Éditeur tab + - Powered by `@replit/codemirror-vim` + - Graceful fallback if package not installed + +- **About Page** ℹ️ + - New "About Project Notes" page accessible from sidebar + - Features overview with keyboard shortcuts reference + - Visual guide to all shortcuts with `` styling + - Accessible via ℹ️ button next to settings + +- **Enhanced Settings Modal** + - Tabbed interface: Thèmes, Polices, Éditeur + - Organized and intuitive navigation + - Visual previews for themes and fonts + - Toggle switches with smooth animations + +### Changed + +- **Sidebar UI Improvements** + - Increased width from 280px to 300px for better readability + - JetBrains Mono as default font + - Compact spacing throughout + - Root indicator (📁 notes) non-clickable, visually distinct + - "Nouveau dossier" button moved to bottom + - Section titles enlarged for hierarchy + - Settings and About buttons side-by-side at bottom + +- **Slash Commands Styling** + - Palette now uses theme colors (var(--bg-secondary), var(--accent-primary)) + - Adapts to selected theme automatically + - Consistent with overall UI aesthetic + +- **Homepage Layout** + - Favorites section with expandable folders + - Note count in section titles ("📂 Toutes les notes (39)") + - Scrollable favorites list (max 300px height) + - Better organization and hierarchy + +- **Preview Toggle Shortcut** + - Changed from `Ctrl+/` to `Ctrl+P` for AZERTY keyboard compatibility + - Updated in code, documentation, and About page + +### Fixed + +- Slash commands palette colors now respect theme selection +- Modal centering improved for delete confirmations +- Sidebar overflow handling with scrollable sections +- Font size now properly cascades using `rem` units from `:root` + +### Technical + +- Added `@replit/codemirror-vim` as optional dependency +- Created `vim-mode-manager.js` for Vim mode lifecycle +- Created `font-manager.js` for font and size management +- Created `keyboard-shortcuts.js` for centralized shortcuts +- Created `favorites.js` for favorites UI management +- New backend endpoints: `/api/favorites`, `/api/about` +- Enhanced `theme-manager.js` with tab switching +- CSS toggle switch component added +- Improved error handling for missing packages + +### Documentation + +- Added `docs/KEYBOARD_SHORTCUTS.md` - Complete shortcuts reference +- Updated README.md with all new features +- Added sections on customization, favorites, and Vim mode +- Updated feature list and usage examples + ## [2.2.0] - 2025-11-11 ### Added diff --git a/README.md b/README.md index 64395ee..1ddf59b 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,32 @@ # Project Notes -A lightweight, web-based Markdown note-taking application with a Go backend and a minimalist frontend built with htmx. It allows users to create, edit, delete, and search Markdown notes, with automatic front matter management and a live Markdown preview. +A lightweight, web-based Markdown note-taking application with a Go backend and a minimalist frontend built with htmx. + +- 🚫 No database +- 📝 Pure Markdown with flat files +- 🔒 Your notes, your server +- ⌨️ Vim Mode +- 🎹 Keyboard driven +- 🌍 Run everywhere (Linux & FreeBSD) +- 🛠️ Easy to build +- 🚀 Powerful API + ## Features * **File-based Notes:** All notes are stored as plain Markdown files (`.md`) on the filesystem. * **Daily Notes:** Quick daily journaling with interactive calendar, keyboard shortcuts (`Ctrl/Cmd+D`), and structured templates. * **Tag Indexing:** Notes are indexed by tags specified in their YAML front matter, enabling quick search. -* **CodeMirror 6 Editor:** Modern, powerful Markdown editor with syntax highlighting and One Dark theme. +* **CodeMirror 6 Editor:** Modern, powerful Markdown editor with syntax highlighting, One Dark theme, and optional Vim mode. +* **Vim Mode:** Full Vim keybindings support (hjkl navigation, modes, commands) for power users. * **Live Markdown Preview:** Side-by-side editor and live preview pane with scroll synchronization. * **Automatic Front Matter:** Automatically generates and updates `title`, `date` (creation), `last_modified`, and `tags` in YAML front matter. * **Slash Commands:** Insert common Markdown elements and dynamic content (like current date) using `/` commands in the editor. * **Search Modal:** Press `Ctrl/Cmd+K` to open a powerful search modal with keyboard navigation and real-time results. +* **Favorites System:** Star your most important notes and folders for quick access from the sidebar. +* **Keyboard Shortcuts:** 10+ global shortcuts for navigation, editing, and productivity (documented in About page). +* **8 Dark Themes:** Choose from Material Dark, Monokai, Dracula, One Dark, Solarized, Nord, Catppuccin, and Everforest. +* **Font Customization:** Select from 8 fonts (JetBrains Mono, Fira Code, Inter, etc.) with 4 size options. * **Interactive Calendar:** Monthly calendar widget showing daily notes with visual indicators and one-click access. * **Dynamic File Tree:** Automatically updating file tree in the sidebar to navigate notes. * **Hierarchical Organization:** Organize notes in folders with drag-and-drop file management. @@ -179,6 +194,54 @@ Results are scored and ranked by relevance (title matches score highest). **Available commands:** h1, h2, h3, list, date, link, bold, italic, code, codeblock, quote, hr, table +### Customization & Settings + +Access settings by clicking the **⚙️ Paramètres** button in the sidebar. + +**Theme Selection** (8 options): +- Material Dark (default) - Professional Material Design theme +- Monokai Dark - Classic Monokai palette +- Dracula - Elegant purple and cyan accents +- One Dark - Popular Atom theme +- Solarized Dark - Scientifically optimized colors +- Nord - Arctic blue-toned theme +- Catppuccin - Pastel comfort palette +- Everforest - Nature-inspired green and beige + +**Font Customization**: +- **Fonts**: JetBrains Mono (default), Fira Code, Inter, Poppins, Public Sans, Cascadia Code, Source Code Pro, Sans-serif +- **Sizes**: Small (14px), Medium (16px), Large (18px), X-Large (20px) + +**Editor Settings**: +- **Vim Mode**: Enable full Vim keybindings in CodeMirror + - hjkl navigation, insert/normal/visual modes + - All standard Vim commands and motions + - Requires `@replit/codemirror-vim` package + +### Keyboard Shortcuts + +Press `Ctrl/Cmd+K` or visit the **About** page (ℹ️ button in sidebar) for the complete list: + +- `Ctrl/Cmd+K` - Open search +- `Ctrl/Cmd+S` - Save note +- `Ctrl/Cmd+D` - Open daily note +- `Ctrl/Cmd+N` - Create new note +- `Ctrl/Cmd+H` - Go home +- `Ctrl/Cmd+B` - Toggle sidebar +- `Ctrl/Cmd+,` - Open settings +- `Ctrl/Cmd+P` - Toggle preview +- `Ctrl/Cmd+Shift+F` - Create new folder +- `Escape` - Close modals + +### Favorites System + +Star important notes and folders for quick access: + +1. Hover over any note or folder in the sidebar +2. Click the **★** icon to add/remove from favorites +3. Access favorites from the **⭐ Favoris** section in the sidebar +4. Favorites persist across sessions (stored in `.favorites.json`) + ### Organizing Notes in Folders 1. Click the "📁 Nouveau dossier" button in the sidebar. diff --git a/docs/FREEBSD_BUILD.md b/docs/FREEBSD_BUILD.md index bc3e29b..4542ac0 100644 --- a/docs/FREEBSD_BUILD.md +++ b/docs/FREEBSD_BUILD.md @@ -7,38 +7,12 @@ ```bash # Installer Go depuis les packages pkg install go - -# Ou compiler depuis les ports -cd /usr/ports/lang/go && make install clean +pkg install npm +pkg install node # Vérifier l'installation go version ``` - -## Clonage du projet - -```bash -# Cloner le repository -git clone https://github.com/mathieu/project-notes.git -cd project-notes - -# Vérifier que tous les fichiers Go sont présents -find . -name "*.go" | sort -``` - -**Fichiers Go requis :** -``` -./cmd/server/main.go # Point d'entrée principal -./internal/api/daily_notes.go # Gestion des notes quotidiennes -./internal/api/favorites.go # API des favoris -./internal/api/handler.go # Handler HTTP principal -./internal/api/handler_test.go # Tests unitaires -./internal/api/rest_handler.go # API REST -./internal/indexer/indexer.go # Indexation et recherche -./internal/indexer/indexer_test.go # Tests indexeur -./internal/watcher/watcher.go # Surveillance fichiers -``` - ## Build ### 1. Télécharger les dépendances @@ -56,6 +30,7 @@ go mod download ```bash go mod tidy +go mod download ``` **Note :** Si `go mod tidy` ne produit aucune sortie, c'est normal ! Cela signifie que le fichier `go.mod` est déjà à jour. @@ -73,13 +48,6 @@ go build -ldflags="-s -w" -o server ./cmd/server CGO_ENABLED=0 go build -ldflags="-s -w" -o server ./cmd/server ``` -### 4. Vérifier le binaire - -```bash -file ./server -./server --help -``` - ## Lancement ### Mode développement diff --git a/docs/RELEASE_NOTES_2.3.0.md b/docs/RELEASE_NOTES_2.3.0.md new file mode 100644 index 0000000..502f6b7 --- /dev/null +++ b/docs/RELEASE_NOTES_2.3.0.md @@ -0,0 +1,201 @@ +# Release Notes v2.3.0 - Customization & Productivity + +**Release Date:** November 11, 2025 + +## 🎉 Major Features + +### ⭐ Favorites System +Star your most important notes and folders for instant access. Favorites appear in a dedicated sidebar section with full folder expansion support. + +**How to use:** +- Hover over any note or folder in the sidebar +- Click the ★ icon to toggle favorite status +- Access all favorites from the "⭐ Favoris" section +- Folders expand to show their contents +- Favorites persist across sessions + +### ⌨️ Comprehensive Keyboard Shortcuts +10 new global shortcuts to boost your productivity: + +| Shortcut | Action | +|----------|--------| +| `Ctrl/Cmd+K` | Open search modal | +| `Ctrl/Cmd+S` | Save current note | +| `Ctrl/Cmd+D` | Open today's daily note | +| `Ctrl/Cmd+N` | Create new note | +| `Ctrl/Cmd+H` | Go to homepage | +| `Ctrl/Cmd+B` | Toggle sidebar | +| `Ctrl/Cmd+,` | Open settings | +| `Ctrl/Cmd+P` | Toggle preview mode | +| `Ctrl/Cmd+Shift+F` | Create new folder | +| `Escape` | Close any modal | + +All shortcuts work system-wide and are documented in the new About page. + +### 🔤 Font Customization +Personalize your reading and writing experience: + +**8 Font Options:** +- JetBrains Mono (default) - Designed for IDEs +- Fira Code - Popular with ligatures +- Inter - Clean and professional +- Poppins - Modern sans-serif +- Public Sans - Government-approved readability +- Cascadia Code - Microsoft's coding font +- Source Code Pro - Adobe's classic +- Sans-serif - System fallback + +**4 Size Options:** +- Small (14px) - Compact view +- Medium (16px) - Default comfortable reading +- Large (18px) - Enhanced readability +- X-Large (20px) - Maximum comfort + +Access via Settings → Polices tab. + +### 🎮 Vim Mode Support +Full Vim keybindings integration for power users! + +**Features:** +- Complete hjkl navigation +- Insert, Normal, and Visual modes +- All standard Vim commands (dd, yy, p, u, etc.) +- Vim motions (w, b, $, 0, gg, G, etc.) +- Search with `/` and `?` +- Command mode with `:` + +**Enable:** Settings → Éditeur → Toggle "Mode Vim" + +**Requirements:** Automatically installed with `npm install` in the frontend directory. + +### ℹ️ About Page +New dedicated page accessible from the sidebar (ℹ️ button): +- Overview of all features +- Visual keyboard shortcuts reference +- Quick start guide +- Styled with modern card layout + +## 🎨 UI/UX Improvements + +### Enhanced Settings Modal +- **Tabbed Interface:** Thèmes, Polices, Éditeur +- **Better Organization:** Logical grouping of related settings +- **Visual Previews:** See fonts and themes before selecting +- **Toggle Switches:** Modern, animated switches for boolean options + +### Sidebar Enhancements +- **Wider Layout:** 300px (up from 280px) for better readability +- **JetBrains Mono:** Default font for sidebar and code +- **Compact Spacing:** More efficient use of space +- **Visual Hierarchy:** Larger section titles, distinct root indicator +- **Button Layout:** Settings and About buttons side-by-side at bottom + +### Homepage Improvements +- **Expandable Favorites:** Folders expand to show contents +- **Note Counts:** See total notes in each section +- **Scrollable Lists:** Max 300px height with custom scrollbars +- **Better Organization:** Clear visual hierarchy + +### Theme-Aware Components +- Slash commands palette now respects theme colors +- All modals use theme variables +- Consistent styling across all UI elements + +## 🔧 Technical Changes + +### New Dependencies +- `@replit/codemirror-vim` (optional) - Vim mode support + +### New Files +- `frontend/src/vim-mode-manager.js` - Vim mode lifecycle management +- `frontend/src/font-manager.js` - Font and size preferences +- `frontend/src/keyboard-shortcuts.js` - Centralized shortcuts handler +- `frontend/src/favorites.js` - Favorites UI manager +- `docs/KEYBOARD_SHORTCUTS.md` - Complete shortcuts documentation +- `docs/RELEASE_NOTES_2.3.0.md` - This file + +### New API Endpoints +- `GET /api/favorites` - List all favorites +- `POST /api/favorites` - Add to favorites +- `DELETE /api/favorites` - Remove from favorites +- `GET /api/about` - Render About page + +### Backend Changes +- New `favorites.go` handler for favorites management +- New `handleAbout()` method in main handler +- Favorites stored in `.favorites.json` at root +- Route registration for favorites and about + +### Frontend Changes +- Enhanced `theme-manager.js` with tab switching +- CSS toggle switch component +- Improved font size handling with rem units +- Better error handling for missing packages + +## 🐛 Bug Fixes + +- Fixed slash commands palette not respecting theme +- Fixed font size only affecting titles (now affects all text) +- Fixed modal centering for delete confirmations +- Fixed sidebar overflow with proper scrolling +- Fixed preview toggle shortcut for AZERTY keyboards (/ → P) +- Graceful fallback when Vim package not installed + +## 📚 Documentation Updates + +- **README.md:** Complete feature list and usage guide +- **CHANGELOG.md:** Detailed changelog for v2.3.0 +- **KEYBOARD_SHORTCUTS.md:** Full shortcuts reference +- **About Page:** In-app help and feature overview + +## 🚀 Upgrade Instructions + +### For Existing Users + +1. **Pull latest changes:** + ```bash + git pull origin main + ``` + +2. **Install new dependencies:** + ```bash + cd frontend + npm install + npm run build + cd .. + ``` + +3. **Restart the server:** + ```bash + go run cmd/server/main.go + ``` + +4. **Explore new features:** + - Click ⚙️ to customize themes, fonts, and enable Vim mode + - Click ℹ️ to view the About page and keyboard shortcuts + - Hover over notes to add them to favorites + - Try `Ctrl/Cmd+K` for quick search + +### New Users + +Follow the installation guide in README.md. All features are available out of the box! + +## 🎯 Next Steps + +Planned features for upcoming releases: +- Light themes support +- Custom theme creator +- Mobile app (PWA) +- Cloud sync +- Collaborative editing +- Plugin system + +## 🙏 Feedback + +Enjoy the new features! Report issues or suggest improvements on GitHub. + +--- + +**Version:** 2.3.0 +**Release Date:** November 11, 2025 +**Codename:** Customization & Productivity