Open hashtag in same tab #1811

Closed
edijs wants to merge 0 commits from gitlab-mr-iid-540 into develop
Member

Issue #293

Issue #293
Member

you could always open the tags timeline in the same instance regardless of where the link is taking you to

you could always open the tags timeline in the same instance regardless of where the link is taking you to
Member

Err this is not quite good enough to do what we want, you want to check if the link in question is a hashtag first (both pleroma and mastodon put a class "hashtag" into the <a> tag at least), and then figure out the proper name of the tag (status object has the list of tags, would somehow need to match the correct one to the link), and then push a route to the tags timeline with the correct tag in the props

Err this is not quite good enough to do what we want, you want to check if the link in question is a hashtag first (both pleroma and mastodon put a class "hashtag" into the `<a>` tag at least), and then figure out the proper name of the tag (status object has the list of tags, would somehow need to match the correct one to the link), and then push a route to the tags timeline with the correct tag in the props
Author
Member

@shpuld Got it.
But it doesn't looks like status object has the list of tags.

@shpuld Got it. But it doesn't looks like status object has the list of tags.
Member

I must have misremembered, anyway mastodon doesn't attach any additional meta data to the tag itself, while pleroma adds data-tag, which means you must ignore it as we want it to work from statuses that come from different servers

I must have misremembered, anyway mastodon doesn't attach any additional meta data to the tag itself, while pleroma adds data-tag, which means you must ignore it as we want it to work from statuses that come from different servers
Author
Member

@shpuld any thoughts about new update?

@shpuld any thoughts about new update?
Member

Sir you forgot your .only!

Nice that things are tested. Much better after these changes! I am wondering if restricting to tag/tags in the url is necessary, we already know it's a tag from the className, so it might be a safe assumption that the last part of the url is the tag itself, but I don't know for sure. I think it's fine like this and if there are tag urls that don't work from other servers then we'll change the code then.

Sir you forgot your .only! Nice that things are tested. Much better after these changes! I am wondering if restricting to tag/tags in the url is necessary, we already know it's a tag from the className, so it might be a safe assumption that the last part of the url is the tag itself, but I don't know for sure. I think it's fine like this and if there are tag urls that don't work from other servers then we'll change the code then.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pleroma/pleroma-fe!1811
No description provided.