Navigating Back to Bookmarks

AI-generated summary

Navigating Back to Bookmarks

Users are experiencing an issue where clicking a bookmarked item and then hitting the back button does not return them to the bookmarks page. Instead, it navigates back to the previous bookmarked post/pm/etc they visited.

jomaxro and blake.sorrell have reproduced the issue and shared screenshots to demonstrate the problem.

sam has confirmed the issue and suggested it may be related to Ember routing. A fix is being reviewed, with martin attributing the issue to a missing data-auto-route attribute on the link generated by the topic-link component. A pull request has been submitted to address the issue: https://github.com/discourse/discourse/pull/12936.

  1. Click a bookmarked item
  2. Then hit back
  3. It doesn’t navigate back to where you were in bookmarks, it goes back to the previous bookmarked post/pm/etc that you visited instead.
5 Likes

I can repro this here on Meta.

2 Likes

When you say “click a bookmarked item”, where are you? Can you show a screenshot?

3 Likes

I’m on the bookmarks page: Discourse Meta - The Official Support Forum for Discourse.

Steps I took:

  1. Open user menu
  2. Click bookmark icon twice (to navigate to full bookmark activity page)
  3. Click a topic
  4. Click back

If I was to do that right now, when clicking back I’d end up here, in this topic, rather than landing on the bookmark activity page as I’d expect.

4 Likes

Click that bookmark, then hit back…you’ll wind up at whatever previous topic/post/pm you visited prior to clicking the “bookmarked item”.

5 Likes

Confirmed, yeah something is not right with our Ember routing here @martin can repro in safe mode.

Can you have a quick look? If it becomes a bit too much of a rabbit hole ping @eviltrout or @j.jaffeux for a hand.

3 Likes

It was fairly straightforward, I have a fix up for review now:

https://github.com/discourse/discourse/pull/12936

The topic-link component (which isn’t used in many places, the bookmark list is one of three) was just missing data-auto-route on the link generated.

7 Likes