Topic on VisualEditor/Feedback

Issue: There is no visual representation of an inserted 'basic' audio file

6
Summary last edited by Elitre (WMF) 09:45, 6 September 2017 6 years ago
197.218.81.5 (talkcontribs)

Steps to reproduce

  1. Go to Project:Sandbox
  2. Click edit (to get into visualeditor)
  3. Click Insert on the menu
  4. Click media
  5. Enter "Beethoven Prometheus Creatures Op. 43 No. 14 - Andante" (or any audio file)
  6. Click "use this image"
  7. Click advanced settings
  8. Click basic
  9. Click insert

Alternative steps

  1. Go to Project:Sandbox
  2. Click edit (but go into wikitext editor)
  3. Paste "[[file:example.ogg]]" in the text area
  4. Switch to VisualEditor (e.g. keyboard shortcut alt + shift + v)

Expected

Some visual representation of the audio file.

Actual

No visual representation or placeholder indicating where the file is.

Proposed solution

Either

  • Show audio player; or
  • Show at least a placeholder (maybe an icon for audio) for the file if the full player isn't feasible for now

On a page with no other content, it is not really clear that the page contains anything which result in accidental removal of content.

197.218.81.5 (talkcontribs)

It seems that there is an image placed, but it uses the width and height of 0. An temporary easy solution is simply to remove that  :

<a class="image ve-ce-leafNode ve-ce-focusableNode mw-default-size ve-ce-mwInlineImageNode" contenteditable="false"><img src="https://www.mediawiki.org/w/resources/assets/file-type-icons/fileicon-ogg.png" width="0" height="0"></a>
TheDJ (talkcontribs)

A/V is not yet supported by Parsoid and VisualEditor. They are working on it for the next version.

197.218.91.135 (talkcontribs)

This is clearly a software defect, VisualEditor may not support audio / video yet it still should show some representation of content that it doesn't support. Even if they prefer not to show anything it certainly should output console errors.

It is also easy enough to prove this is a issue:

  1. Go to Project:Sandbox:
  2. Edit page using visualEditor
  3. Once the page is loaded click on the second line
  4. Click backspace (until the cursor is in the first line)

Console output:

Uncaught TypeError: Cannot read property 'ownerDocument' of undefinedOO.ui.Element.static.getRootScrollableElement @ VM551 oojs-ui-core.js?9ad23:1174OO.ui.Element.static.getClosestScrollableContainer @ VM551 oojs-ui-core.js?9ad23:1224OO.ui.Element.static.scrollIntoView @ VM551 oojs-ui-core.js?9ad23:1246ve.ce.Surface.onModelSelect @ ve.ce.Surface.js?f6b38:2537oo.EventEmitter.emit @ oojs.jquery.js?4bc88:829ve.dm.Surface.setSelection @ ve.dm.Surface.js?54266:744ve.dm.Surface.setLinearSelection @ ve.dm.Surface.js?54266:574ve.ce.LinearDeleteKeyDownHandler.static.execute @ ve.ce.LinearDeleteKeyDownHandler.js?6d805:216ve.ce.KeyDownHandlerFactory.executeHandlersForKey @ ve.ce.KeyDownHandlerFactory.js?4e490:88ve.ce.Surface.onDocumentKeyDown @ ve.ce.Surface.js?f6b38:1143ve.EventSequencer.callListener @ ve.EventSequencer.js?b5ffb:447ve.EventSequencer.onEvent @ ve.EventSequencer.js?b5ffb:269(anonymous function) @ ve.EventSequencer.js?b5ffb:65jQuery.event.dispatch @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=…:4670elemData.handle @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=…:4338

Also, it flashes and shows the media player for a few seconds before hiding it. Although this might be intermittent.

Whatamidoing (WMF) (talkcontribs)

I'm pretty sure that this is an old bug, but I can't find it today. (Perhaps a regression?)

197.218.81.67 (talkcontribs)

> I'm pretty sure that this is an old bug, but I can't find it today. (Perhaps a regression?)

Yes, it seems to be very old problem as noted on the task in the summary, although the question is whether it became worse at some point. The video in question shows the exact steps to reproduce one part of this problem.

It is likely that previously something would show up when a plain audio file was added or edited.