"(thank)" is shown if JS is disabled, but it's a broken link
Closed, ResolvedPublic

Description

Author: 7rt1j

Description:
MediaWiki 1.22wmf5, Extension:Thanks 1.0.0

(This started as a discussion at https://en.wikipedia.org/wiki/Wikipedia_talk:Notifications/Thanks#JavaScript-only.3F.)

The Thanks feature currently requires JavaScript. However, the "(thank)" link is still displayed when JavaScript is disabled or the browser does not support it. The link is not functional – nothing happens upon clicking it. This can be confusing to users, and is just useless clutter without JavaScript.

Either the "(thank)" link should be hidden from non-JS users, or it should do something when clicked.

I wouldn't have thought this to be too difficult to do without JS: The link target could go to somewhere like /w/index.php?title=Special:Thanks&oldid=REVISION&token=TOKEN, which would show a message such as "Your thanks have been sent to USERNAME.". It's a little clunkier than with JavaScript since it takes you away from the history page, but it's better than a link that does nothing.


Version: unspecified
Severity: normal
URL: https://en.wikipedia.org/wiki/Wikipedia_talk:Notifications/Thanks#JavaScript-only.3F

bzimport set Reference to bz49161.
bzimport created this task.Via LegacyJun 5 2013, 12:08 AM
kaldari added a comment.Via ConduitJun 5 2013, 1:10 AM

Good catch. We'll probably just want to not show the Thank link for non-JS users.

Mattflaschen added a comment.Via ConduitAug 22 2013, 5:00 AM

Created attachment 13147
Thanks link hidden with CSS but leaving dangling pipe

Hiding just the link is simple, and I'll submit a patch to do that for the interim.

The problem, as shown in the image, is there's also a pipe separator (with no good selector), added server-side by MW core. That can't be hidden easily with CSS.

The patch (with the dangling pipe) is still probably worth merging in the interim, but the best approaches are probably either:

  1. Supporting thanking without JavaScript (as suggested in the report).
  2. Generate the thank link with JavaScript

Attached:

gerritbot added a comment.Via ConduitAug 22 2013, 5:04 AM

Change 80336 had a related patch set uploaded by Mattflaschen:
Hide thank link when there is no JavaScript

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

Mattflaschen added a comment.Via ConduitAug 22 2013, 5:07 AM

It shows empty parentheses instead of the pipe for the diff page.

Ricordisamoa added a comment.Via ConduitSep 8 2013, 4:48 PM

Agree with PartTimeGnome: a static non-JS link should work, as "mark as patrolled" and "watch this page" do.

Change 80336 is a provisional patch and could be avoided.

gerritbot added a comment.Via ConduitOct 16 2013, 7:39 AM

Change 80336 abandoned by Mattflaschen:
Hide thank link when there is no JavaScript

Reason:
This isn't really a solution due to the dangling pipe/paren issue.

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

matmarex added a comment.Via ConduitOct 23 2013, 9:17 PM
  • Bug 56049 has been marked as a duplicate of this bug. ***
gerritbot added a comment.Via ConduitOct 24 2013, 1:15 AM

Change 91549 had a related patch set uploaded by Legoktm:
Add Special:Thanks as a non-JS fallback

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

gerritbot added a comment.Via ConduitDec 19 2013, 5:43 AM

Change 91549 merged by jenkins-bot:
Add Special:Thanks as a non-JS fallback

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

Add Comment