# Plugin admin button broken styling

**URL:** https://meta.discourse.org/t/plugin-admin-button-broken-styling/54719
**Category:** Development
**Created:** [December 23, 2016, 6:19pm UTC](https://meta.discourse.org/t/plugin-admin-button-broken-styling/54719 "2016-12-23T18:19:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kgish](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgish/32/121131_2.png) [@kgish](https://meta.discourse.org/u/kgish)
#### Post date: [December 23, 2016, 6:19pm UTC](https://meta.discourse.org/t/plugin-admin-button-broken-styling/54719/1 "2016-12-23T18:19:35Z")

</div>

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

![](https://global.discourse-cdn.com/meta/original/3X/0/0/000082d406c0848d5354781dc288b31dd6f227ab.png)

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

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

```

---

<div class="post-metadata">

### Author: ![kgish](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgish/32/121131_2.png) [@kgish](https://meta.discourse.org/u/kgish)
#### Post date: [December 23, 2016, 6:28pm UTC](https://meta.discourse.org/t/plugin-admin-button-broken-styling/54719/2 "2016-12-23T18:28:07Z")

</div>

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

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

```

has been changed to:

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

```

---

<div class="post-metadata">

### Author: ![kgish](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgish/32/121131_2.png) [@kgish](https://meta.discourse.org/u/kgish)
#### Post date: [December 24, 2016, 10:44am UTC](https://meta.discourse.org/t/plugin-admin-button-broken-styling/54719/3 "2016-12-24T10:44:00Z")

</div>

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:

```html
<ul><span><li><a>...</a></li></span></ul>`

```

to this:

```html
<ul><li>...</li></ul>

```

```plaintext
{{#link-to 'admin.pvda' id='admin-menu-pvda'}}
  {{i18n 'pvda.admin.menu_title'}}
{{/link-to}}

```

```javascript
 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.is("li")) {
        let span = li.parent();
        if (span.is("span")) {
          li.unwrap();
        }
      }
    }
  }
  ...
}

```

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [December 24, 2016, 1:07pm UTC](https://meta.discourse.org/t/plugin-admin-button-broken-styling/54719/4 "2016-12-24T13:07:43Z")

</div>

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

> [@Important changes to Plugin Outlets for Ember 2.10](https://meta.discourse.org/t/important-changes-to-plugin-outlets-for-ember-2-10/54136/9):
>
> Just to expand a bit, looks like if you want to set a class on wrapping component you would use: api.registerConnectorClass('user-profile-primary', 'my-connector', { setupComponent() { this.set('classNames', ['foo']); } }); With the new changes I am seeing a wrapping span @eviltrout which is a bit of a blocker for me: Outlet is defined as: {{plugin-outlet name="user-activity-bottom" connectorTagName='li' args=(hash model=model)}} Is…

---

<div class="post-metadata">

### Author: ![kgish](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgish/32/121131_2.png) [@kgish](https://meta.discourse.org/u/kgish)
#### Post date: [December 25, 2016, 12:53pm UTC](https://meta.discourse.org/t/plugin-admin-button-broken-styling/54719/5 "2016-12-25T12:53:57Z")

</div>

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