Skip to content

Modernize codebase#6

Merged
danagerous merged 7 commits intodevfrom
claude/code-rewrite-workflow-01DQ3qAxcVB9qFAyDhjZ4cfD
Nov 22, 2025
Merged

Modernize codebase#6
danagerous merged 7 commits intodevfrom
claude/code-rewrite-workflow-01DQ3qAxcVB9qFAyDhjZ4cfD

Conversation

@danagerous
Copy link
Owner

No description provided.

Major refactoring to modernize the school catchment map application:

HTML Changes:
- Upgraded from Bootstrap 3 to Bootstrap 5
- Replaced jasny-bootstrap with native Bootstrap 5 offcanvas
- Removed jQuery UI dependencies
- Updated to latest Leaflet (1.9.4) and related libraries
- Improved semantic HTML structure
- Added proper ARIA labels and accessibility attributes
- Replaced Glyphicons with inline SVG icons
- Cleaner modal and navigation markup

JavaScript Changes:
- Complete removal of jQuery dependencies
- Migrated to modern ES6+ syntax (const/let, arrow functions, async/await)
- Replaced $.ajax with native fetch API
- Implemented custom autocomplete without jQuery UI
- Better code organization with clear sections and JSDoc comments
- Centralized configuration in CONFIG object
- Proper state management with AppState object
- Enhanced error handling throughout
- Debounced autocomplete for better performance
- Keyboard navigation support for autocomplete (arrow keys, Enter, Escape)
- Better separation of concerns (init, events, data loading)

CSS Changes:
- Updated for Bootstrap 5 compatibility
- Reorganized with clear section headers
- Improved autocomplete dropdown styling
- Better responsive design for all screen sizes
- Enhanced offcanvas behavior on desktop (always visible sidebar)
- Added print styles
- Removed unused/redundant styles
- Better Leaflet control positioning
- Improved form control styling

Benefits:
- No jQuery dependency (smaller bundle size, better performance)
- Modern JavaScript patterns (easier to maintain and extend)
- Better error handling and user feedback
- Improved accessibility
- Cleaner, more maintainable code structure
- Updated to current library versions with security patches
- Better mobile/desktop responsive behavior
- Add fill color to SVG icons in search buttons (magnifying glass and X)
- Hide offcanvas close button on desktop mode (992px+) where sidebar is permanent
- Improve icon hover state for better UX
- Extend filter menu to bottom of viewport (bottom: 0 instead of bottom: 56px)
- Fix search button icon visibility by setting explicit color on btn-outline-secondary
- Add hover styles for search buttons for better UX
- Ensure map container doesn't have extra padding on desktop
- Reorder extra large screen styles for consistency
- Change from padding-right to margin-right on .container-map to properly offset map from filter menu
- Ensures Leaflet attribution (including "contributors" text) is fully visible
- Add white background to search buttons instead of transparent
- Add border-color to match Bootstrap outline-secondary style
- Explicitly set offcanvas width in media query for consistency
- Position Leaflet bottom-right controls (attribution) away from filter menu
- Set right: 310px on desktop (300px sidebar + 10px spacing)
- Set right: 360px on extra large screens (350px sidebar + 10px spacing)
- Ensures "OpenStreetMap contributors" text is fully visible
Add margin-bottom of 45px and margin-left of 10px to ensure the Leaflet
attribution has proper spacing from the bottom navbar and left edge.
Change .leaflet-bottom.leaflet-right from 310px/360px back to 45px
for both desktop and extra large screen media queries.
@danagerous danagerous changed the base branch from master to dev November 22, 2025 23:20
@danagerous danagerous merged commit 16f589b into dev Nov 22, 2025
3 checks passed
@danagerous danagerous deleted the claude/code-rewrite-workflow-01DQ3qAxcVB9qFAyDhjZ4cfD branch November 22, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants