Upgrading Ember to 2.10

Ember 2.10 is in at last!

9 Likes

This bug/issue is back after upgrading to Ember 2.10. With the revert it was gone.

I can repro that (and the table misalignment bug) on my instances @eviltrout

1 Like

This upgrade seems to have broken https://github.com/techAPJ/discourse-topic-group-button again @techAPJ (Sorry)

I’ve fixed the plugin for the new connector API but you’ll want to update your discourse to point at this new repo location instead.

edit: replied to wrong person, was meant for @carlokok

4 Likes

It seems raw templates in plugins are being registered with javascripts/ in front of their name. This is what Discourse.RAW_TEMPLATES looks like when I run Topic List Previews.

This means that existing templates are not being overridden. And that new plugin templates cannot be (easily) used.

It is possible to reopen the relevant class and update the buildBuffer method, e.g.

      buildBuffer(buffer) {
        const template = findRawTemplate('javascripts/list/topic-list-item');
        if (template) {
          buffer.push(template(this));
        }
      },

This works, but is not ideal. In terms of referencing my own raw templates, I tried just including javascripts/ e.g.

{{raw "javascripts/list/topic-thumbnail"}}

However this was parsed as:

1 Like

I’ve fixed the docker_manager issue:

https://github.com/discourse/discourse/commit/16b236899c11977f73fbe851ae04d863179a9565

4 Likes

This commit should help with that:

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

5 Likes

Thanks! I’ve got TLP working again with this. This fix works well for template helpers, i.e. I can now just use {{raw "list/topic-thumbnail"}}, however, I still need to override buildBuffer to use javascripts/list/topic-list-item instead of list/topic-list-item (see here). Easy enough to do. Will this be the standard going forward, or a temporary measure?

1 Like

Aha, in that case perhaps we just prioritize javascripts/ for raw templates:

https://github.com/discourse/discourse/commit/1be800b673dc9b42e6ae0767971a6c2d8e096df7

I think with that it should work without overriding it.

7 Likes

Yup, that did it :slight_smile: Thanks.

1 Like

I should have thought of it at the time, but the raw mobile templates added from plugins need the same treatment. I’ve made a PR to that effect.

https://github.com/discourse/discourse/pull/4620

11 Likes