Page MenuHomePhabricator

Flow no-JS doesn't highlight the post in a permalink
Open, LowPublic

Description

When you follow a Permalink to a post, it does not get a green highlight bar if JavaScript is disabled. This is because JavaScript code handles the #flow-post-postUUID fragment on the URL.

But the permalink also passes in a URL query parameter, &topic_showPostId=postUUID , so server-side templating code could add class .flow-post-highlighted to the post's HTML if showPostId === postId.

(The alternative would be to not include &topic_showPostId in the Permalink URL, which would make for a simpler wiki link, just [ [Topic: TopicUUID # flow-post-postUUID ]]. But I think the flow_post.handlebars template uses the URL query parameter to show a moderated post that would otherwise be hidden.)

Event Timeline

Spage raised the priority of this task from to Low.
Spage updated the task description. (Show Details)
Spage changed Security from none to None.
Spage added a subscriber: Spage.
He7d3r added a subscriber: He7d3r.EditedMar 6 2015, 8:11 PM

I should note that it works for "reply" links such as
http://ee-flow.wmflabs.org/w/index.php?title=Topic:Scva1ksj5wk9jbls&action=reply&topic_postId=sd1l54l7dwich2f4#flow-post-sd1l54l7dwich2f4
(which is good, and should be replicated for users who reply without following a "link to reply" - T91807)

the mentioned topic_showPostId can't be ommited as mentioned in the description, this parameter tells the backend to include the content of the post even if it was moderated to a state that is not included with the topic by default.

Restricted Application added a project: Growth-Team. · View Herald TranscriptJul 18 2018, 6:56 PM
SBisson moved this task from Inbox to Triaged but Future on the Growth-Team board.Jul 20 2018, 5:53 PM