Upgrading Ember to 2.10

After a few stumbling blocks, I have a branch of Discourse that runs on Ember 2.4. Our goal for the next major Discourse release is to upgrade to the latest Glimmer 2 technology which has many performance improvements, and Ember 2.4 is a big step towards that.

I’ve deployed the branch here to meta Discourse, so we’d love it if you could report any issues you encounter. It would be especially helpful if plugin developers could check out the branch and try their plugins against it so that we can identify any regressions well in advance.

2.4 unfortunately has deprecations on Ember.View classes, so I will be spending the next chunk of time converting the last few Ember views to be components. So far I have been doing all the deprecation work in parallel, so it is compatible with both Ember 1.11 and Ember 2.4, but once this is done I plan to continue from 2.4 onwards in master.

Thanks for your help!

24 Likes

This is a huge chunk of work, and a big milestone (bear in mind we were stuck on Ember 1.12, released in May 2015, for a long time, and by choice). As a reminder to everyone reading this, our goal is to:

  • get to Ember 2.10 which has some substantial performance improvements

  • once we are on Ember latest, look at possible first load speedups cc @charleswalter

9 Likes

I can’t reply or navigate back to homepage using the logo, open any menus, using my iPad.

Clicking buttons gives it focus, but doesn’t invoke the action. Example: clicking Reply, makes it focused, but doesn’t open the composer.

I had to use keyboard shortcuts to get this far on the iPad… I’ve tried 6 times now, refreshing the page in hopes maybe it was some sort of blip on my end, but I don’t think it is.

Meta is simply unusable with an iPad right now, unless you have a keyboard for your iPad.

I thought @eviltrout fixed that, last I heard was “fix deploying”, try hard refresh?

Just tried, same issue. So maybe the deploy never happened?

I have the same issue on my iPad, so not an isolated cache issue

3 Likes

Huh I can confirm this is completely specific to iPad and definitely still a problem. Are our iPad hacks or iOS 10 hacks to blame @sam ?

I don’t know but iPad hacks just come in to place as soon as composer is opened.

I should have expected this would happen. The bug was a touchevent was not returning false so the event wasn’t bubbling up while the quote button was visible. In older Embers this was okay but they changed the return value from this.set so it failed.

I fixed it on iPhone but forgot it would apply when touch events were present on non mobile devices. I came up with a better fix and now it should work:

https://github.com/discourse/discourse/commit/ecb9574a324632406f968bbd34a389fa4e9624d0

5 Likes

Tags are missing at the moment:

vs:

4 Likes

I’ve found a bug (I think). Noticed when viewing something like latest that opening a topic and then returning to latest doesn’t change the text color to gray like normally happens for a read topic. Further, clicking on Latest in the top menu doesn’t resolve the issue either. I have to either 1, refresh the page from the browser, or 2, switch to another page via the top menu (new, unread, etc.) and then switch back to Latest.

2 Likes

Fixed here Sam, thanks:

https://github.com/discourse/discourse/commit/2a25136ecf4ff180ca6568e86b79065b96e3bd41

2 Likes

I can’t seem to reproduce this. You’re saying a topic is black because it has new things to read, so you catch up with the bottom of the topic, hit back and it’s still black?

My repro steps were off, sorry (I was posting from memory, there weren’t any unread topics at the time)! The issue actually occurs when I open a topic in a new tab, read to the bottom, close the tab, and then try and click Latest.

There are some unread topics now, let me take a recording to be sure I’m clear.

Edit: @eviltrout, here’s the video. (realized it didn’t record the tab area, but just believe me that I’m switching tabs)

1 Like

I just noticed this in chrome:

_ember_jquery-198d180….js:54129 Uncaught Error: Could not find module `discourse/views/topic-status` imported from `discourse/plugins/discourse-solved/discourse/initializers/extend-for-solved-button`(…)

I’ve fixed it in

https://github.com/discourse/discourse-solved/commit/952bdec9e2248f693858801113d3eb1b069083d6

Just waiting for it to “naturally” deploy to meta

6 Likes

This change is incompatible with Discourse stable:

Error: Could not find module `discourse/raw-views/topic-status` imported from `discourse/plugins/discourse-solved/discourse/initializers/extend-for-solved-button`

Shouldn’t plugins also follow the latest/beta/stable scheme? Or is there a way to checkout a specific revision?

4 Likes

I’ve reverted that change, and instead added support to our loader in master to mark the old path as deprecated.

When the raw-views change has been merged into stable, we can update the plugin too.

Having said that, I have seen that some plugins do have branches to pin them to various discourse versions and I think that’s a good idea to prevent breakages.

3 Likes

I’ve been doing that when things break due to things moving around. I’ll tag the plugin’s current state, so older Discourse instances can reference that, and I’ll continue support latest on the master branch.

Saves me the headache of having to figure out how to support both.

I also had time to rework all of my plugins to work with Ember 2.4, I had a few issues I had to work out in them.

One thing I need to work on, is figuring out a way to let the branch identify which version of Discourse it works with. As right now, I couldn’t easily tell you which tags/branches go to which versions of Discourse. :frowning:

4 Likes

I was seeing issues with reset password.

I think that as soon as you hit rate limits we don’t show errors so it looks broken.

Was seeing


"_ember_jquery-63dfbe3….js:31194TypeError: Cannot read property 'errors' of undefined"
 var fail = function (e) {
            self.flash(e.responseJSON.errors[0], 'error');
          };

so maybe somehow responseJSON is not getting a error now

2 Likes