Page MenuHomePhabricator

Place flaggedrevs_reviewform or mw-data-after-content in the body content area
Open, Needs TriagePublic

Description

Currently, the FlaggedRevs review form (which can be found in any of these articles) is in the mw-data-after-content container which in Vector 2022 takes the width of the body content area, the margin, and the right column.

As a reviewer, I need to scroll all the way down to get to this form. Instead, it should be in the body content area:

image.png (3,188×2,028 px, 515 KB)

Event Timeline

This should be fixable by changing the onSkinAfterContent hook to something else a little higher up in the skin.

https://gerrit.wikimedia.org/g/mediawiki/extensions/FlaggedRevs/+/7b16baa765d3453f5ea4094f3422ad982857dba2/includes/frontend/FlaggedRevsUIHooks.php#362

I couldn't find a good hook to change it to though. If anyone can think of a good hook, I can write a patch for it.

https://www.mediawiki.org/wiki/Manual:Hooks#Skinning_Templates

Looking at the Vector-2022 source code (rSVEC includes/templates/skin.mustache:55 (at 4235ff0efdb3)), the only thing inserted directly below the categories is the language selector on the main page (where it’s placed at the least discoverable possible place, at the bottom of the page…). So you probably couldn’t find the right hook because it doesn’t exist. Maybe one could be introduced, but that would mean that skins not updated wouldn’t display the review form at all, and I doubt anyone would take the time to update even all WMF-deployed skins (think about Modern and Cologne Blue), not to mention third-party ones.

On the other hand, it’s a one-liner in your vector-2022.js if you don’t mind the font size becoming a bit smaller:

$('#mw-fr-reviewform').appendTo('#bodyContent');

Change #1058721 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/extensions/FlaggedRevs@master] Move flaggedrevs_reviewform higher up

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

Change #1060788 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/extensions/FlaggedRevs@master] Move flaggedrevs_reviewform higher up

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

Change #1058721 abandoned by Novem Linguae:

[mediawiki/extensions/FlaggedRevs@master] Move flaggedrevs_reviewform higher up

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

Change #1060788 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/extensions/FlaggedRevs@master] Move up flaggedrevs_reviewform

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

Change #1068822 had a related patch set uploaded (by Abaris; author: Abaris):

[mediawiki/extensions/FlaggedRevs@master] WIP: Move review form to the main content area

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

Change #1069673 had a related patch set uploaded (by Abaris; author: Abaris):

[mediawiki/extensions/FlaggedRevs@master] [WIP] Move review form to the main content area

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

Test wiki on Patch demo by Doğu using patch(es) linked to this task was deleted:

http://patchdemo.wmcloud.org/wikis/e28a5e8963/w/

Change #1060788 abandoned by Novem Linguae:

[mediawiki/extensions/FlaggedRevs@master] Move up flaggedrevs_reviewform

Reason:

In favor of Dogu's patch.

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

Test wiki on Patch demo by Doğu using patch(es) linked to this task was deleted:

http://patchdemo.wmcloud.org/wikis/12ab10c33c/w/

Dogu removed Dogu as the assignee of this task.Nov 29 2024, 10:42 AM
Dogu subscribed.

Change #1069673 abandoned by Abaris:

[mediawiki/extensions/FlaggedRevs@master] [WIP] Move review form to the main content area

Reason:

The patch addresses the issue, but the main challenge is the absence of a hook for displaying content under the categories, which prevents us from rendering the review form there. Unfortunately, I don’t have the time to complete this. If someone else is available to take over and finish the patch, their help would be greatly appreciated.

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

Test wiki on Patch demo by Wargo using patch(es) linked to this task was deleted:

http://patchdemo.wmcloud.org/wikis/8e7f6f14f9/w/

Test wiki on Patch demo by Doğu using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org/wikis/4f87e8738b/w/