Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat Entire Sidebar as Drop Zone #577

Closed
curran opened this issue Mar 11, 2024 · 1 comment
Closed

Treat Entire Sidebar as Drop Zone #577

curran opened this issue Mar 11, 2024 · 1 comment
Assignees

Comments

@curran
Copy link
Contributor

curran commented Mar 11, 2024

Following https://github.com/vizhub-core/vzcode/pull/575/files, I think it would make sense to treat the entire sidebar as the drop zone, rather than have a specific drop zone called out in the UI. I think that would be cleaner in terms of UI, and also that's what other editors like VSCode do.

image

The drop zone callout in the UI is good in a way, because it makes the feature discoverable, but my preference would be to keep the UI clean, and use the entire sidebar as the drop zone. It should be possible to do this by migrating DragAndDrop from a React component to a custom hook, maybe called useDragAndDrop, which would return the things used here:

      className={`drop-zone ${isDragOver ? 'dragover' : ''}`}
      onDragEnter={handleDragEnter}
      onDragOver={handleDragOver}
      onDragLeave={handleDragLeave}
      onDrop={handleDrop}

then those props could be applied to the sidebar itself. I do like the dragover style - that could apply to the entire sidebar.

@curran
Copy link
Contributor Author

curran commented Mar 23, 2024

Done in #587

@curran curran closed this as completed Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants