Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Special:Diff when possible #206

Open
kynikos opened this issue Jan 19, 2015 · 22 comments
Open

Use Special:Diff when possible #206

kynikos opened this issue Jan 19, 2015 · 22 comments

Comments

@kynikos
Copy link
Owner

kynikos commented Jan 19, 2015

Use Special:Diff when possible.

@kynikos kynikos added this to the 2.1.0 milestone Jan 19, 2015
@lahwaacz
Copy link
Contributor

lahwaacz commented Feb 7, 2015

Wiki Monkey might even automatically convert all diff links in edit summaries to use Special:Diff, which would result in a clickable link ;)

@kynikos
Copy link
Owner Author

kynikos commented Feb 9, 2015

It might indeed, I think it can be implemented in 3 ways:

  1. diff links are converted after clicking on one of the Save_page/Show_preview/Show_changes buttons: if clicking on Save_page, this gives no possibility to check the substitution
  2. diff links are converted immediately whenever a diff link is pasted in the text field: this makes it impossible to paste a full diff url, if that was ever useful anymore
  3. diff links in the summary field are converted only when clicking on a dedicated convert button

I guess 2. is the best solution, what do you think?

@lahwaacz
Copy link
Contributor

lahwaacz commented Feb 9, 2015

I can think of one more:

  1. diff links are converted when the text field loses focus

However, there is one catch: pressing Enter in the text field saves the page, I don't know if the links would be converted in this case (it would certainly not be previewed by the user).
(By the way, I would be interested in blocking the Enter signal, because it causes more trouble than it solves: Enter is too close to Backspace, so sometimes I press Enter instead of Backspace, which usually results in a very confusing edit summary. I can also easily navigate to the "Save page" button by pressing Tab and hit Enter there.)

@kynikos
Copy link
Owner Author

kynikos commented Feb 9, 2015

Uh, 4 FTW!
And I will certainly try to do something about pressing Enter in the summary field... I too think it's an annoying feature, although it hits me only when I pressmiss RShift (I use the Colemak layout, so Backspace is in a safe place :P ) but I had never thought about trying to disable it...
Finally I'll just remind myself that the ArchWikiQuickReport and ArchWikiSaveTalk plugins should create links with Special:Diff too.

@kynikos
Copy link
Owner Author

kynikos commented Jul 11, 2015

Pressing Enter in the summary field should be disabled now in the develop branch; the new configuration option should be added automatically if not present, however I haven't tested it very thoroughly, so please report if WM is broken after merging...

lahwaacz pushed a commit to lahwaacz/wiki-monkey that referenced this issue Jul 11, 2015
@lahwaacz
Copy link
Contributor

Well, the new configuration option has been enabled automatically, but the disabling itself does not seem to work. I've been testing it without modifying the content, which results in purging the page upon saving, and pressing Enter still invoked the default action.

@kynikos
Copy link
Owner Author

kynikos commented Jul 11, 2015

Um... are you using Chromium? Because I've just tested it there and it's indeed broken, working on it...
If you instead were using Firefox, I didn't point out that when merging the last commit, there's a new @require at the top of your *local.user.js that should probably be adapted to your system, maybe that can be causing the issue.

@lahwaacz
Copy link
Contributor

Firefox + Pentadactyl (if that's relevant). I think I adapted the file properly while rebasing the local commit...

@kynikos
Copy link
Owner Author

kynikos commented Jul 11, 2015

You did indeed... When you have some minutes can you please merge my test branch and try again? Warning: whenever you'll open an editor you'll see (hopefully) a dialog with Test1 written in it; then, writing random characters in the edit summary field should print Test2 in WM's log at each key press; then, when pressing Enter, you should also see Test3 and Test4 in the log (but not Test5), and of course, still, the form shouldn't be submitted. Can you please report if all this happens, or what exactly doesn't?

@lahwaacz
Copy link
Contributor

I've seen Test1 alert box and Test2 in the log for each key press (including Enter), but no Test3, Test4 or Test5.

@lahwaacz
Copy link
Contributor

I've made a small change to log the event.key value and the result is quite interesting: for normal keys it is a, b, c then Backspace, ArrowRight and so on, but for the Enter key, it is an empty string (or at least looks like it in the logs).

@kynikos
Copy link
Owner Author

kynikos commented Jul 11, 2015

Yeah I was doing the same test (pushed in test) and I do get Enter instead when pressing it... It could be Pentadactyl (I'm using VimFx instead), I'll reinstall it and try to debug, but if the key event doesn't reach there it's going to be tough...

@lahwaacz
Copy link
Contributor

If I revert the test to the previous event.keyCode == 13, I get both Test3 and Test4 in the log, but the submit is not prevented.

@kynikos
Copy link
Owner Author

kynikos commented Jul 11, 2015

That would be closer, but keyCode is being deprecated in favor of key :(

@kynikos
Copy link
Owner Author

kynikos commented Jul 11, 2015

How are you using Pentadactyl? And what version? And what FF version? Because here says that it's incompatible with FF39...

@kynikos
Copy link
Owner Author

kynikos commented Jul 11, 2015

I've tried with Vimperator and Enter is suppressed correctly.

@lahwaacz
Copy link
Contributor

I have firefox 39 from the repos and pentadactyl-git from AUR (version r7162.f479072). I'll test it with pentadactyl disabled to confirm it's the problem...

@lahwaacz
Copy link
Contributor

Yup, it's pentadactyl. When disabled, the submit is disabled and event.key is Enter as it's supposed to be. So I'll report a bug somewhere else... thanks for the assistance :)

@kynikos
Copy link
Owner Author

kynikos commented Jul 11, 2015

Eheh thank you for helping as always! Can you make a minimal reproducing script for them or do you prefer if I keep my test branch alive for a while?

@lahwaacz
Copy link
Contributor

I'll need to create something not relying on the local configuration, so I think you can tear it down. For now I have the test commits is in my local branch.

@kynikos
Copy link
Owner Author

kynikos commented Jul 11, 2015

Ok, if you need a hand just let me know.
Above I said the Enter-suppressing feature wasn't working in Chromium, but that's all fixed and released in 2.0.2 now.

@lahwaacz
Copy link
Contributor

I just accidentally noticed that the suppressing works when Enter is pressed while pentadactyl is in passthrough mode, so it seems there is one more layer to break. Simply adding this line to ~/.pentadactylrc seems to do just that:

set passkeys=wiki.archlinux.org:<Enter>

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

No branches or pull requests

2 participants