Wildhoney / EmberDroplet

Ember.js HTML5 file uploading with drag & drop and image/file preview.
http://ember-droplet.herokuapp.com/
MIT License
197 stars 31 forks source link

Possible to wrap into Component instead of view for the example? #74

Closed kithokit closed 9 years ago

Wildhoney commented 9 years ago

Good idea! Is this something you could take a look at, and open a pull request with, please?

g-cassie commented 9 years ago

@Wildhoney I'm just taking a look at this for my own project and there doesn't seem to be a simple path forward. You can use the DropletController mixin in a component. The problem is that DropletView expects certain properties to be stored on its controller. I haven't experimented with anything yet but my initial instinct is to pull the functionality of DropletView into a mixin. We can then provide DropletView and DropletComponent with substantially the same functionality.

I think it will be important to do something because best practice as broadcasted from the Ember core team seems to be to stop using views and controllers and instead just use components.

I would be happy to submit a PR to get this going but I don't think the changes would be trivial. Let me know if you are open to this approach and I can proceed with a first cut at this.

tibotiber commented 9 years ago

I'm very interested in this too. It seems inevitable to keep EmberDroplet relevant... Has anyone made progress on the topic?

Wildhoney commented 9 years ago

Agreed that we need to first place this into an Ember.Mixin and then we can use it in an Ember.Component and an Ember.View for backwards compatibility. It's on my list of todos :+1:

e00dan commented 9 years ago

I think EmberDroplet should follow example of other Ember addons - you should support older versions of Ember only until some point, which would be marked as release. I'm writing this because Ember.CoreView, Ember.View, Ember.ContainerView and Ember.CollectionView will be dropped in Ember 2.0 and raise deprecations in Ember 1.13. This addon is very good and it would be nice if it would take component approach when 2.0 becomes stable release. Good luck with project.

devlo commented 9 years ago

As @Kuzirashi said, views will be dropped in Ember 2.0 which will arrive soon, any plans for migrating to component ? It's important question for anyone that is using 1.13 and have plans to upgrade to 2.0.

Wildhoney commented 9 years ago

I'll move it over to an Ember.Component once I find the time :+1: It's definitely on the cards, and I know how to implement it.

devlo commented 9 years ago

Good to know, i hope it will arrive before/around the time 2.0 will come. Thx for your work.

Wildhoney commented 9 years ago

See PR which will be merged soon :+1: If you have any comments, please post them in the PR.