Skip to content

Commit 7d65ecc

Browse files
authored
Merge pull request #6 from dyka3773/develop
Release v1.4.0: Theme System Implementation
2 parents cd5718d + ed5cdba commit 7d65ecc

File tree

17 files changed

+2207
-400
lines changed

17 files changed

+2207
-400
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ pip install mvn-tree-visualizer
3535
- **🌐 Multiple Output Formats:**
3636
- **HTML:** Generates an interactive HTML diagram of your dependency tree using Mermaid.js.
3737
- **JSON:** Creates a structured JSON representation of the dependency tree, perfect for scripting or integration with other tools.
38+
- **🎨 Theme System:** Choose from 2 built-in themes (minimal, dark) for clean and consistent diagram styling.
3839
- **🔄 Watch Mode:** Automatically regenerates diagrams when Maven dependency files change using the `--watch` flag.
3940
- **📋 Version Display:** Show or hide dependency versions in both HTML and JSON outputs using the `--show-versions` flag.
4041
- **⚡ Easy to Use:** A simple command-line interface that gets the job done with minimal configuration.
4142
- **📂 File Merging:** Automatically finds and merges multiple `maven_dependency_file` files from different subdirectories.
4243
- **🎨 Customizable Output:** Specify the output file name and location.
43-
- **💾 SVG Export:** Download the generated diagram as an SVG file directly from the HTML page.
44+
- **💾 Enhanced Downloads:** Download diagrams as SVG or high-resolution PNG directly from the HTML page.
45+
- **🖱️ Interactive Features:** Hover tooltips, click-to-highlight connections, pan/zoom controls, and keyboard shortcuts.
4446

4547
## How to Use
4648

@@ -73,6 +75,15 @@ mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.js
7375
mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --show-versions
7476
```
7577

78+
#### With Custom Themes
79+
```bash
80+
# Dark theme for low-light environments
81+
mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html" --theme dark
82+
83+
# Default minimal theme (clean monospace design)
84+
mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html"
85+
```
86+
7687
#### JSON Output with Versions
7788
```bash
7889
mvn_tree_visualizer --filename "maven_dependency_file" --output "dependencies.json" --format json --show-versions
@@ -109,12 +120,20 @@ Each example includes:
109120
| `--filename` | The name of the file containing the Maven dependency tree | `maven_dependency_file` |
110121
| `--output` | The name of the output file | `diagram.html` |
111122
| `--format` | The output format (`html` or `json`) | `html` |
123+
| `--theme` | Theme for HTML diagrams (`minimal`, `dark`) | `minimal` |
112124
| `--show-versions` | Show dependency versions in the diagram | `False` |
113125
| `--watch` | Watch for file changes and auto-regenerate diagram | `False` |
114126
| `--directory` | The directory to scan for the Maven dependency file(s) | current directory |
115127
| `--keep-tree` | Keep the intermediate `dependency_tree.txt` file | `False` |
116128
| `--help` | Show the help message and exit | - |
117129

130+
### Theme Options
131+
132+
- **`minimal`**: Clean monospace design with simple black borders (default)
133+
- **`dark`**: Same minimal styling but with white text on black background
134+
135+
📖 **See the complete [Theme Documentation](docs/THEMES.md) for detailed information about themes and interactive features.**
136+
118137
## Performance
119138

120139
**For Large Projects:**

ROADMAP.md

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,42 +41,61 @@ This document outlines the future direction of the `mvn-tree-visualizer` project
4141
* [x] Comprehensive test coverage (22 tests)
4242
* [x] Modular code organization improvements
4343

44-
## v1.4.0 - Visual and Theme Enhancements 🎨 (Next Release)
44+
## v1.4.0 - Visual and Theme Enhancements ✅ (Released)
4545

4646
**Focus:** Making the output more visually appealing and customizable.
4747

48-
**Priority:** High - Addresses user feedback about visual appearance and usability with large dependency trees.
49-
50-
* **Visual Themes (High Priority):**
51-
* [ ] `--theme` option with multiple built-in themes (dark, light, colorful)
52-
* [ ] CSS variable system for easy theme customization
53-
* [ ] Better default styling and typography improvements
54-
* [ ] Responsive design for different screen sizes
55-
* [ ] Custom CSS support for advanced users
56-
* **Interactive Features (High Priority):**
48+
**Status:** Released July 17, 2025
49+
50+
* **Visual Themes (Completed):**
51+
* [x] `--theme` option with multiple built-in themes (default/minimal, dark, light)
52+
* [x] Standardized color scheme across all themes
53+
* [x] Clean minimal design as default theme
54+
* [x] Enhanced dark theme with proper text visibility
55+
* [x] Consistent graphDiv styling across themes
56+
* **Interactive Features (Completed):**
57+
* [x] SVG download functionality
58+
* [x] Pan and zoom controls with keyboard shortcuts
59+
* [x] Full-screen diagram experience
60+
* [x] Improved hover effects for nodes
61+
* **Template Enhancements (Completed):**
62+
* [x] Enhanced template system with theme support
63+
* [x] Improved Mermaid.js configuration options
64+
* [x] Standardized color coding for node types (root=blue, intermediate=orange, leaf=green)
65+
* [x] Comprehensive examples for all themes
66+
67+
## v1.5.0 - Interactive Features 🎯 (Next Release)
68+
69+
**Focus:** Enhanced interactivity and user experience.
70+
71+
**Priority:** High - Building on the solid theme foundation with interactive capabilities.
72+
73+
* **Node Interaction Features (High Priority):**
74+
* [ ] **Descendant Highlighting:** Click nodes to highlight only their downstream dependencies
5775
* [ ] Tooltips with detailed dependency information (groupId, version, scope)
58-
* [ ] Hover effects and better visual feedback
5976
* [ ] Expandable/collapsible dependency groups for large trees
60-
* [ ] Better visual hierarchy for nested dependencies
61-
* **Template Enhancements (Medium Priority):**
62-
* [ ] Enhanced Jinja2 template system for theme support
63-
* [ ] Improved Mermaid.js configuration options
64-
* [ ] Better color coding for different dependency types/scopes
77+
* [ ] Search and filter functionality within diagrams
78+
* **Enhanced Controls (Medium Priority):**
79+
* [ ] PNG download option alongside SVG
80+
* [ ] Zoom to fit specific dependency subtrees
81+
* [ ] Better visual hierarchy controls for nested dependencies
82+
* **Performance & Layout (Medium Priority):**
83+
* [ ] Better layout options for large dependency trees
84+
* [ ] Performance optimizations for very large projects
6585

66-
## v1.5.0 - Advanced Features 🚀
86+
## v1.6.0 - Advanced Features 🚀
6787

6888
**Focus:** Performance and advanced functionality for power users.
6989

70-
* **Performance & Layout:**
71-
* [ ] Better layout options for large dependency trees
72-
* [ ] Performance optimizations for very large projects
73-
* [ ] Memory usage improvements for complex graphs
7490
* **Export Enhancements:**
7591
* [ ] PNG, PDF export options
7692
* [ ] SVG improvements and customization
7793
* [ ] High-quality output for presentations
94+
* **Advanced Analysis:**
95+
* [ ] Memory usage improvements for complex graphs
96+
* [ ] Dependency statistics and analysis
7897

79-
## v1.6.0+ - Extended Capabilities 🔮
98+
## v1.7.0+ - Extended Capabilities 🔮
8099

81100
**Focus:** Advanced analysis and integration features.
82101

docs/THEMES.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Theme System Documentation
2+
3+
The mvn-tree-visualizer v1.4.0 introduces a clean and focused theme system with two carefully designed themes.
4+
5+
## Available Themes
6+
7+
### 1. Minimal Theme (Default)
8+
- **Description**: Clean monospace design with simple black borders and minimal styling
9+
- **Use case**: Default choice for documentation, development, and general use
10+
- **Colors**: Standardized blue for root nodes, orange for intermediate, green for leaves
11+
- **Features**: Monospace fonts, clean lines, no decorative elements
12+
- **Background**: White with black text and borders
13+
14+
### 2. Dark Theme
15+
- **Description**: Same minimal styling as default but optimized for low-light environments
16+
- **Use case**: Late-night coding sessions, dark IDE environments, reducing eye strain
17+
- **Colors**: Same standardized color scheme on enhanced dark backgrounds
18+
- **Features**: Identical layout to minimal theme with inverted colors
19+
- **Background**: Dark gray (`#2d3748`) with white text and light borders
20+
21+
## Standardized Color Scheme
22+
23+
Both themes use a consistent color scheme for better recognition:
24+
- **Root Nodes**: Blue (#3B82F6) - Your main project dependencies
25+
- **Intermediate Nodes**: Orange (#F59E0B) - Transitive dependencies with children
26+
- **Leaf Nodes**: Green (#10B981) - Final dependencies with no children
27+
28+
## Usage
29+
30+
### CLI Usage
31+
```bash
32+
# Use minimal theme (default)
33+
mvn-tree-visualizer /path/to/project
34+
35+
# Use dark theme
36+
mvn-tree-visualizer /path/to/project --theme dark
37+
38+
# Combine with other options
39+
mvn-tree-visualizer /path/to/project --theme dark --show-versions --output my-diagram.html
40+
```
41+
42+
### Available Theme Options
43+
- `minimal` - Clean minimal design (default)
44+
- `dark` - Same minimal design with dark colors
45+
46+
## Interactive Features
47+
48+
### 1. Enhanced Controls
49+
- **Download SVG**: Export diagram as scalable vector graphics
50+
- **Note**: PNG download feature planned for future version
51+
52+
### 2. Node Interactions
53+
- **Hover Effects**: Nodes show subtle opacity changes on hover
54+
- **Click Functionality**: Currently disabled - planned for future version
55+
56+
### 3. Keyboard Shortcuts
57+
- **Ctrl+S**: Download as SVG
58+
- **Ctrl+R**: Reset pan/zoom to center
59+
60+
### 4. Pan and Zoom
61+
- **Mouse Controls**: Drag to pan, scroll to zoom
62+
- **Touch Support**: Mobile-friendly touch controls
63+
- **Reset Controls**: Built-in reset and fit-to-screen
64+
65+
## Full-Screen Experience
66+
67+
The diagram takes up the full height of the browser window minus the control bar, providing maximum space for viewing complex dependency trees.
68+
69+
## Node Styling
70+
71+
The enhanced Mermaid generation includes intelligent node styling:
72+
73+
### Node Types
74+
- **Root Nodes**: Blue styling for main project dependencies
75+
- **Leaf Nodes**: Green styling for final dependencies
76+
- **Intermediate Nodes**: Orange styling for transitive dependencies
77+
78+
### Enhanced Features
79+
- **Sanitized IDs**: Safe Mermaid-compatible node identifiers
80+
- **Proper Labels**: Clean display names with version support
81+
- **Consistent Styling**: Identical appearance across both themes
82+
83+
## Browser Compatibility
84+
85+
The enhanced templates work with:
86+
- Chrome/Chromium 90+
87+
- Firefox 88+
88+
- Safari 14+
89+
- Edge 90+
90+
91+
## Examples
92+
93+
### Basic Theme Usage
94+
```bash
95+
# Generate with dark theme
96+
mvn-tree-visualizer . --theme dark --output dark-deps.html
97+
98+
# Generate with minimal theme (default)
99+
mvn-tree-visualizer . --output minimal-deps.html
100+
```
101+
102+
### Watch Mode with Themes
103+
```bash
104+
# Watch for changes with dark theme
105+
mvn-tree-visualizer . --theme dark --watch
106+
```

examples/README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,20 @@ The `simple-project/` directory contains a basic Maven project with common depen
99
- Apache Commons Lang3
1010
- JUnit (test scope)
1111

12+
**Available Examples:**
13+
- `diagram-dark.html` - Dark theme optimized for low-light environments
14+
- `diagram-minimal.html` - Light theme with minimal styling
15+
- `dependencies.json` - JSON output for programmatic use
16+
1217
**To generate outputs:**
1318
```bash
1419
cd examples/simple-project
15-
mvn_tree_visualizer --filename maven_dependency_file --output diagram.html
20+
21+
# Generate with different themes
22+
mvn_tree_visualizer --filename maven_dependency_file --output diagram-minimal.html
23+
mvn_tree_visualizer --filename maven_dependency_file --output diagram-dark.html --theme dark
24+
25+
# Generate JSON output
1626
mvn_tree_visualizer --filename maven_dependency_file --output dependencies.json --format json
1727
```
1828

@@ -24,13 +34,32 @@ The `complex-project/` directory contains a more realistic microservice project
2434
- Google Guava
2535
- Comprehensive test dependencies
2636

37+
**Available Examples:**
38+
- `diagram-minimal.html` - Clean minimal theme
39+
- `diagram-dark.html` - Dark theme optimized for low-light environments
40+
2741
**To generate outputs:**
2842
```bash
2943
cd examples/complex-project
30-
mvn_tree_visualizer --filename maven_dependency_file --output diagram.html --show-versions
31-
mvn_tree_visualizer --filename maven_dependency_file --output dependencies.json --format json --show-versions
44+
45+
# Generate with different themes and versions
46+
mvn_tree_visualizer --filename maven_dependency_file --output diagram-minimal.html --show-versions
47+
mvn_tree_visualizer --filename maven_dependency_file --output diagram-dark.html --theme dark --show-versions
3248
```
3349

50+
## Theme Comparison
51+
52+
You can easily compare all themes by opening the different diagram files:
53+
54+
### Color Scheme (Consistent Across All Themes)
55+
- **Root nodes**: Blue - Your main project dependencies
56+
- **Intermediate nodes**: Orange - Transitive dependencies with children
57+
- **Leaf nodes**: Green - Final dependencies with no children
58+
59+
### Theme Characteristics
60+
- **Default**: Clean minimal design with monospace fonts and simple borders
61+
- **Dark**: Dark backgrounds with bright text, optimized for low-light environments
62+
3463
## Use Cases
3564

3665
### 1. Quick Dependency Overview

0 commit comments

Comments
 (0)