FlominatorTM / wikiblame

http://wikipedia.ramselehof.de/wikiblame.php
GNU General Public License v3.0
54 stars 13 forks source link

Allow pasting of article url #19

Closed FlominatorTM closed 6 years ago

FlominatorTM commented 6 years ago

Follow up of https://sourceforge.net/p/wikiblame/bug-reports/9/ and https://sourceforge.net/p/wikiblame/bug-reports/16/

Maybe some Javascript link next to article could open a prompt, ask for the url and insert it to the input fields ...

FlominatorTM commented 6 years ago

Done, I would say.

waldyrious commented 6 years ago

Wouldn't it be easier (for the user) to reuse the text field already present, instead of creating a new one? That is, the user would paste the URL in the "Page" field, and clicking the button would convert it into an article title.

In fact, it could even be made automatic: the onpaste event in the input field could run a function to convert URLs into article titles, or leave it alone if it isn't an URL.

Also, it would probably make sense to replace underscores in the URL with actual spaces, for readability.

FlominatorTM commented 6 years ago

Did you see that this is no new field, but a button that opens a prompt? I somehow consider it a little cleaner than having whatever crap in the article field (e.g. a user not having JavaScript active). It is basically in line with the "reset" button at the date drop down fields.

Where my refusal of course doesn't mean, that I cannot be convinced ...

Thanks for the hint with the underscores, it was fixed in e7e01b4abe0e9f6345dd241d8eab0efc05851a95

waldyrious commented 6 years ago

Yes, when I said "creating a new one" I was talking about the text field that is displayed in the prompt :) The reasoning what that, for the end user, more steps and visual changes increase the complexity of the interface and the cognitive burden of using it. Compare the two approaches:

Don't you agree the second approach seems like the cleaner one, from the perspective of the user?

(I realize that I mentioned this simpler approach only as an add-on to the first proposal I made in the previous comment, even though it was my favored one, so I apologize for the ambiguity.)

Of course, if the user has javascript disabled, the cleanup won't happen, but is that such a common ocurrence that it's worth making the experience more cumbersome for everyone else? (Besides, the current approach isn't ideal either in that regard: there's a button that simply would do nothing when clicked, as the prompt will not show up without javascript).