https://bugzilla.wikimedia.org/show_bug.cgi?id=19681

           Summary: add an explicit action=view_source to view a page's
                    markup
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: User interface
        AssignedTo: [email protected]
        ReportedBy: [email protected]


"Copy markup from page Xyz" is an extremely common instruction when telling
people how to make edits in MediaWiki.  Yet this is extremely complicated and
prone to error.  If users just visit the page, they don't get the markup, but
if you tell users to edit page Xyz, select its markup and copy it, the moment
users visit they're presented a UI that doesn't match what you want them to do
— it encourages them to edit, tells them to preview, asks for a summary,
etc.  It also wastes CPU, MediaWiki renders the page, then renders the
complicated editing UI.

Instead MediaWiki should have a dedicated action to view markup.

The code for this action is already present in MediaWiki!  On many wikis, if
you view a protected page, the [edit] tab turns into [View source], and if you
choose the edit action you're presented with an uneditable text box with the
markup and "You can view and copy the source of this page".  See e.g.
http://semanticweb.org/index.php?title=MediaWiki:Smw_import_foaf&action=edit 
So all that's needed is an action that triggers this behavior, with a slightly
different introductory paragraph.  Maybe reuse the optional parameter &preview
to show what the markup looks like.

Notes:
* I have a mild preference for action=view_markup because I confuse MediaWiki's
"view source" with my browser's "View source", but I don't feel strongly about
the terminology.
* action=raw eventually provides the markup of a page, but it's way too
user-unfriendly: it triggers a download dialog and "What should Firefox do with
this file", and lacks the explanatory "You can view and copy the source of this
page".
* http://www.mediawiki.org/wiki/Manual:Creating_pages_with_preloaded_text
discusses workarounds for for the specific case of creating a new page from a
template, e.g. using the CreateBox extension.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to