Provide a way for the user to switch between VisualEditor and wikitext source editor modes without saving
Closed, ResolvedPublic40 Story Points

Description

Add button to WikiEditor and VisualEditor for switching back and forth.

  • Only shown if in WE you have VE enabled (otherwise don't show)
  • If no changes, switch immediately
  • If there are changes, prompt the user (with the same OOUI message dialog we use in VE) whether to switch with or without their changes
bzimport set Reference to bz47779.

winne2i wrote:

To me that doesn't seem to be compliacted to acheive. The way could be to add a button which opens regular Preview (with wikitext editing).
We already can see the diff, so adding regular preview should not be difficult.

And this can be a big convenience because it's easier to edit in VE but we still can't edit/insert some elements like templates.

TTO added a comment.Jun 18 2013, 2:04 AM

Just pointing out that this is very frequently requested by enwiki users at [[Wikipedia:VisualEditor/Feedback]].

I know bug priority is technically up to the developers, but just letting you know that a lot of people want this.

(In reply to comment #2)

Just pointing out that this is very frequently requested by enwiki users at
[[Wikipedia:VisualEditor/Feedback]].

I know bug priority is technically up to the developers, but just letting you
know that a lot of people want this.

We understand, and I really want to be able to provide this, but in the choice between this and being able to add references (say) we have to prioritise. However, I'm going to see if we can try to get it done in the next few weeks. Sorry for not being able to make a firm commitment.

winne2i wrote:

I'm asking again if this is very difficult to achieve this by adding (even temporarily!) a regular Preview button, which will allow us to see the source code of already changed content? As I said before we can already see diffs so seeing a preview should be quite easy IMO.

As far as refs are concerned – I agree that's very important. But let me notice that introducing such Preview button would allow to add references in that later step (editing the source code). That would be a great instant (but somewhat temporary) solution for both problems. Then one may work on pretty way of adding refs.

Doesn't it sound good? :)

  • Bug 49986 has been marked as a duplicate of this bug. ***
brion added a comment.Jul 2 2013, 5:47 PM

Adding 'source' to subject line to make this easier to search.

He7d3r added a comment.Jul 3 2013, 7:07 PM

See also:

  • [[Thread:VisualEditor/Feedback/ Side-by-side view (no more?)]]
  • Old demo with side-by-side view:

http://blog.wikimedia.org/2011/12/13/help-test-the-first-visual-editor-developer-prototype/visual-editor-demo-2/

(In reply to comment #7)

See also:

  • [[Thread:VisualEditor/Feedback/ Side-by-side view (no more?)]]

Helder. I corrected the link (I hope):

  • [[mw:Thread:VisualEditor/Feedback/ Side-by-side view (no more?)]]

See: [[WP:Bugzilla]] and the section currently titled "Links from within Bugzilla".

Hey Helder. Maybe you can develop a preview mode for Bugzilla? :) Bugzilla needs a "preview" mode:
*https://bugzilla.mozilla.org/show_bug.cgi?id=40896

  • Bug 50698 has been marked as a duplicate of this bug. ***

I have built a script which switches from VE to SE.
https://en.wikipedia.org/wiki/User:John_Vandenberg/switch_editor

I havent looked at whether the API and VE codebase can support switching from SE back to VE, but it seems like JS could obtain rendered HTML (action=parse?) and load it into VE.

Im not immediately inclined to work on SE->VE, as that could facilitate people playing games with the wikitext in order to put dodgy entries into the 'VisualEditor' tagged edit list, which would be impossible to debug.

(In reply to comment #10)

Im not immediately inclined to work on SE->VE, as that could facilitate
people
playing games with the wikitext in order to put dodgy entries into the
'VisualEditor' tagged edit list, which would be impossible to debug.

That could be mitigated with an editfilter or some other indication that an editor had used both modes. Whether such would be possible or desirable is another matter

jayvdb added a comment.EditedOct 9 2013, 6:57 AM

This functionality was requested back in December 2011 in bug T35124.

(In reply to comment #12)

This functionality was requested back in December 2011 in bug 33124.

No? The diff view of the wikitext is not even a read-only view of the entire document's wikitext, let alone an editable one? Also, quickly editing the diff in a pop-over window is fundamentally different paradigm from having a proper wikitext editor available to all users at all times, and being able to switch back and forth, which is what this bug requests.

He7d3r added a comment.Oct 9 2013, 3:51 PM

(In reply to comment #13)

(In reply to comment #12)
> This functionality was requested back in December 2011 in bug 33124.

No? The diff view of the wikitext is not even a read-only view of the entire
document's wikitext, let alone an editable one? Also, quickly editing the
diff
in a pop-over window is fundamentally different paradigm from having a proper
wikitext editor available to all users at all times, and being able to switch
back and forth, which is what this bug requests.

From what I remember about the feature which existed in the prototype which motivated the request made on bug 33124, it actually displayed the entire document's wikitext (not just the diff).

(In reply to comment #14)

(In reply to comment #13)
> (In reply to comment #12)
> > This functionality was requested back in December 2011 in bug 33124.
>
> No? The diff view of the wikitext is not even a read-only view of the entire
> document's wikitext, let alone an editable one? Also, quickly editing the
> diff
> in a pop-over window is fundamentally different paradigm from having a proper
> wikitext editor available to all users at all times, and being able to switch
> back and forth, which is what this bug requests.

From what I remember about the feature which existed in the prototype which
motivated the request made on bug 33124, it actually displayed the entire
document's wikitext (not just the diff).

Oh, yes, you are right. My apologies.

This means that that bug is even further from "this functionality", however.

Sweedish Wikipedians including User:Jan Ainali and User:FrankieF are discussing/requesting an enhancement to VisualEditor here [1] and translate the thread as follows:

"What we are missing is way to easily switch between wikitext and VE without saving or loosing stuff. Just like you can in Wordpress between the WYSIWYG and HTML editor."

[1]
https://sv.wikipedia.org/wiki/Wikipedia:VisualEditor/%C3%85terkoppling#Saknade_funktioner_i_Redig.l.C3.A4get

So with the resolution of bug 50687, this is effectively "Provide a way for the user to switch from the wikitext source editor to VisualEditor, keeping changes but not saving", right? Or have I misunderstood?

(In reply to Alex Monk from comment #17)

So with the resolution of bug 50687, this is effectively "Provide a way for
the user to switch from the wikitext source editor to VisualEditor, keeping
changes but not saving", right?

Yes, as I understand it. Adding that direction would then allow bidirectional switching.

gpaumier set Security to None.
gpaumier moved this task from To Triage to Not ready to announce on the User-notice board.
Jdforrester-WMF edited a custom field.Apr 1 2015, 7:06 PM

We should talk to Parsoid to work out what dependencies this has from them, if any

We should talk to Parsoid to work out what dependencies this has from them, if any

It's mostly a RESTbase dependency, at this point.

Mattflaschen edited the task description. (Show Details)Apr 2 2015, 1:53 AM
awight added a subscriber: awight.May 8 2015, 3:27 AM

This would be a great enhancement!

jayvdb edited the task description. (Show Details)Jun 14 2015, 7:24 AM
greg added a subscriber: greg.Jun 19 2015, 3:09 PM
GWicke moved this task from Backlog to Under discussion on the RESTBase board.Jun 29 2015, 5:34 PM

We should talk to Parsoid to work out what dependencies this has from them, if any

It's mostly a RESTbase dependency, at this point.

Perhaps we should make a separate task for the RESTbase/Parsoid dependencies here.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 21 2015, 6:15 PM
Ltrlg added a subscriber: Ltrlg.Aug 17 2015, 4:07 PM
Jdforrester-WMF raised the priority of this task from "Low" to "High".Oct 1 2015, 3:29 PM
Jdforrester-WMF changed the title from "VisualEditor: Provide a way for the user to switch between VisualEditor and wikitext source editor modes without saving" to "Provide a way for the user to switch between VisualEditor and wikitext source editor modes without saving".Oct 2 2015, 7:54 PM
Jdforrester-WMF edited the task description. (Show Details)
Jdforrester-WMF added a project: WikiEditor.

Change 245593 had a related patch set uploaded (by Alex Monk):
[WIP][POC][DONOTMERGE] Allow switching from wikitext to VE

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

Change 245593 merged by jenkins-bot:
Allow switching from wikitext to VE

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

Change 250939 had a related patch set uploaded (by Esanders):
Target init: Add edit mode switch icons to VE and WE toolbars

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

More prominent VE switcher:

WikiEditor switcher (top right):

Change 250939 merged by jenkins-bot:
Target init: Add edit mode switch icons to VE and WE toolbars

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

Jdforrester-WMF closed this task as "Resolved".Nov 4 2015, 2:17 PM
Jdforrester-WMF claimed this task.

Change 250965 had a related patch set uploaded (by Jforrester):
Target init: Add edit mode switch icons to VE and WE toolbars

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

Change 250965 merged by jenkins-bot:
Target init: Add edit mode switch icons to VE and WE toolbars

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

Mvolz added a subscriber: Mvolz.Nov 8 2015, 12:49 PM
Qgil mentioned this in Unknown Object (Task).Feb 2 2016, 1:53 PM
GOIII moved this task from Backlog to Closed on the WikiEditor board.Apr 3 2016, 9:02 AM

Add Comment