Topic on VisualEditor/Feedback

JavaScriptless experience

11
Gryllida (talkcontribs)

Hi. I'd like to know why VisualEditor tab doesn't show up when I disable JavaScript.

From what I could see, the server should be able to send the thing (either HTML or wiki markup) to my browser, where I could edit it. Browsers are quite capable of entering edit mode for chunks of HTML: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_Editable

Then click Save and have the browser sends the new HTML back to server. Seems trivial.

TheDJ (talkcontribs)

Basically, the browers are all broken as hell. There is a bit of a technical explanation to this in one of the Wikimania 2014 talks. Specially starting from this point. The audio is a bit bad, but if you crank up the volume it should be watchable. complete VE techtalk.

Gryllida (talkcontribs)

Would the browser be broken just as much as to make me uncomfortable, or would it also return garbage and break the page?

I'd watch these things, but a transcript would be nice. I learn by reading (I already have a couple videos overdue since March 2014, but I'm not touching them despite sincere interest in the topic).

Jdforrester (WMF) (talkcontribs)

What TheDJ said, essentially.

To be fair to the browser manufacturers, our needs are significantly more complex than basic ContentEditable. The vast majority of VisualEditor's codebase (of which there is a lot) is for providing nice ways to edit content that doesn't exist in the ContentEditable world (like images or templates) and stopping browsers from letting you do things you can't (like changing the colour of the border on a thumbnail'ed image). There's also the entertaining litany of browser-specific quirks and bugs that we have to work around in this area, which is only semi-standardised.

As so often, if a quick glance at something means it "seems trivial" when people are spending several years working on it, you've may not have looked deeply enough. :-)

Gryllida (talkcontribs)

A bit hard to read the grey stuff, sorry for being out of current style here...

Yeah, visual editor doesn't edit templates very visually atm. All these raw arguments to type in. :-)

I can see another current problem with templates - a lot of template workflows are carried out manually, or manually using JavaScript: some documentation and use-cases. As you see, they are typically resolved by JavaScript, using parsoidObj or using manual parsing.

I'd like to see this happen server-side with aid of workflow definitions in templates markup. For instance, imagine that draft submission works like this: {{submit}} is often replaced by {{tasks|add sources|remove copyrighted material|another common task|custom comment}} and a {{review-rejected|custom note on sources|custom note on copyright|review comment|...}} on a draft talk page.

There should be means to add a button on the {{submit}} template which opens a form that asks reviewer for

  • a list of tasks: add sources and rm (C) material
  • comments on each: perhaps a helpful suggestion, reviewer probably found a source. Possibly a note which specific portion is copyrighted.
  • and a full review comment

Then, when form is submitted, the two edits are made -- {{submit}} replaced with {{tasks}}, and a new {{review-rejected}} is placed on the talk page.

How would we do it? Start with backend - have an API which easily allows to replace templates and pass params around like that. Probably Parsoid already exposes that, dunno. Once an API is clear, time to work on an implentation, and as this goes through forms, I imagine it's also, in theory, doable for JavaScriptless users too.

Jdforrester (WMF) (talkcontribs)

Workflow templates are very much in the world of Flow's potential area, rather than VE itself. I don't really have any plans in the editing world for this kind of template, though potentially I could be convinced.

Gryllida (talkcontribs)

On brokedness of contentEditable: I'd ideally like more details here, to understand the scope of the problem.

110.148.190.247 (talkcontribs)

Even disregarding any browser brokenness, contentEditable without JavaScript might as well just be plain text. Without JavaScript to allow you to insert HTML, all you'd be able to do is delete formatted text and extend existing formatted text, which is hardly makes a usable editor.

Jdforrester (WMF) (talkcontribs)

Actually, some basic OS shortcuts like Ctrl+B etc. work, but yes, it's very limited.

110.148.190.247 (talkcontribs)

Not by default they sure don't. Ctrl+B opens the bookmarks sidebar.

TheDJ (talkcontribs)
Reply to "JavaScriptless experience"