Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a jump back issue in time range components by tracking seeking time to prevent the slider from jumping back to current time while seeking is in progress.
- Adds seeking time tracking using refs in React and instance variables in HTML components
- Implements logic to use seeking time instead of current time when seek operation hasn't completed
- Updates both React and HTML implementations to maintain consistent behavior
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/react/src/components/TimeRange.tsx | Adds seeking time tracking with useRef and updates slider fill logic |
| packages/html/html/src/components/media-time-range.ts | Implements seeking time tracking and updates state management |
| packages/core/media-store/src/state-mediators/index.ts | Fixes import path for temporal module |
| packages/core/media-store/src/media-store.ts | Fixes import path for temporal module |
| packages/core/media-store/src/index.ts | Fixes export path for temporal module |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| _setState(state: any): void { | ||
| this._state = { ...this._state, ...state }; | ||
| this._update(useTimeRangeRootProps(this._state!, this), this._state!); | ||
| } |
There was a problem hiding this comment.
The parameter type any is too broad and provides no type safety. Consider defining a proper interface for the state parameter to ensure type safety and better developer experience.
| @@ -119,24 +130,32 @@ export class TimeRangeRootBase extends HTMLElement { | |||
| } | |||
|
|
|||
| _update(props: any, state: any): void { | |||
There was a problem hiding this comment.
The parameters props and state have type any which eliminates type safety. Consider defining proper interfaces for these parameters.
This change fixes the jump back to current time issue in a comparable way for React and HTML.