Page MenuHomePhabricator

VisualEditor: Come up with a solution of section edit links' placement when they are floated right (due to a gadget)
Open, LowestPublic

Description

Until a recent MediaWiki change the default behavior of edit section links was to float to the far side of the heading (right on LTR Wikis, assume this case in the following).

This was changed recently but almost all Wikis provide Gadgets to restore the old behavior (see http://en.wikipedia.org/wiki/MediaWiki:Gadget-righteditlinks.css or http://de.wikipedia.org/wiki/MediaWiki:Gadget-editsection-align-end.css for examples)

The problem is, that the VisualEditor's fly-out-links reserve space to the right for the "edit source" link. Therefore when aligning the links right they actually appear with a large distance to the page-margin. The fly-outs should therefore be modified to not reserve any space so the "edit" link is correctly aligned right.

To prevent the fly-outs to shift the whole "edit" link left as soon as they become visible they could be changed to fly-out to the left in this case or to the bottom.


Version: unspecified
Severity: enhancement

Details

Reference
bz50405

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:49 AM
bzimport set Reference to bz50405.

(In reply to comment #0)

Until a recent MediaWiki change the default behavior of edit section links
was
to float to the far side of the heading (right on LTR Wikis, assume this case
in the following).
This was changed recently but almost all Wikis provide Gadgets to restore the
old behavior (see
http://en.wikipedia.org/wiki/MediaWiki:Gadget-righteditlinks.css or
http://de.wikipedia.org/wiki/MediaWiki:Gadget-editsection-align-end.css for
examples)
The problem is, that the VisualEditor's fly-out-links reserve space to the
right for the "edit source" link. Therefore when aligning the links right
they
actually appear with a large distance to the page-margin. The fly-outs should
therefore be modified to not reserve any space so the "edit" link is
correctly
aligned right.
To prevent the fly-outs to shift the whole "edit" link left as soon as they
become visible they could be changed to fly-out to the left in this case or
to the bottom.

Note that in general WMF does not support gadgets and does not encourage their use; they are highly likely to break like this when the code they depend on changes, and this is a good example of that breakage. :-(

I've re-written this a bit to be clearer. As "lowest" priority, reflecting that we don't support gadgets. of course anyone who is interested in patching is welcome to suggest ideas/code that could address this.

I see your point but you have to admit that without changing the style of the edisection-links these Gadgets wouldn't have been necessary in the first place. They are basically "fixing" what WMF "broke" so it would be nice if you at least tried to supply a solution.

Trivial patch idea

To add some content: Wouldn't a trivial patch along the lines of the attachment be sufficient to fix this problem?

I'm sure something like this could be implemented with minimal effort for somebody with a little experience!

Attached: