Description
Implement scroll depth tracking plugin with industry-standard capabilities.
Tasks
- Research implementation (thresholds, scroll calc, throttling)
- Design API (thresholds, throttle, viewport height)
- Implement scroll percentage calculation
- Add throttled scroll listener
- Support multiple thresholds
- Emit trigger:scrollDepth events
- Write comprehensive tests (>80% coverage)
Acceptance Criteria
- Tracks scroll percentage accurately
- Throttling works (100ms default)
- Multiple thresholds supported
- Events emitted with correct data
- API: getMaxPercent(), getCurrentPercent(), reset()
- Handles dynamic content height changes
- No memory leaks
-
80% test coverage
Reference
- specs/phase-1-display-conditions/plan.md (Plugin 2)
- specs/phase-1-display-conditions/tasks.md (Tasks 3-5)
Description
Implement scroll depth tracking plugin with industry-standard capabilities.
Tasks
Acceptance Criteria
Reference