Skip to content

Extend PR #6: Improve clip update event structure and state tracking#9

Merged
dazzatronus merged 2 commits intomainfrom
patch-1
Apr 29, 2025
Merged

Extend PR #6: Improve clip update event structure and state tracking#9
dazzatronus merged 2 commits intomainfrom
patch-1

Conversation

@dazzatronus
Copy link
Copy Markdown
Contributor

@dazzatronus dazzatronus commented Apr 29, 2025

Overview

This PR builds upon the work started in #6 by @ferozhussain, implementing a more robust event system for clip state management.

Reference

Changes

  • Clearly separated clip selection and state update events for better responsibility boundaries.
  • Introduced a clip:updated event that provides both previous and current state data in a structured format.
  • Implemented precise change detection to ensure update events are only emitted on meaningful state changes.
  • Preserved backwards compatibility with existing event handlers.

Benefits

  • More predictable and maintainable event behaviour, following industry best practices.
  • Eliminates reference-related bugs by providing deep copies of state for comparison.
  • Enables easier debugging and more reliable state management for consumers of the event system.

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