Beginner's Guide to Creating Discourse Plugins Part 5: Admin Interfaces

Just so I can update the original post, what steps were required to fix this tutorial?

If it was what I said, then no changes, other than maybe a message to say how important it is that file names are exactly correct

I don’t know how far things should go for teaching prerequisite “basic knowledge”. But I think a lot of the troubles are when it is not only the first Discourse plugin but also an early venture into Ruby / Ember

That is, an unfamiliarity with the conventions that do “magic”. When structure and naming look like arbitrary is OK but it isn’t it can be a pain to figure out what’s wrong.

The “this can be whatever, this must be” stuff.


Work for me!

1. Code

2. Result


Glad it worked, but It is always better to post code than pictures of code.


Thanks for reply
original post have all these code,
it’s not necessary for me to post code again.

The purpose of these picture is to show it work, give viewer a big picture view
(not for viewer to copy&paste)
(code in code editor have nicer code highlight)

If anyone runs into a testing error, I had to add id="show-tentacle" to the button component to get the tests to pass in part 6 of the tutorial:

<div class="buttons">
  {{d-button label="" action="showTentacle" icon="eye" id="show-tentacle"}}

I found the Ember routing didn’t work until I commented out path: '/plugins' in the route-map file:

export default {
  resource: 'admin.adminPlugins',
  // path: '/plugins',
  map () {

For some reason Ember was expecting a route at adminPlugins/watch-mute not at adminPlugins/plugins/watch-mute. Is this something I did wrong upstream in the routing call chain, or has something changed in the way Discourse/Ember handles these?