sukima / ember-cli-select-picker

An enhanced Boostrap styled select component addon for Ember CLI
https://sukima.github.io/ember-cli-select-picker
MIT License
23 stars 15 forks source link

fix bind-attr and action-on-focus deprecations #31

Open Awem opened 9 years ago

Awem commented 9 years ago

This is suppossed to fix a few deprecations with latest Ember (CLI). There is still the view "select" deprecation left, which requires more refactoring (see http://emberjs.com/deprecations/v1.x/#toc_ember-select). Maybe solve this in the scope of #30?

The problem with my PR is, that it causes parsing errors (Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED' ....) on elements that appear perfectly fine. I thought maybe updating this addon's Ember might solve this, but this isn't the case. So I think this is a bug with htmlbars or do you have an idea? Nevertheless, I will submit a PR for updating Ember in case you might want it.

Awem commented 9 years ago

You can see the parse error at the Travis CI build. I have no idea what is wrong.

sukima commented 9 years ago

I think it you fix the above syntax error that this should be the first merge. The other PRs are going to need more investigation.

Our company Ember App is also going to need a upgrade so I anticipate having more eyes on this projects upgrade in the near future.

Awem commented 9 years ago

Those failing tests will pass on Ember 1.11.

sukima commented 9 years ago

Oh. I get it. Ember 1.10 doesn't support HTMLBars while 1.11 and up does. And so the bind-attr is still required. seems like we should drop < 1.11 support.

Awem commented 9 years ago

Yes, that would mean Ember CLI 0.2.2+. That version was released on March 30th. I guess it is reasonable to depend on that by now.

Panman82 commented 9 years ago

+1 on this PR. Most addons are indicating which version to use with ember. Eg: ember <= 1.10 use version 1.4.2, ember >= 1.11 use version 1.5+

Also, there are a few places where @each will need to be changed to []. Could be a separate PR or incorporated here IMO.

sukima commented 9 years ago

As Ember approaches 2.0 the views will be removed. Eventually the {{select}} helper will be completely refactored. I think it might be worth look at if it is even needed. Maybe have it make it's own on small screen sizes and avoid it completely on desktop. I think the dependency on ember's {{select}} is a source of pain. Can it be removed?

As I have time to work on this plugin I'll leave the 1.x.x versions as old code supporting ember <= 1.10 while the 2.x.x or above is for ember >= 1.13

Awem commented 9 years ago

{{select}} can certainly be removed. E.g. you could write your own implementation of html's <select> tag or utilize https://github.com/thefrontside/emberx-select.

sukima commented 9 years ago

@AW-UC, Exactly, making our own <select> is the way forward.