Show "updated topics above this line" in the topic list?

The only suggestion I can make is due to my anticipation of “bike shedding” over the copy.

i.e. Is “new” above or below?

Maybe bracket the I18n with unicode up arrows (\2191) ?

Nah, that is simple enough for people to change via the Admin > Customize > Text area. So no need to bikeshed that before it is implemented. If they see a lot of people leaning towards a certain phrase, updating the default won’t be difficult.

2 Likes

Looks like it’s a winner!

9 Likes

Nice work! Looks like localization is the only stumbling block now, but this should be good enough to get started!

3 Likes

@Falco’s PR handles localization too using a data-attribute :slight_smile:

5 Likes

Yeah! Actually it already is localizable since it reads from a data attributte from the tr element.

If @sam can just point me a general direction to get this string set we’re done.

PS: I think it’s around here:

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/topic-list-item.js.es6#L51

Yep, And I think you can get away with changing

  attributeBindings: ['data-topic-id'],
  'data-topic-id': Em.computed.alias('topic.id'),

to

  attributeBindings: ['data-topic-id', 'data-last-visit-text'],
  'data-topic-id': Em.computed.alias('topic.id'),
  'data-last-visit-text': I18n.t('your_variable_here'),
4 Likes

Nice! I’m gonna test this later and put into the PR.

5 Likes

Ok, this is nice and all but is there a way to remove it? We really don’t need that red line and might be confusing to our users as they don’t know what it’s for.

You can set it to whatever you want via CSS of course.

Any update on this? I’ve been following on GH and it appears as though it’s diverged a little bit, in which @sam is reviewing the PR before it’s been updated with the above suggestions…

1 Like

I’m not very proficient with CSS but this seemed to remove it on our site (in Settings > Customize > CSS/HTML)

.topic-list>tbody>tr.last-visit {
    border-bottom: inherit;
}

If anyone who knows more about CSS and customization (probably everyone looking at this post) sees anything wrong with that, feel free to correct me!

2 Likes

Text is merged in master! Thanks @tgxworld for the tr approach, works wonders!

7 Likes

Somehow I have two of them now.

2 Likes

Related to recent work @falco did – it can also show up in Suggested Topics accidentally now.

2 Likes

should be fixed per:

https://github.com/discourse/discourse/commit/601a96333ae5c40dcb79edf704460813d633889a

5 Likes

Been completed for quite a while!

3 Likes