Skip to content

Modernize timeline JavaScript to ES6+ syntax#595

Merged
yepzdk merged 2 commits intofeature/timeline-conversion2from
feature/timeline-js-optimization
Jan 23, 2026
Merged

Modernize timeline JavaScript to ES6+ syntax#595
yepzdk merged 2 commits intofeature/timeline-conversion2from
feature/timeline-js-optimization

Conversation

@yepzdk
Copy link
Copy Markdown
Contributor

@yepzdk yepzdk commented Jan 22, 2026

Summary

  • Converted all var declarations to const/let
  • Replaced function() callbacks with arrow functions
  • Used template literals instead of string concatenation
  • Extracted magic numbers to named constants (SWIPE_THRESHOLD, OBSERVER_ROOT_MARGIN, CAROUSEL_SLIDE_PERCENT)
  • Applied optional chaining (?.) for null-safe method calls
  • Used destructuring for cleaner property access
  • Used shorthand method syntax in Drupal behavior object

Test plan

  • Verify timeline loads correctly on project pages
  • Test view toggle between vertical and horizontal modes
  • Test carousel navigation (prev/next buttons)
  • Test touch/swipe navigation on mobile
  • Test keyboard navigation (arrow keys)
  • Verify mini-nav scroll tracking works
  • Verify mini-nav click navigation works

🤖 Generated with Claude Code

yepzdk and others added 2 commits January 22, 2026 12:26
- Converted var declarations to const/let
- Replaced function callbacks with arrow functions
- Used template literals for string interpolation
- Extracted magic numbers to named constants (SWIPE_THRESHOLD, etc.)
- Applied optional chaining for null checks
- Used destructuring for cleaner property access
- Used shorthand method syntax in Drupal behavior

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Standardized quote style to double quotes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@yepzdk yepzdk requested a review from martinyde January 22, 2026 13:11
@yepzdk yepzdk merged commit 520fd6f into feature/timeline-conversion2 Jan 23, 2026
16 of 21 checks passed
@yepzdk yepzdk deleted the feature/timeline-js-optimization branch January 23, 2026 11:28
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