ember-cli-materialize icon indicating copy to clipboard operation
ember-cli-materialize copied to clipboard

Ember 3 support

Open cimtico opened this issue 6 years ago • 4 comments

Would it be possible to get ember 3 support? I'm getting this error when attempting to use a modal:

keyboard.js:19 Uncaught TypeError: priorityLevel.contains is not a function at Class.activate (keyboard.js:19) at Class._activateKeyboard (ember-keyboard.js:21) at sendEvent (ember-metal.js:246) at new Class (core_object.js:149) at Function._ClassMixinProps.create (core_object.js:297) at FactoryManager.create (container.js:424) at CurlyComponentManager.create (ember-glimmer.js:4178)

cimtico avatar Apr 25 '18 04:04 cimtico

I would love to work on this library so that it works with that latest versions of ember and materialize. However, I have not had any time lately :( and I don't think that @mike-north has either, sorry. Stay-tuned or feel free to submit a PR.

jacobq avatar Apr 25 '18 15:04 jacobq

Here there been any progress on this particular issue?

ErvinSabic avatar Mar 22 '20 00:03 ErvinSabic

Here there been any progress on this particular issue?

Unfortunately, I doubt it. A while back I endeavored to re-write/update this addon to work with Materialize 1.x, but I abandoned that effort not too long afterward and just used materialize w/o an addon (made my own components as needed for the app I was making). If I could convince my employer to let me spend paid time on it, I'd totally try again, but right now it's not even on my list, sorry. Maybe @mike-north will give it a reboot? I think since ember-paper is meeting most people's needs there isn't a lot of motivation to make a modern Ember (e.g. Octane style) addon for materialize-css.

jacobq avatar Mar 22 '20 17:03 jacobq

While it may not be Octane style it is possible to get this to WORK. If you either delete the deprecated components entirely or fix the messages so they are compliant with the new system. This would be anything that starts with "materialize-". The deprecation message fix would make the deprecation calls in those files look like this:

materialize-select.js for example...

import { deprecate } from '@ember/debug/deprecations';
import materializeSelect from './md-select';

export default materializeSelect.extend({
  init() {
    this._super(...arguments);
    deprecate('{{materialize-select}} has been deprecated. Please use {{md-select}} instead', false, {
      id: 'materialize.deprecate.octane',
      until: '3.0',
      url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
    });
  }
});

This will make it USABLE but you will get other deprecation warnings. As you continue to use the components. Particularly with jQuery and how this library calls it. I think this could be turned into some Octane components but I literally just moved over from using mostly handlebars so octane is going to take some getting used to before I can tackle something like this.

ErvinSabic avatar Mar 22 '20 19:03 ErvinSabic