Skip to content

Commit 619b237

Browse files
authored
Merge pull request #37 from ran-codes/release-v0.0.6-housekeeping
[Feature] Update README with new Gifs for dedicated View Container #36
2 parents 9d2197d + 8b79c24 commit 619b237

8 files changed

Lines changed: 85 additions & 17 deletions

File tree

.claude/settings.local.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"Bash(npm run compile:*)",
66
"Bash(cat:*)",
77
"Bash(code --list-extensions)",
8-
"Bash(code --install-extension:*)"
8+
"Bash(code --install-extension:*)",
9+
"Bash(npm install:*)",
10+
"Bash(vsce package:*)"
911
],
1012
"deny": [
1113
"Bash(git:*)"

.vscodeignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ vsc-extension-quickstart.md
1313
**/*.ts
1414
**/.vscode-test.*
1515
test-files/**
16+
.claude/**
17+
.context/**

CHANGELOG.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,51 @@ All notable changes to the "Code Organizer" extension will be documented in this
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7-
7+
8+
9+
## [0.0.6] - 2025-10-28
10+
11+
### Added
12+
13+
- **Custom Activity Bar View**: Dedicated Code Organizer tab in the activity bar with custom icon
14+
- Independent view container for Code Organizer sections
15+
- Enhanced navigation experience separate from built-in Outline
16+
- Monochrome SVG icon that adapts to VS Code themes
17+
- **Editor → Outline Synchronization**: Bidirectional navigation between editor and outline (#29)
18+
- Auto-scroll outline view as cursor moves through sections
19+
- Highlight current section in both editor and outline
20+
- Visual indicators with themed colors (border highlight + hover messages)
21+
- Debounced cursor tracking (150ms) for performance
22+
- **"Show Code Organizer" Command**: Quick access command to open and focus the view (#31)
23+
- Accessible via Command Palette: `Code Organizer: Show Code Organizer`
24+
- Programmatically opens view when closed
25+
- Uses VS Code's auto-generated `.focus` command for reliability
26+
- **High Resolution Icon**: Professional hexagon design for marketplace (#26)
27+
- Hex sticker style inspired by R packages
28+
- Code section visual metaphor (hash symbols with lines)
29+
- Gradient fill for visual appeal
30+
- Separate monochrome activity bar icon for theme compatibility
31+
32+
### Changed
33+
34+
- Consolidated view architecture: Removed redundant Explorer section, kept custom Activity Bar tab + legacy Outline integration
35+
- Enhanced TreeView with caching mechanism for reliable `reveal()` functionality
36+
- Improved section highlight with visual decorations (left border + background highlight)
37+
- Updated extension icon to `icon_v2.png` with modern hexagon design
38+
39+
### Technical
40+
41+
- Implemented `CodeOrganizerTreeDataProvider` with TreeItem caching using `Map<uniqueId, TreeItem>`
42+
- Created `decorations.ts` for editor highlighting with theme-aware colors
43+
- Added cursor position tracking with `getCurrentSection()` helper function
44+
- Registered `codeOrganizer.showView` command for view focus functionality
45+
- Document caching to avoid unnecessary re-parsing of sections
46+
- Event listeners for editor selection changes, active editor switches, and document changes
47+
48+
### Fixed
49+
50+
- TreeView `reveal()` now works correctly by using cached TreeItem instances
51+
- Removed confusing `goToSection` command from Command Palette (kept for programmatic use only)
852

953
## [0.0.5] - 2025-09-27
1054

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Transform your code files into organized, navigable documents with a table of co
2222
- **VS Code integration**: Seamless outline view, breadcrumbs, and Go to Symbol
2323
- **Zero configuration**: Works immediately
2424

25-
<img src="./assets/images/snip_demo_python.png" alt="Code Organizer Snip Demo Python" >
25+
<img src="./assets/images/snip_demo_python_v2.png" alt="Code Organizer Snip Demo Python" >
2626

2727

2828

@@ -33,11 +33,14 @@ Transform your code files into organized, navigable documents with a table of co
3333

3434
**To use:**
3535
1. Install the extension
36-
2. Add comment sections ending with `----` (4 or more dashes) to trigger code organization
37-
3. Check the **Outline** panel in VS Code's Explorer sidebar
38-
4. Click any section to jump to it instantly
36+
2. Open any code file (or create a new one)
37+
3. Add comment sections ending with `----` (4 or more dashes) to trigger code organization
38+
4. Check the **Outline** panel in VS Code's Explorer sidebar
39+
5. Click any section to jump to it instantly
3940

40-
![Code Organizer Demo](./assets/images/demo.gif)
41+
**Tip**: Use Command Palette (Ctrl+Shift+P / Cmd+Shift+P) → `Code Organizer: Show Code Organizer` to quickly open the view
42+
43+
![Code Organizer Demo](./assets/images/demo_v2.gif)
4144

4245

4346

@@ -214,7 +217,15 @@ code --install-extension ran-codes.code-organizer-vscode
214217

215218
See [CHANGELOG.md](CHANGELOG.md) for detailed release information.
216219

217-
### 0.0.5 - Latest
220+
### 0.0.6 - Latest
221+
- **🆕 Custom Activity Bar View**: Dedicated Code Organizer tab with custom icon
222+
- **🆕 Editor-Outline Sync**: Auto-scroll outline view as you navigate through code
223+
- **🆕 "Show Code Organizer" Command**: Quick access via Command Palette
224+
- **🆕 High Resolution Icon**: Professional hexagon design for marketplace
225+
- Enhanced TreeView with caching for reliable navigation
226+
- Improved section highlighting with visual decorations
227+
228+
### 0.0.5
218229
- **🆕 Markdown & Quarto Support**: Native header detection for `.md` and `.qmd` files
219230
- Smart code chunk handling - ignores headers inside fenced code blocks
220231
- Language-specific parsing for markdown documents
@@ -223,7 +234,7 @@ See [CHANGELOG.md](CHANGELOG.md) for detailed release information.
223234
### 0.0.4
224235
- **Cursor Compatibility**: Downgraded VSCode engine to ^1.99.0 for broader editor support
225236

226-
### 0.0.3 - Latest
237+
### 0.0.3
227238
- **🆕 JSX/TSX Support**: Added React JSX comment syntax `{/* // Section ---- */}`
228239
- Enhanced regex pattern to handle whitespace variations in JSX comments
229240
- Improved language support for React and TypeScript React developers

assets/images/demo_v2.gif

2.94 MB
Loading
34.4 KB
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "code-organizer",
33
"displayName": "🗂️ Code Organizer",
44
"description": "Transform your code into organized, navigable sections using simple comment patterns. Create table-of-contents-like structure with # Section Name ---- syntax. Works with Python, JavaScript, TypeScript, React/JSX, C/C++, Java, Go, Rust, PHP, SQL and more. Perfect for large files and data science notebooks.",
5-
"version": "0.0.5",
5+
"version": "0.0.6",
66
"publisher": "ran-codes",
77
"author": {
88
"name": "ran-codes",

test-files/demo.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import sys
44
import logging
55
from pathlib import Path
6+
from typing import Dict, Any
67

78
APP_NAME = "DataPipeline"
89
VERSION = "1.0.0"
@@ -13,7 +14,9 @@
1314
import numpy as np
1415
import requests
1516
from sqlalchemy import create_engine
17+
from sqlalchemy.engine import Engine
1618
import boto3
19+
from botocore.client import BaseClient
1720
from dotenv import load_dotenv
1821

1922
load_dotenv()
@@ -40,15 +43,16 @@
4043
class DataPipeline:
4144
def __init__(self, name: str):
4245
self.name = name
43-
self.engine = create_engine(DATABASE_URL)
44-
self.s3_client = boto3.client('s3') if AWS_ACCESS_KEY else None
46+
self.engine: Engine = create_engine(DATABASE_URL)
47+
self.s3_client: BaseClient | None = boto3.client('s3') if AWS_ACCESS_KEY else None
4548
logger.info(f"Initialized pipeline: {name}")
4649

4750
def extract_data(self, source: str) -> pd.DataFrame:
4851
"""Extract data from various sources"""
4952
if source.startswith('http'):
5053
headers = {'Authorization': f'Bearer {API_KEY}'}
5154
response = requests.get(source, headers=headers)
55+
response.raise_for_status() # Check for HTTP errors
5256
data = response.json()
5357
return pd.DataFrame(data)
5458
elif source.endswith('.csv'):
@@ -68,13 +72,16 @@ def transform_data(self, df: pd.DataFrame) -> pd.DataFrame:
6872
logger.info(f"Transformed {len(df)} rows")
6973
return df
7074

71-
def load_data(self, df: pd.DataFrame, destination: str):
75+
def load_data(self, df: pd.DataFrame, destination: str) -> None:
7276
"""Load data to destination"""
7377
if destination.startswith('s3://'):
78+
if self.s3_client is None:
79+
raise ValueError("S3 client not initialized. Check AWS credentials.")
7480
bucket = destination.replace('s3://', '').split('/')[0]
7581
key = '/'.join(destination.replace('s3://', '').split('/')[1:])
76-
df.to_parquet(f'/tmp/{key}')
77-
self.s3_client.upload_file(f'/tmp/{key}', bucket, key)
82+
temp_file = f'/tmp/{key}'
83+
df.to_parquet(temp_file)
84+
self.s3_client.upload_file(temp_file, bucket, key)
7885
elif destination.endswith('.csv'):
7986
df.to_csv(destination, index=False)
8087
else:
@@ -83,7 +90,7 @@ def load_data(self, df: pd.DataFrame, destination: str):
8390

8491
logger.info(f"Loaded data to: {destination}")
8592

86-
def run_pipeline(config: dict):
93+
def run_pipeline(config: Dict[str, Any]) -> None:
8794
"""Execute a complete ETL pipeline"""
8895
pipeline = DataPipeline(config['name'])
8996

@@ -97,7 +104,7 @@ def run_pipeline(config: dict):
97104
logger.info(f"Pipeline {config['name']} completed successfully")
98105

99106
# 3. Deploy ----
100-
def main():
107+
def main() -> None:
101108
"""Main deployment function"""
102109
print(f"🚀 Starting {APP_NAME} v{VERSION}")
103110

@@ -122,6 +129,8 @@ def main():
122129
for config in pipelines:
123130
try:
124131
run_pipeline(config)
132+
except Exception as e:
133+
logger.error(f"Pipeline {config['name']} failed: {e}")
125134

126135
if __name__ == "__main__":
127136
main()

0 commit comments

Comments
 (0)