Plugin admin button broken styling

(Kgish) #1

Since the latest upgrade, my plugin button in the admin dashboard menu has lost the correct styling, as you can see here:

My /connectors/admin-menu/app-admin-connector.hbs template looks like this:

{{#link-to 'admin.pvda'}}{{i18n 'pvda.admin.menu_title'}}{{/link-to}}

(Kgish) #2

I see that in the file app/assets/javascripts/admin/templates/admin.hbs the line:

{{plugin-outlet "admin-menu" tagName="li"}}

has been changed to:

{{plugin-outlet name="admin-menu" connectorTagName="li"}}

(Kgish) #3

For those interested, this is my workaround until someone from the Discourse team fixes it.

Basically I need to unwrap the stuff inside the span like this:


to this:

{{#link-to 'admin.pvda' id='admin-menu-pvda'}}
  {{i18n 'pvda.admin.menu_title'}}
 api.onPageChange((url, title) => {

  // --- ADMIN PAGE --- //
  if (/\/admin\//.test(url)) {
    // Admin pages start with "/admin/*"
    let sel = '#admin-menu-pvda',
         pvda_menu_item = $(sel);
    if (pvda_menu_item.length) {
      let li = pvda_menu_item.parent();
      if ("li")) {
        let span = li.parent();
        if ("span")) {

(cpradio) #4

I think this is related to something @sam uncovered recently too

(Kgish) #5

Yes, it’d be very nice if we could get this fixed.