AJAX quick* reply when you can't comment is unsubmittable #1622

Closed
chrisboyle opened this Issue Nov 8, 2015 · 12 comments

Comments

Projects
None yet
8 participants
@chrisboyle
Contributor

chrisboyle commented Nov 8, 2015

Spun out of #1577, this relates to any Quick{,er,est,ish,ly,ening,sand,...}Reply where the form would fold back up on success instead of navigating to the entry page, but you're not allowed to reply. Example scenario:

  • You're replying from the Reading page.
  • You're an OpenID without verified email.
  • The AJAX form flashes up an error underneath about how you should verify your email address.
  • There is no way on this page to fix the problem - if the problem is even the fixable one where you need to verify email, and you click through to do so, then you've lost your comment.

Solution 1

Stop you before you waste time typing a comment, e.g. by navigating to ?mode=reply (which includes the explanation and other login options) instead of opening an unsubmittable form.

Solution 2

Make submission of such a Quick*Reply navigate to the full-page comment form populated with your comment and the error (you have login options there to fix it). JS can simply do this on receiving an error response instead of flashing the error briefly underneath the form. This would probably involve a second attempt to submit the comment but that should always be safe as the first one has failed. Take care not to do that if the error is a network error rather than receiving an error response, as the submission may in fact have gone through in that case.

Debate

  • Advantage of 1: clues you in before you write your masterpiece.
  • Advantage of 1: avoids caring about details of jQuery's error presentation as above.
  • Advantage of 2: avoids creating inconsistency where some-but-not-all Reply links on a Reading page will navigate away from it, losing your place.
  • Advantage of 2: avoids caring about ia ia S2 fth'agn in making QR thus conditional.

Solution 3

The quick-reply form opens as usual, but has a prominent notice on it:

[icon]your_username is not allowed to comment on this post. You can choose a different identity on the next page.

or:

Only registered users can comment on this post. You can log in on the next page.

  • Submitting it goes directly to the full-page form with the login options, which is hopefully not a surprise given the notice.
  • There is no prior AJAX attempt, thus removing any worries about double posting.
  • This submission includes a parameter e.g. select_identity=1 meaning don't attempt to post yet, which ensures we don't post when the notice implied it wouldn't, if meanwhile they logged in in another tab.
  • The top of the full-page form then says: Comment Not Posted / Choose an identity below
  • All this is achieved simply by greying out the Post Comment button in favour of the More Options button (and including the appropriate notice described above).

Solution 4

Like 3 but without the form. Clicking Reply shows just the notice and a link to ?mode=reply, like this:

[icon]your_username is not allowed to comment on this post.

Comment as a different identity

(Is that clear enough that it's a normal link to a new page? Can you suggest any better wording?)

You can then easily open that link in a new tab if you want. (Of course, doing so has the hazard that you login as someone else in that tab and then future quick-replies from this tab are not using the identity that the top of this tab suggests they are...)

@rahaeli

This comment has been minimized.

Show comment
Hide comment
@rahaeli

rahaeli Nov 8, 2015

Contributor

Now I'm wondering what quicksandreply would be, and have come to the conclusion that it's a great name for a suspected-spammer backoff where it keeps the comment 'loading' for a few minutes to discourage further submissions.

Contributor

rahaeli commented Nov 8, 2015

Now I'm wondering what quicksandreply would be, and have come to the conclusion that it's a great name for a suspected-spammer backoff where it keeps the comment 'loading' for a few minutes to discourage further submissions.

@chrisboyle

This comment has been minimized.

Show comment
Hide comment
@chrisboyle

chrisboyle Nov 8, 2015

Contributor

[hold music is interrupted] Hello... and thank you for holding. Your comment is important to us, please hold. [hold music resumes]

Contributor

chrisboyle commented Nov 8, 2015

[hold music is interrupted] Hello... and thank you for holding. Your comment is important to us, please hold. [hold music resumes]

@rahaeli

This comment has been minimized.

Show comment
Hide comment
@rahaeli

rahaeli Nov 8, 2015

Contributor
Contributor

rahaeli commented Nov 8, 2015

@kaberett

This comment has been minimized.

Show comment
Hide comment
@kaberett

kaberett Nov 8, 2015

Member

(I probably have a mild preference for 1 but I'm not sure how much weight anyone should give that -- it does have the advantage that it mimics pre-Quick_Reply behaviour on clicking the "reply" link, so it's familiar to users as a means of wossname aaaaaaaand I think it might be equivalent-ish to what happens if you try to use Quick_Reply while logged out? I should... check that, actually. But yes, I think 1 plausibly does better at consistency. V open to being corrected.)

Member

kaberett commented Nov 8, 2015

(I probably have a mild preference for 1 but I'm not sure how much weight anyone should give that -- it does have the advantage that it mimics pre-Quick_Reply behaviour on clicking the "reply" link, so it's familiar to users as a means of wossname aaaaaaaand I think it might be equivalent-ish to what happens if you try to use Quick_Reply while logged out? I should... check that, actually. But yes, I think 1 plausibly does better at consistency. V open to being corrected.)

@zarhooie

This comment has been minimized.

Show comment
Hide comment
@zarhooie

zarhooie Nov 8, 2015

I like 1, but can't articulate why. It just seems less complex, and also less likely to have network time outs.

zarhooie commented Nov 8, 2015

I like 1, but can't articulate why. It just seems less complex, and also less likely to have network time outs.

@sgsabbage

This comment has been minimized.

Show comment
Hide comment
@sgsabbage

sgsabbage Nov 8, 2015

Contributor

1 feels cleaner to me.

As a side note while I think about it, having been looking at quick reply all day yesterday, it may be sufficient to just not attach the onclick handler in S2.pm (I think the sub is print_reply_link or the like...) when the user can't comment.

Commenting here to get it out of my head in case I forget later.

Contributor

sgsabbage commented Nov 8, 2015

1 feels cleaner to me.

As a side note while I think about it, having been looking at quick reply all day yesterday, it may be sufficient to just not attach the onclick handler in S2.pm (I think the sub is print_reply_link or the like...) when the user can't comment.

Commenting here to get it out of my head in case I forget later.

@rahaeli

This comment has been minimized.

Show comment
Hide comment
@rahaeli

rahaeli Nov 8, 2015

Contributor

Just realized I forgot to actually opine (too busy being a smartass): I can see the drawbacks to both, but I have a slight preference for 2, for the very reason that inconsistency in "what's going to happen when I click this thing" is the sort of thing that drives me up the fucking wall.

Contributor

rahaeli commented Nov 8, 2015

Just realized I forgot to actually opine (too busy being a smartass): I can see the drawbacks to both, but I have a slight preference for 2, for the very reason that inconsistency in "what's going to happen when I click this thing" is the sort of thing that drives me up the fucking wall.

@azurelunatic

This comment has been minimized.

Show comment
Hide comment
@azurelunatic

azurelunatic Nov 8, 2015

Member

Going to ?mode=reply on submit is what I expect when something goes wrong with the commenting process.

Going to ?mode=reply when clicking on the thing on the reading page is the opposite of why I clicked on the thing on the reading page, and just a few times of that happening might discourage me from using quickerreply at all.

Member

azurelunatic commented Nov 8, 2015

Going to ?mode=reply on submit is what I expect when something goes wrong with the commenting process.

Going to ?mode=reply when clicking on the thing on the reading page is the opposite of why I clicked on the thing on the reading page, and just a few times of that happening might discourage me from using quickerreply at all.

@chrisboyle

This comment has been minimized.

Show comment
Hide comment
@chrisboyle

chrisboyle Nov 14, 2015

Contributor

Added "Solution 3" and "Solution 4" to the description.

Contributor

chrisboyle commented Nov 14, 2015

Added "Solution 3" and "Solution 4" to the description.

@rahaeli

This comment has been minimized.

Show comment
Hide comment
@rahaeli

rahaeli Nov 14, 2015

Contributor
Contributor

rahaeli commented Nov 14, 2015

@azurelunatic

This comment has been minimized.

Show comment
Hide comment
@azurelunatic

azurelunatic Nov 14, 2015

Member

I'm for Option 3 as well.

Member

azurelunatic commented Nov 14, 2015

I'm for Option 3 as well.

@chrisboyle

This comment has been minimized.

Show comment
Hide comment
@chrisboyle

chrisboyle Feb 20, 2016

Contributor

Having solicited all this feedback I should probably claim and do this (option 3). :-p

Contributor

chrisboyle commented Feb 20, 2016

Having solicited all this feedback I should probably claim and do this (option 3). :-p

chrisboyle added a commit to chrisboyle/dw-free that referenced this issue Feb 21, 2016

QR: Warn of comment blocking in advance
Make QuickReply forms tell you clearly before you write a comment that
you won't be able to post with your current identity.

Fixes: #1622

@zorkian zorkian closed this in #1696 Apr 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment