Page MenuHomePhabricator

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

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:

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:14 AM
Aklapper removed a subscriber: TrevorParscal.
matmarex subscribed.

This task refers to a short-lived VE feature, where instead of the dual "edit" and "edit source" section edit links we all know and love today, it only displayed one of the links, and the second one would appear ("fly-out") when the links were hovered with the mouse. It was so short-lived that I can't even find any screenshots of it; it was implemented in change 69984 (Jun 26, 2013) and then removed in change 77165 (Aug 02, 2013). This task was filed on Jun 29.

No solution is needed any more since we started showing both links, and this probably should have been closed in 2013!