Page MenuHomePhabricator

Flow: JavaScript errors and wrong result from post moderation actions performed in new window
Closed, ResolvedPublic

Description

While logged in and viewing a Flow board, bring up a post's action menu and right-click on a moderation action such as "Hide post" to open it in a new window. E.g. http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Topic:S2kt8ok5dha81gzk&action=moderate-post&topic_postId=s2kt8ok6xlpvdnpc&topic_moderationState=hide

In addition to the poor "disconnected" UX for this standalone action...
When you enter a reason and click Hide,

  1. You get a JS error TypeError: data.flow[action] is undefined http://bits.beta.wmflabs.org/static-master/extensions/Flow/modules/new/components/flow-board.js Line 1100
  1. If you reload the topic, the entire topic is hidden, not just the moderated post.

Similarly, bring up a *topic*'s action menu and right-click on the "Hide topic" action to open it in a new window.

E.g. http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Topic:S2kt8ok5dha81gzk&action=moderate-topic&topic_moderationState=hide

when you enter a reason and click Hide, you get a different JS error

TypeError: $target is undefined
http://bits.beta.wmflabs.org/static-master/extensions/Mantle/javascripts/externals/handlebars.js line 2082 > Function/event/seq/1/anonymous
Line 1120

Normally only users not running JavaScript will see this UX, since if you click the action item it takes place in the current page. So I think it's low-priority.


Version: master
Severity: minor

Details

Reference
bz71220

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:51 AM
bzimport set Reference to bz71220.
bzimport added a subscriber: Unknown Object (MLST).
He7d3r set Security to None.
Mattflaschen-WMF triaged this task as High priority.Dec 10 2014, 6:55 PM

Retest before starting work

Quiddity removed a subscriber: Maryana.Dec 19 2014, 1:26 AM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptApr 6 2015, 8:35 PM

Change 288564 had a related patch set uploaded (by Mattflaschen):
Don't serve JS except on 'view' or 'history'

https://gerrit.wikimedia.org/r/288564

Change 288873 had a related patch set uploaded (by Mattflaschen):
Correctly moderate POST on no JS path, not topic

https://gerrit.wikimedia.org/r/288873

Change 288564 merged by jenkins-bot:
Don't serve JS except on 'view' or 'history'

https://gerrit.wikimedia.org/r/288564

Change 288873 merged by jenkins-bot:
Correctly moderate post on no JS path, not topic

https://gerrit.wikimedia.org/r/288873

Checked in betalabs - items from flow-menu-js-drop opened in new tab/window do not produce any js errors; and functionality is fine too.

DannyH removed a subscriber: DannyH.May 25 2016, 12:56 AM
jmatazzoni closed this task as Resolved.May 31 2016, 3:46 PM