Skip to content

Conversation

@Pixel998
Copy link
Contributor

Prerequisites checklist

What is the purpose of this pull request?

This PR improves the editor’s drag-and-drop experience by eliminating overlay flicker while dragging within the editor and ensuring that dropping a file reliably inserts its content instead of triggering browser navigation.

What changes did you make? (Give an overview)

  • Stabilized drag state by tracking drag depth, handling only file drags, and resetting on drop/dragend.
  • Prevented navigation during drag/drop and simplified overlay visibility to remove flicker.

Related Issues

Fixes #128

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Aug 19, 2025
@eslintbot eslintbot added this to Triage Aug 19, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Aug 19, 2025
@netlify
Copy link

netlify bot commented Aug 19, 2025

Deploy Preview for eslint-code-explorer ready!

Name Link
🔨 Latest commit 248544f
🔍 Latest deploy log https://app.netlify.com/projects/eslint-code-explorer/deploys/68aeb5575501c20008c0a7dd
😎 Deploy Preview https://deploy-preview-129--eslint-code-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Aug 19, 2025
@lumirlumir lumirlumir requested a review from Copilot August 19, 2025 10:41
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 fixes overlay flicker during drag-and-drop operations in the editor by implementing a more robust drag state management system and preventing browser navigation during file drops.

  • Enhanced the debounce utility function to include a cancel method for cleanup
  • Implemented drag depth tracking to prevent flicker when dragging over nested elements
  • Replaced manual DOM manipulation with proper React state updates for file content insertion

Reviewed Changes

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

File Description
src/lib/utils.ts Enhanced debounce function with cancel method and improved timeout typing
src/components/editor.tsx Implemented drag depth tracking, simplified overlay logic, and improved drag-and-drop handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@nzakas nzakas moved this from Needs Triage to Implementing in Triage Aug 25, 2025
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@nzakas nzakas merged commit 8a16a78 into eslint:main Aug 27, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion bug Something isn't working contributor pool

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Bug: Editor drag-and-drop overlay flickers

3 participants