2016-11-17 23:16:29 +01:00
|
|
|
<li data-user-id="{{user_id}}" class="user_sidebar_entry {{#if num_unread}}user-with-count {{/if}}narrow-filter user_{{type}}">
|
2016-01-19 21:03:56 +01:00
|
|
|
<span class="selectable_sidebar_block{{#if mobile}}{{/if}}">
|
|
|
|
<span class="user-status-indicator"></span>
|
|
|
|
<span class="user-device-indicator">{{#if mobile}}{{/if}}</span>
|
Make nicer slugs for "pm-with" narrows.
The slugs for PM-with narrows now have user ids in them, so they
are more resilient to email changes, and they have less escaping
characters and are generally prettier.
Examples:
narrow/pm-with/3-cordelia
narrow/pm-with/3,5-group
The part of the URL that is actionable is the comma-delimited
list of one or more userids.
When we decode the slugs, we only use the part before the dash; the
stuff after the dash is just for humans. If we don't see a number
before the dash, we fall back to the old decoding (which should only
matter during a transition period where folks may have old links).
For group PMS, we always say "group" after the dash. For single PMs,
we use the person's email userid, since it's usually fairly concise
and not noisy for a URL. We may tinker with this later.
Basically, the heart of this change is these two new methods:
people.emails_to_slug
people.slug_to_emails
And then we unify the encode codepath as follows:
narrow.pm_with_uri ->
hashchange.operators_to_hash ->
hashchange.encode_operand ->
people.emails_to_slug
The decode path didn't really require much modication in this commit,
other than to have hashchange.decode_operand call people.slug_to_emails
for the pm-with case.
2017-01-06 02:00:03 +01:00
|
|
|
<a href="{{href}}" data-user-id="{{user_id}}" data-name="{{name}}" title="{{name}} {{type_desc}}"
|
2016-01-19 21:03:56 +01:00
|
|
|
class="{{#if my_fullname}} my_fullname{{/if}}">{{name}}</a>
|
|
|
|
</span>
|
|
|
|
<span class="count"><span class="value">{{#if num_unread}}{{num_unread}}{{/if}}</span></span>
|
|
|
|
<span class="arrow"><i class="icon-vector-chevron-down"></i></span>
|
|
|
|
</li>
|