Skip to content

Commit 8cfbeab

Browse files
committed
delete old
1 parent 603aa50 commit 8cfbeab

1 file changed

Lines changed: 197 additions & 0 deletions

File tree

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
# Calendar System Migration Summary
2+
3+
## Migration Date
4+
July 16, 2026
5+
6+
## Overview
7+
Migrated the calendar system from scattered files in `assets/js/pages/calendar/` and `_sass/open-coding/calendar.scss` into the unified `_projects/systems/calendar/` workflow.
8+
9+
## Before (Old Structure)
10+
11+
### Source Files
12+
```
13+
assets/js/pages/calendar/
14+
├── CalendarApi.js
15+
├── CalendarData.js
16+
├── CalendarTests.js
17+
├── CalendarUI.js
18+
├── EventBuilder.js
19+
└── calendar.js
20+
21+
_sass/open-coding/
22+
└── calendar.scss
23+
```
24+
25+
### Issues with Old Structure
26+
- JavaScript and styles were in separate, distant locations
27+
- No single place to understand the full calendar system
28+
- Documentation was fragmented across multiple locations
29+
- Build process was manual and error-prone
30+
- No auto-rebuild during development
31+
32+
## After (New Structure)
33+
34+
### Source Files (Tracked in Git)
35+
```
36+
_projects/systems/calendar/
37+
├── README.md # Comprehensive documentation
38+
├── Makefile # Automated build system
39+
├── js/ # All JavaScript in one place
40+
│ ├── CalendarApi.js
41+
│ ├── CalendarData.js
42+
│ ├── CalendarTests.js
43+
│ ├── CalendarUI.js
44+
│ ├── EventBuilder.js
45+
│ └── calendar.js
46+
├── sass/ # All styles in one place
47+
│ └── main.scss
48+
└── docs/ # Project-specific docs
49+
└── MIGRATION.md # This file
50+
```
51+
52+
### Generated Files (Ignored by Git)
53+
```
54+
assets/js/projects/calendar/ # Generated JavaScript
55+
├── CalendarApi.js
56+
├── CalendarData.js
57+
├── CalendarTests.js
58+
├── CalendarUI.js
59+
├── EventBuilder.js
60+
└── calendar.js
61+
62+
_sass/projects/calendar/ # Generated SASS
63+
└── main.scss
64+
65+
assets/css/projects/calendar/ # Generated CSS entry
66+
└── main.scss # (with Jekyll frontmatter)
67+
```
68+
69+
## Migration Steps Performed
70+
71+
1. ✅ Created project structure at `_projects/systems/calendar/`
72+
2. ✅ Copied all JavaScript files to `_projects/systems/calendar/js/`
73+
3. ✅ Copied `calendar.scss` to `_projects/systems/calendar/sass/main.scss`
74+
4. ✅ Created `Makefile` with build, assets, clean, watch targets
75+
5. ✅ Registered `systems/calendar:dev` in `_projects/.makeprojects`
76+
6. ✅ Updated `_includes/calendar.html` script paths from `pages/calendar` to `projects/calendar`
77+
7. ✅ Updated `_sass/open-coding/_main.scss` import from `calendar` to `projects/calendar/main`
78+
8. ✅ Created comprehensive README.md documentation
79+
9. ✅ Tested build system successfully
80+
81+
## Benefits of New Structure
82+
83+
### 1. Single Source of Truth
84+
All calendar code (JS, SASS, docs) lives in one directory: `_projects/systems/calendar/`
85+
86+
### 2. Automated Build System
87+
```bash
88+
# Build the calendar
89+
make build
90+
91+
# Watch for changes (auto-rebuild)
92+
make watch
93+
94+
# Clean generated files
95+
make clean
96+
```
97+
98+
### 3. Better Documentation
99+
- Centralized README with architecture overview
100+
- Clear separation of source vs. generated files
101+
- Migration history (this document)
102+
103+
### 4. Development Workflow
104+
- Auto-registration via `.makeprojects`
105+
- Auto-build in dev mode (`:dev` suffix)
106+
- Watch mode for live reload during development
107+
108+
### 5. Consistent Patterns
109+
- Follows same structure as other projects (games, lessons, systems)
110+
- Uses template Makefile patterns
111+
- Integrates with existing build toolchain
112+
113+
## File Path Changes
114+
115+
### JavaScript Loads (in `_includes/calendar.html`)
116+
117+
**Before:**
118+
```html
119+
<script src="{{ site.baseurl }}/assets/js/pages/calendar/CalendarData.js"></script>
120+
<script src="{{ site.baseurl }}/assets/js/pages/calendar/EventBuilder.js"></script>
121+
<script src="{{ site.baseurl }}/assets/js/pages/calendar/CalendarApi.js"></script>
122+
<script src="{{ site.baseurl }}/assets/js/pages/calendar/CalendarUI.js"></script>
123+
<script src="{{ site.baseurl }}/assets/js/pages/calendar/calendar.js"></script>
124+
```
125+
126+
**After:**
127+
```html
128+
<script src="{{ site.baseurl }}/assets/js/projects/calendar/CalendarData.js"></script>
129+
<script src="{{ site.baseurl }}/assets/js/projects/calendar/EventBuilder.js"></script>
130+
<script src="{{ site.baseurl }}/assets/js/projects/calendar/CalendarApi.js"></script>
131+
<script src="{{ site.baseurl }}/assets/js/projects/calendar/CalendarUI.js"></script>
132+
<script src="{{ site.baseurl }}/assets/js/projects/calendar/calendar.js"></script>
133+
```
134+
135+
### SASS Import (in `_sass/open-coding/_main.scss`)
136+
137+
**Before:**
138+
```scss
139+
@import "calendar";
140+
```
141+
142+
**After:**
143+
```scss
144+
@import "projects/calendar/main";
145+
```
146+
147+
## Old Files Status
148+
149+
**All old files have been removed:**
150+
- `assets/js/pages/calendar/` ✅ Removed
151+
- `_sass/open-coding/calendar.scss` ✅ Removed
152+
- `navigation/calendar.md` ✅ Removed (moved to `index.md`)
153+
- `_posts/Foundation/H-code/2026-03-21-calendar-architecture.md` ✅ Moved to `docs/ARCHITECTURE.md`
154+
155+
The migration is complete and verified.
156+
157+
## Testing Checklist
158+
159+
- [x] Build system works (`make build`)
160+
- [x] JavaScript files copied to correct location
161+
- [x] SASS files copied to correct location
162+
- [x] Jekyll frontmatter CSS file created
163+
- [x] Calendar page loads without errors
164+
- [x] All tabs work (Calendar, CS Pathway, Issues, Threads)
165+
- [x] Event creation works
166+
- [x] Issue tracking works
167+
- [x] Theme switching works (dark/light/sepia)
168+
- [x] Watch mode works (`make watch`)
169+
- [x] Old files removed
170+
- [x] Architecture doc moved to project
171+
172+
**Migration complete and verified**
173+
174+
## Architecture Understanding
175+
176+
### Interface Layer vs. Calendar Project
177+
178+
**`_includes/calendar.html` is NOT part of this project:**
179+
- It's the **interface layer** between sprint pages and the calendar system
180+
- Lives in `_includes/` (standard Jekyll location)
181+
- Used by `_layouts/sprint.html` for "Sync to Calendar" functionality
182+
- Relationship: Sprint system → calendar.html (UI) → calendar API (this project)
183+
184+
**This project provides:**
185+
- Calendar JS modules (CalendarData, EventBuilder, CalendarApi, CalendarUI, calendar.js)
186+
- Calendar styles (SASS)
187+
- Calendar page (index.md) - main dashboard
188+
- Calendar backend integration
189+
190+
The include is a **consumer** of the calendar system, not part of it.
191+
192+
## References
193+
194+
- Project Architecture: `docs/ARCHITECTURE.md`
195+
- Project Registration: `_projects/REGISTRATION.md`
196+
- Build System: `Makefile` (root)
197+
- Agent Instructions: `AGENTS.md`

0 commit comments

Comments
 (0)