Skip to content

Deprecate Dropzone for 2.x, remove it in 3.x #2748

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

Open
Kocal opened this issue May 19, 2025 · 5 comments
Open

Deprecate Dropzone for 2.x, remove it in 3.x #2748

Kocal opened this issue May 19, 2025 · 5 comments
Milestone

Comments

@Kocal
Copy link
Member

Kocal commented May 19, 2025

For the same reasons than #2732, #2733, #2740, ...

@Kocal Kocal added this to the 3.x milestone May 19, 2025
@smnandre
Copy link
Member

To me there really is something to offer there, but not with the current version clearly.

So let's start working on the next version? @sblondeau ? :)

@Kocal Kocal changed the title Deprecate DropZone for 2.x, remove it in 3.x Deprecate Dropzone for 2.x, remove it in 3.x May 24, 2025
@Kocal
Copy link
Member Author

Kocal commented May 24, 2025

What do you have in mind? 👀

Because at the moment, Dropzone is legit only a FileType with an already configured placeholder attr and few opinionated Twig, JS and CSS code.

@smnandre
Copy link
Member

cf #2642 #2704 #2747

And it's a package used.. because a decent image upload preview is something interesting.. But if this is only JS i'm still on the same position there is no added value.

But ... if this comes with other things related to back-end, I do see the point

@Kocal
Copy link
Member Author

Kocal commented May 24, 2025

As you said in #2704 (comment), I also think providing opinionated Twig/JS/CSS code is not safe enough for us nor the user.

Maybe, instead we can provide some Twig components to let user define their own UI:

<twig:Dropzone>
    <twig:Dropzone:Preview>{# ... #}</twig:Dropzone:Preview>
    <twig:Dropzone:Upload>{# ... #}</twig:Dropzone:Upload>
</twig>

but, that also too opinionated...

When deprecating and removing this package, I had in mind to migrate it in a UX Toolkit kit, through the Recipe system:

  • bin/console ux:toolkit:install-recipe Upload
  • install a dedicated FormType, some Twig templates/components, a Stimulus Controller, and styles
  • the files mentioned above would be fully customizable (since it uses the same behavior than installing a Component from an UX Toolkit kit)

WDYT?

@smnandre
Copy link
Member

Seems a very good idea 🤝

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

No branches or pull requests

2 participants