# Two new plugin outlets - user\_activity\_bottom and user\_menu\_glyphs

**URL:** https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227
**Category:** Feature
**Created:** [February 26, 2016, 1:57pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227 "2016-02-26T13:57:34Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [February 26, 2016, 1:57pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/1 "2016-02-26T13:57:34Z")

</div>

In the midst of working on the [voting plugin](https://meta.discourse.org/t/discourse-feature-voting/40121), I had an idea for a way to show users the topics they’ve voted on. To keep with the current UX, I’d like to add another feed at the bottom of the user activity menu. This would be similar to Bookmarks.

 ![](https://global.discourse-cdn.com/meta/original/3X/7/a/7a0c93a06cb3a74081d3c1692b54d35635446e46.png)

At the same time, if we make that option available, it would make sense from a users standpoint to put another glyph in the user menu to go alongside.

 ![](https://global.discourse-cdn.com/meta/original/3X/b/2/b201447ac1e6e455ea6107578fc23cb42b15e896.png)

From what I can tell, this would require the addition of two plugin outlets. I’d be more than willing to create the PRs for these, but is there support for these? Would anyone else have an interest in them?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 26, 2016, 7:06pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/2 "2016-02-26T19:06:39Z")

</div>

I’m not sure what you mean by `user_menu_glyphs` as a plugin-outlet.

Font Awesome glyphs can be specified in the hbs files eg.

```plaintext
<i class="fa fa-[icon name of your choice here]"></i>

```

---

<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: [February 26, 2016, 7:11pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/3 "2016-02-26T19:11:05Z")

</div>

He is talking about a way to add a glyph in that menu. Currently, you’d have to overwrite the entire template.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [February 26, 2016, 7:31pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/4 "2016-02-26T19:31:47Z")

</div>

> [@cpradio](#):
>
> He is talking about a way to add a glyph in that menu.

What he said. 😉

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 26, 2016, 7:36pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/5 "2016-02-26T19:36:45Z")

</div>

I may need more coffee but I’m still not getting where a `user_menu_glyphs` plugin-outlet would go.

```plaintext
    {{#if showBookmarks}}
    <li>
      {{#link-to 'userActivity.bookmarks'}}
        <i class="glyph fa fa-bookmark"></i>{{i18n 'user_action_groups.3'}}
      {{/link-to}}
    </li>
    {{/if}}
  </ul>

  {{#if viewingSelf}}
    <div class='user-archive'>
      {{d-button action="exportUserArchive" label="user.download_archive" icon="download"}}
    </div>
  {{/if}}

</section>

```

I’m seeing CSS rules for `.glyph`  
`display: none;` and `position: absolute;`

Maybe CSS to restore them?

 ![](https://global.discourse-cdn.com/meta/original/3X/d/f/df30fbd1d7a52a04dafbf8df56ebfedcefd8ca04.png)

---

<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: [February 26, 2016, 7:39pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/6 "2016-02-26T19:39:55Z")

</div>

Just for the record, I liked the initial post because I’m in support for this. I could see multiple ways of utilizing those locations. Private Profile Notes, for example, would benefit from the outlet on the User Page.

@Mittineague, above the `{{#if viewingSelf}}` on the user page, and before bookmarks on the user menu (or after depending if the CSS is using floats).

So there would be two outlets, one specifically for the User Page and one specifically for adding an icon/glyph only link on the User Menu.

User Page Location:  
[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/user/activity.hbs#L28-L32](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/user/activity.hbs#L28-L32)

User Menu Location:  
[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/components/user-menu.hbs#L11-L20](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/components/user-menu.hbs#L11-L20)

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [February 26, 2016, 7:53pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/7 "2016-02-26T19:53:38Z")

</div>

> [@cpradio](#):
>
> Just for the record, I liked the initial post because I’m in support for this.

I typically assume that when I ask a question about functionality that people who like it are in support of it. I suppose the voting plugin that sparked this question would eventually help with that. But now we’re getting a bit too meta. 😉

> [@cpradio](#):
>
> So there would be two outlets, one specifically for the User Page and one specifically for adding an icon/glyph only link on the User Menu.  
> [/quote][quote=“Mittineague, post:5, topic:40227”]  
> I may need more coffee but I’m still not getting where a user\_menu\_glyphs plugin-outlet would go.

Here’s what I would propose. For **user\_activity\_bottom** , it should go after the bookmarks link. That means it would go directly **before** the highlighted line:

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/user/activity.hbs#L26](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/user/activity.hbs#L26)

And for **user\_menu\_glyphs** , it should be before the other glyphs in the menu. I wouldn’t want to disrupt the current expectation for menu items. That means it would go **before** this line:

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/components/user-menu.hbs#L12](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/components/user-menu.hbs#L12)

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 26, 2016, 8:03pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/8 "2016-02-26T20:03:24Z")

</div>

Ah, OK, thanks for being patient, I got it now (I was misconstruing “user\_menu” to mean “activity\_menu” despite the screen shot plain as day) .  
lol, I’ve aslo had a couple more cups of coffee

And I agree both of these could come in handy

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [February 26, 2016, 8:05pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/9 "2016-02-26T20:05:33Z")

</div>

Since there’s a bit of interest shown:

[https://github.com/discourse/discourse/pull/4043](https://github.com/discourse/discourse/pull/4043)

[https://github.com/discourse/discourse/pull/4044](https://github.com/discourse/discourse/pull/4044)

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 26, 2016, 8:41pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/10 "2016-02-26T20:41:21Z")

</div>

Looking I’m wondering if a third would be in order.

The user.hbs already has two plugin-outlets - “primary” and “secondary” - but maybe another in the “user-nav”?

The only negative I can think of is that it could make things a bit cramped.

```plaintext
      {{#if model.can_edit}}
        <li>{{#link-to 'preferences'}}{{fa-icon "cog"}}{{i18n 'user.preferences'}}{{/link-to}}</li>
      {{/if}}
{{here ?}}
    </ul>

```

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [February 26, 2016, 8:47pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/11 "2016-02-26T20:47:37Z")

</div>

Do you have a use case for that one? I’m not objecting. I’m just curious what would go there. It might be overkill.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 26, 2016, 8:57pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/12 "2016-02-26T20:57:35Z")

</div>

No, I don’t have a use for it (not yet anyway).  
And the “secondary” would work in a pinch I guess.  
And having both would likely be over-kill.

I guess what I missing is understanding the “semantics” of one over the other.

 ![](https://global.discourse-cdn.com/meta/original/3X/3/d/3d378cf3f1a22634b1df8c583029b589df85cec0.PNG)

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [February 26, 2016, 9:07pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/13 "2016-02-26T21:07:03Z")

</div>

Now that I’m looking at it, the user-nav seems to be geared towards information about the user and the other about topics. I could see the desire for both.

The UX designer in me starts to wonder about placement though. Summaries and preferences are typically at the beginning or end of lists. Would it make more sense to put it between Badges and Summary?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 26, 2016, 9:29pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/14 "2016-02-26T21:29:40Z")

</div>

> [@joebuhlig](#):
>
> Would it make more sense to put it between Badges and Summary?

Yes, I think it would make more sense there.  
But I’m thinking too that it might be foolish to start adding plugin-outlets before there is an actual call for them to be there.

It seems a bit odd that the user\_menu has “bookmarks”, “messages” and “preferences” together.  
Yet on the Activity page they are in different places.

Decisions, decisions.

I guess in your use - Voting - they are to do with posts so the user\_activity\_bottom does feel like the better choice.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [February 26, 2016, 9:35pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/15 "2016-02-26T21:35:42Z")

</div>

> [@Mittineague](#):
>
> But I’m thinking too that it might be foolish to start adding plugin-outlets before there is an actual call for them to be there.

Agreed. I’m willing to sit on this until someone calls for it.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [February 27, 2016, 1:02pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/16 "2016-02-27T13:02:47Z")

</div>

Sam had a good question on GitHub about the user-menu-glyphs add. What happens when there is a long username like “WWWWWWWWWWWWW”. I used that username in the DOM and this is what it looks like before the extra glyph:

 ![](https://global.discourse-cdn.com/meta/original/3X/1/4/1400021256ef00e4093de769770555e3bb5d4dd9.png)

If you add a glyph to the list with the same username:

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

However, changing the padding on the a tags in that menu from 0.5em to 0.4em makes it look like this:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/3/23723d5a5b8df4d954e2aa6c9d7b427c2f79a67d.png)

There’s a little difference in spacing between icons and I’m not sure I like making things tighter than they already are. I currently don’t have a solution in mind otherwise.

---

<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: [February 27, 2016, 1:10pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/17 "2016-02-27T13:10:48Z")

</div>

Yeah, that’s going to be a problem regardless, though I don’t see a lot of people tying into that specific spot (although it’d be cool). One alternative, is to force the outlet to be below the current glyphs, so those who do choose to, know they are going to be extending that user menu.

That also means anyone without any said plugins then wouldn’t get that extra hit.

Something like

```plaintext
      <li class='glyphs'>
        {{d-link path=bookmarksPath title="user.bookmarks" icon="bookmark"}}
        {{#if siteSettings.enable_private_messages}}
          {{d-link path=messagesPath title="user.private_messages" icon="envelope"}}
        {{/if}}
        {{#if showEnableAnon}}
          {{d-link action="toggleAnon" title="switch_to_anon" icon="user-secret"}}
        {{/if}}
        {{d-link path=preferencesPath title="user.preferences" icon="gear"}}
        <div class="glyph-outlet">{{plugin-outlet "user-menu-glyphs"}}</div>
      </li>

```

Which producces

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

And this way, it is only instances that install plugins that add said glyph that would get this behavior, but at least it can easily support 3 of them.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [February 27, 2016, 1:33pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/18 "2016-02-27T13:33:49Z")

</div>

The more I look at this, the more I think we should skip it. It looks pretty tacky with an extra row when it appears that it will fit with the others. And if we shrink the padding in the main row, it only allows for one extra glyph. That means plugins could create issues with each other.

And if we think about it, the three glyphs that are there don’t cover all the options from the user activity page anyway. They are simply the most common (and standard) links. I’m not sure many plugins will hit that status. As much as I’d like to think the voting plugin is that important, it’s likely not to the majority of users. One extra click from the activity page isn’t a big deal.

Sam already merged the PR for user-activity-bottom. I’m going to run with that for now and if we can find a better way in the user menu, I’ll jump on it. But I’m not sure it’s worth it.

---

<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: [February 27, 2016, 1:37pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/19 "2016-02-27T13:37:15Z")

</div>

That’s cool. As I don’t have an immediate need for it right this moment either. 🙂

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 27, 2016, 4:51pm UTC](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227/20 "2016-02-27T16:51:40Z")

</div>

> [@joebuhlig](#):
>
> the three glyphs that are there don’t cover all the options from the user activity page anyway

IIRC when that UI was being reworked there was some concern about limited real estate and a desire to have things minimal.

Also, care must be taken with styling to avoid touch area problems.

[Next page](https://meta.discourse.org/t/two-new-plugin-outlets-user-activity-bottom-and-user-menu-glyphs/40227.md?page=2)
