Last modified: 2014-10-20 20:24:57 UTC
Copied from bug 43058
Screenshot of editing a math block
Some small tweaks are needed to the dialog box. Editing the last equation at
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.
Created attachment 13550 [details]
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
Otherwise the user will need to resize the box on every formula of some pages
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?
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.
(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
> 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.
Change 97750 had a related patch set uploaded by Catrope:
Fix moving over an image with the arrow keys in Firefox
(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
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?
Re-positioning of OOjs UI windows is a really major piece of work, yes.
Re-sizing is very do-able, however.
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.
Change was merged. Seems to be fixed.
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.