Page MenuHomePhabricator

Flow: provide View Source (showing the wikitext) of someone's post
Open, MediumPublic3 Estimated Story PointsFeature

Description

As the anon user asks in https://www.mediawiki.org/w/index.php?title=Talk:Flow&workflow=050f371f63d1034818d4782bcb077299 ,

"Will there be a way to view the source of someone's comment, for things like viewing code examples where the commenter hasn't put it in <code> tags?

I don't expect just anyone to be able to edit others comments, but being able to see their code would be useful."

In wiki pages, action=edit always shows the source of the page, and if you don't have rights to change it then it switches to a read-only "View source for <e.g. Main Page> ... You can view and copy the source of this page:". When the wiki think you can't edit a page, its [Edit] tab changes to [View source]. But the equivalent action=edit-post for a Flow post simply fails with "Insufficient permission to access the content."

So perhaps Edit in a post's action menu could similarly switch to View source if you don't have rights to edit (geeky "View source" icon TBD).

(In a former life I requested action=view_source for wiki pages in T21681, Brion Vibber shot it down 8-) .)


Version: master
Severity: enhancement
URL: https://www.mediawiki.org/w/index.php?title=Talk:Flow&topic[postId]=050f371f63dd034818d4782bcb077299&workflow=050f371f63d1034818d4782bcb077299&action=edit-post

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:04 AM
bzimport set Reference to bz60465.
bzimport added a subscriber: Unknown Object (MLST).

Notes from the old Mingle card #638:

  • Narrative

As a user, I want to have the ability to look at the wikitext of other users' posts, so that I can learn by example, and so that I can copy content into the article.

  • Notes

Suggest putting a "view wikitext" link in the action menu.

Initially mentioned here https://en.wikipedia.org/wiki/Wikipedia_talk:Flow#Future_feature_planning

and here http://ee-flow.wmflabs.org/w/index.php?title=Talk:Flow_workshop&workflow=050a6ebc737bf00fc8b1fa163e68c4ac#flow-post-050b5ac6318ff00fc8b1fa163e68c4ac

and here https://en.wikipedia.org/wiki/Wikipedia_talk:Flow/Design_FAQ#Everything

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/flow/cards/735, but people from the community are welcome to contribute here and in Gerrit.

Change 160160 had a related patch set uploaded by EBernhardson:
Add "View Source" link to post actions menu

https://gerrit.wikimedia.org/r/160160

This is a screenshot of how this looks when you edit a post. The "View source" display will be similar, but it'll be read-only, and there's only a Cancel button.

Is there anything else in the design that needs to be decided?

view_source_example.jpg (322×885 px, 91 KB)

Are we okay with the text box coloring looking like https://en.wikipedia.org/w/index.php?title=Main_Page&action=edit (test logged out or with a non-admin account) ?

Also, VE apparently doesn't actually block you from making changes when it's protected (you can make changes, but can't save). Is this okay for now?

In T62465#1147747, @Mattflaschen wrote:

Are we okay with the text box coloring looking like https://en.wikipedia.org/w/index.php?title=Main_Page&action=edit (test logged out or with a non-admin account) ?

Seems reasonable to me.

Also, VE apparently doesn't actually block you from making changes when it's protected (you can make changes, but can't save). Is this okay for now?

[Tangent, just FYI... ] Huh!? Oh, I see, it removes the edit-tab if we don't have sufficient user rights, but if I manually alter the URL I can get to https://wikimediafoundation.org/w/index.php?title=Home&veaction=edit as an anon. (note that the content wikis do have warnings about page protection, eg https://en.wikipedia.org/w/index.php?title=Main_Page&veaction=edit ). Interesting :)

Yeah, that seems ok for now. (Will any non-admins using VE-mode, still have the "switch to wikitext" button, and hence be able to "view wikitext source" as usual?)

Yeah, that seems ok for now. (Will any non-admins using VE-mode, still have the "switch to wikitext" button, and hence be able to "view wikitext source" as usual?)

Yeah, we should make sure this works.

Change 160160 had a related patch set uploaded (by Catrope):
Add "View source" link to post actions menu

https://gerrit.wikimedia.org/r/160160

Change 160160 abandoned by EBernhardson:
Add "View source" link to post actions menu

Reason:
not likely to get back around to this

https://gerrit.wikimedia.org/r/160160

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:23 PM