It’s looking rad! I reviewed the code locally and here are some notes:
d-editor.js.es6
You should declareemojiPickerIsActive: falseat the top of the component. Javascript is a lot faster when it knows the shape of objects in advance.
emoji-picker.js.es6
-
resolveTemplatecalls should not happen in the main scope of the file. This might lead to confusing results when the resolver/app has not booted properly, or if a plugin wants to change something after you’ve already looked it up. I’d recommend instead looking up the template when you need it. -
There are a bunch of constants that seem to be exported just so the acceptance test can clear them out. Instead, why not export a method calledresetCachethat will do the clearing? That way the test doesn’t need to know how the component is implemented. Also, exporting less things is generally better. -
We discussed this briefly, but is there any way the
@observescan be replaced with callbacks from the ember component lifecycle? If not that’s cool, I just want to know if you looked into it. -
Why does_laterexist and avoid doing async work in testing? Also, I suspectlateris the wrong callback here. Perhaps you wantEmber.run.scheduleOnce('afterRender', ...)? -
unbindEventsseems to be doing a lot less thanbindEvents– are we sure every event has been removed?
emoji-picker-raw.hbs.erb
If you useEmoji.url_forin the template, doesn’t that bake the current emoji set into the template? What happens if the emoji set changes and the template has already been baked like in production mode? I guess what I’m asking here is are we sure that changing the emoji set still works in production mode with this code?