Timeline timestamp not updating

Yeah that would be ideal :+1:

If we use the right HTML structure, the automatic updating over time can be handled automatically by our relative-date helper.

To handle changes to the topic.last_posted_at value, we should be able to lean on Glimmer’s reactivity, rather than doing stuff on scroll. e.g.

get bottomAge(){
  return this.args.topic.get("last_posted_at") || this.args.topic.get("created_at");
}

And then in the hbs we can use our relative age helper to render it in the right structure for the auto-updating

{{age-with-tooltip this.bottomAge}}

Might need to make some improvements to the helper so that it can support the ‘addAgo’ and ‘defaultFormat’ parameters?

1 Like