p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Drag n drop

Open mhsh312 opened this issue 1 year ago • 3 comments

Fixes #1417

Changes:

  • Added Drap and Drop functionality to transfer files among folders in the Sidebar
  • Also supports transferring one folder into another folder

Ui Changes:

Redux Changes:

  • Made a new reducer changeParent
  • Added actions and constants to facilitate said reducer
  • Made it so that the changes done in the UI reflects in the file state

Saving the sketch reflects the state changes in the database as well.

https://github.com/processing/p5.js-web-editor/assets/135870090/e25e6779-a484-457e-a00a-d25bb924bdd1

I have verified that this pull request:

  • [x] has no linting errors (npm run lint)
  • [x] has no test errors (npm run test)
  • [x] is from a uniquely-named feature branch and is up to date with the develop branch.
  • [x] is descriptively named and links to an issue number, i.e. Fixes #123

mhsh312 avatar Feb 08 '24 15:02 mhsh312

This is a bummer and I wonder if we want to convert the FileNode first? There’s definitely an open PR for that, though I recall that it had a minor issue with the dropdown.

I have adjustments that I would want to make here but I’m on vacation this weekend so I’ll get back to you with more details later.

lindapaiste avatar Feb 09 '24 18:02 lindapaiste

I wonder if we want to convert the FileNode first?

That is definitely the way to go. This way we can take advantage of all the little developer experience features of react dnd as well. This will also fix the issue you talked about in the commit comment as well, since all the styling will be handled differently in react-dnd. It'll also make it eaiser for everyone if in the future the dnd implementation has to be improved upon or modified.

And I'd be down to work on this feature with react-dnd and other modifications after the FileNode has been updated. Till then enjoy your vacation :)

mhsh312 avatar Feb 09 '24 19:02 mhsh312

@lindapaiste can i take the issue of converting to functional components(covert to FileNode)

This is a bummer and I wonder if we want to convert the FileNode first? There’s definitely an open PR for that, though I recall that it had a minor issue with the dropdown.

I have adjustments that I would want to make here but I’m on vacation this weekend so I’ll get back to you with more details later.

RAHULDAS6009 avatar May 27 '24 17:05 RAHULDAS6009

Since it's been a while since this PR has been last active, I'm going to close this for now. I'm sorry that we couldn't get this in, but please feel free to revisit this issue!

raclim avatar Mar 04 '25 01:03 raclim