Per-edit suppression of "preview-on-first-edit" preference
Closed, ResolvedPublic

Assigned To
None
Priority
Normal
Author
Huji
Subscribers
Huji, wikibugs-l
Projects
Reference
bz9936
Description

We have a feature right now, where by adding redirect=no to the full url of a page, a redirect is prevented and we see the redirect page itself, rather than the destination.

I want to request a similar feature: preview=no

This is because I usually set mediawiki to show the previews on first edit. However, on some situations (trying to add something to the end of a long page with no sections) I prefer the preview not to be shown. These are rare exceptions, so it wouldn't be ok with me to change and rechange my preferences. If a preview=no feature would be added, I could have a piece of code in my monobook.js file, adding a link to the caption of the pages to edit them without preview. :)

I understand I'm asking a not-so-important feature, but I would be grateful if it would be implemented some day.

Thanks


Version: unspecified
Severity: enhancement

bzimport added a project: MediaWiki-Page-editing.Via ConduitNov 21 2014, 9:43 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz9936.
Huji created this task.Via LegacyMay 17 2007, 2:17 PM
Huji added a comment.Via ConduitJun 29 2007, 5:01 PM

Created attachment 3848
Patch which enables the required feature

I created this patch and tested it on my local wiki. It is working as desired. I hope you apply it with no issues.

attachment diff.diff ignored as obsolete

bzimport added a comment.Via ConduitJun 29 2007, 5:22 PM

ayg wrote:

Wouldn't it make more sense to allow the preview parameter to have either "no" or "yes", overriding the preference either way rather than only one way?

Also, use $wgRequest (the global WebRequest object) to obtain request parameters. This handles things like magic quotes cleaning, etc., in a nice and consistent manner.

Huji added a comment.Via ConduitJun 29 2007, 6:10 PM

Created attachment 3850
Second patch, which applies Simetrial suggestions

I created this new patch, which applies your suggestions, i.e. it understand preview="yes" in the url, and uses $wgRequest to get the url parameters.

attachment Diff.diff ignored as obsolete

Huji added a comment.Via ConduitJun 29 2007, 6:26 PM

Created attachment 3852
Recoding the same thing

This newer patch, created with regard to Simetrical's comments on IRC, makes the code easier to read.

Attached: diff.diff

bzimport added a comment.Via ConduitJun 29 2007, 8:32 PM

ayg wrote:

That looks good. The only concern I have is whether we want to add secret URL parameters that can't be accessed through the interface. Maybe a "hide preview" button at the top if the preview is displayed. Although it would probably be expected to preserve whatever was entered into forms, too, which would be marginally trickier without just deleting the preview via JS. But I guess this is okay as a first step, assuming it works (haven't tested it but don't see why it wouldn't).

Huji added a comment.Via ConduitJun 30 2007, 3:19 AM

Simetrical, I look into it from two points of view:

  1. Documentation: This feature should be mentioned in the documentation. I'm just looking to find similar items on MediaWiki web site, so I can modify/add the required page with respect to the available practice.
  1. User interface: I cannot find a place in user interface which is logically suitable for adding a link/checkbox for using this feature. This is a per-preview feature, and the only use of it, as far as I understand, is when someone has enabled preview on load, but wants it to be off on rare ocasions. Perhaps someone may add an item for himself to the page captions using user js, with a link to edit with no preview (I will do myself, as soon as this feature is enabled) but this is not what every body wants to use, so I see no point in showing this option to every one. That is my point of view though.
Huji added a comment.Via ConduitJul 1 2007, 3:05 PM

So all in all, is this patch going to be implemented, or do we have to make more considerations about it?

bzimport added a comment.Via ConduitJul 3 2007, 3:01 AM

ayg wrote:

Brion said, "I don't see much purpose in it. Yet another magic parameter... :P"

Huji added a comment.Via ConduitJul 5 2007, 1:10 PM

I emailed Brion but he has probably forgotten to reply to me. I said "Setting up that new feature takes only a second... You can see there is at list one good reason for doing so... I afforded to describe the feature on appropriate place on Meta and/or MediaWiki.org web sites, so it doesn't remain a hidden magic parameter..."

I still cannot understand why we should avoid setting up this new faeture. Others' may have useful comments in this regard.

bzimport added a comment.Via ConduitJul 5 2007, 7:37 PM

ayg wrote:

Adding features that only a couple of people want is bad in the long term. It leads to too many features that nobody uses or has heard of, and consequently nobody maintains, which may duplicate functionality in some way, etc. Secret options are also bad, they should be accessible through the interface. Simplicity is often a virtue. If you had a button at the top of the screen saying "Hide preview" that's a patch worth considering.

Huji added a comment.Via ConduitJul 10 2007, 12:14 PM

Simetrical, thank you for your comment. I don't fully understand what that button should look like. Do you mean adding a new item to the page caption (for example next to the Edit this page link) which leads to the edit page without a preview?

brion added a comment.Via ConduitJul 10 2007, 5:27 PM

I don't think that dismissing the preview after it's shown really is in the spirit of the request. You still have to sit there while it renders, downloads, and shows on screen, and then hide it?

The point, presumably, is to not have to sit through it in the first place. It's too late to dismiss it once shown.

Huji added a comment.Via ConduitJul 10 2007, 6:02 PM

I agree with Brion here. All in all, if you think this feature is not necessary, we can close this as a WONTFIX or something.

bzimport added a comment.Via ConduitJul 10 2007, 7:23 PM

robchur wrote:

Fixed in r23972; use "preview=no" or "preview=yes" as desired.

Huji added a comment.Via ConduitJul 11 2007, 6:08 AM

Thank you.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.