Allow the VE dialog for math elements to be movable and resizable
OpenPublic

Description

Copied from bug 43058

Screenshot of editing a math block

Some small tweaks are needed to the dialog box. Editing the last equation at
https://www.mediawiki.org/wiki/VisualEditor:TestMath?veaction=edit
there are a a few problems

  1. The dialog obscures the actual equation
  2. The dlalog is too small to see the whole source text of the equation

This could be solved the making the dialog, moveable and resizeable.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=12223

attachment missing in source

bzimport added a project: Math.Via ConduitNov 22 2014, 2:36 AM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz57437.
SalixAlba created this task.Via LegacyNov 22 2013, 6:46 PM
He7d3r added a comment.Via ConduitNov 22 2013, 7:02 PM

But it should also be smart enough not to present a tiny box when the formula is already very large. E.g. the last example from
https://www.mediawiki.org/w/index.php?title=VisualEditor:TestMath&oldid=749189&veaction=edit

Otherwise the user will need to resize the box on every formula of some pages

Theopolisme added a comment.Via ConduitNov 22 2013, 10:57 PM

Cross-posting from previous bug

@Richard/others: Thinking about making the dialog draggable and resizable...

The solution I initially think of is installing jquery.ui and then adding some
parameters to OO.ui.Window that allow it to be made resizable and/or draggable.
However, if I recall correctly one of the principles of OOJS was to be
self-contained... so would this be wrong? Could someone else with a bit more
firsthand experience chime in here?

SalixAlba added a comment.Via ConduitNov 23 2013, 4:26 PM

Just to note I'm just an end user, so don't really know much about how the Visual Editor code works. It might be an idea to consult with the VE people for the best way to achieve this. I've not found any other VE dialog which is movable or resizable, so I'm not sure if there is code you can copy.

What is really important is that the box is big enough. Following from Helders comment you could detect the size of the original equation and size accordingly.

What might also be possible would be to detect if the equation is inline or a block mode. (In the tex world this would be $eqn$ vrs $$eqn$$) a larger edit window is preferred for block mode equations. Its a little tricker to detect the difference in wikitext, suronding text on the same line indicates inline mode. Being a single item in a list element <li><math> ...</math></li> indicates block mode.

He7d3r added a comment.Via ConduitNov 23 2013, 4:32 PM

(In reply to comment #3)

Just to note I'm just an end user, so don't really know much about how the
Visual Editor code works. It might be an idea to consult with the VE people
for
the best way to achieve this. I've not found any other VE dialog which is
movable or resizable, so I'm not sure if there is code you can copy.

See bug 49969 (and maybe bug 49549).

(...)
What might also be possible would be to detect if the equation is inline or a
block mode.

See bug 12223.

gerritbot added a comment.Via ConduitNov 26 2013, 5:08 PM

Change 97750 had a related patch set uploaded by Catrope:
Fix moving over an image with the arrow keys in Firefox

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

Jdforrester-WMF added a comment.Via ConduitNov 26 2013, 5:10 PM

(In reply to comment #5)

Change 97750 had a related patch set uploaded by Catrope:
Fix moving over an image with the arrow keys in Firefox

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

Mis-targeted, sorry!

Qgil added a comment.Via ConduitDec 16 2013, 7:33 PM

I'm still trying to get a Google Code-in task or more out of these VE Math plugin reports...

If I understand the comments, the "movable" part can't be fixed for this plugin because it depends on VE's current capacity to do so (bug 49969), right?

Can the size of the window be controlled? If so, could this be a GCI task?

Jdforrester-WMF added a comment.Via ConduitDec 16 2013, 7:38 PM

Re-positioning of OOjs UI windows is a really major piece of work, yes.

Re-sizing is very do-able, however.

bzimport added a comment.Via ConduitFeb 8 2014, 11:04 PM

physik wrote:

Can someone look at https://gerrit.wikimedia.org/r/#/c/105647/ ... It would be great to merge this before it has to rebased manually again.

bzimport added a comment.Via ConduitOct 19 2014, 7:53 PM

physik wrote:

Change was merged. Seems to be fixed.

Jdforrester-WMF added a comment.Via ConduitOct 20 2014, 8:08 PM

This is only done for auto-resizing and auto-positioning, not manual resizing and positioning ("dragging") which this bug is asking for (and which depends on bug 49969). Reopening.

matmarex changed the status of blocking task T51969: OOjs UI: Dialogs should be repositionable/draggable from "Open" to "Stalled".Via WebDec 18 2014, 5:59 PM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.