Skip to content

Conversation

@Elessar1802
Copy link
Contributor

  • fix: bound movement of draggable to screen
  • chore: rm file from eslintignore

Copilot AI review requested due to automatic review settings December 19, 2025 10:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the DraggableWrapper component to use native bounds constraint from the react-draggable library instead of custom boundary checking logic. The changes improve the positioning system by using screen-absolute coordinates instead of parent-relative positioning, and delegate boundary enforcement to the library's built-in bounds prop.

Key Changes:

  • Replaced controlled position state with defaultPosition and native bounds prop for boundary constraints
  • Refactored position calculations to use screen coordinates instead of parent-relative offsets
  • Removed deprecated layoutFixDelta parameter from the component API

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/Common/DraggableWrapper/types.ts Removed deprecated layoutFixDelta property from DraggableWrapperProps interface
src/Common/DraggableWrapper/DraggableWrapper.tsx Refactored to use defaultPosition with bounds constraint, simplified position calculations for screen coordinates, and added visibility handling for initial render
.eslintignore Removed DraggableWrapper.tsx from ESLint ignore list to enable linting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

AbhishekA1509
AbhishekA1509 previously approved these changes Dec 23, 2025
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.

4 participants