Page MenuHomePhabricator

Empty space added above talk page comments in some cases (page without initial header; before some templates; in a gallery)
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
matej_suchanek
Apr 8 2022, 4:34 PM
Referenced Files
F35070448: Screenshot 2022-04-27 at 16.36.03.png
Apr 27 2022, 3:44 PM
F35070450: Screenshot 2022-04-27 at 16.36.14.png
Apr 27 2022, 3:44 PM
F35070456: Screenshot 2022-04-27 at 16.38.49.png
Apr 27 2022, 3:44 PM
F35051739: image.png
Apr 14 2022, 7:03 PM
F35051686: image.png
Apr 14 2022, 6:05 PM
F35051684: image.png
Apr 14 2022, 6:03 PM
F35043375: emptyheader.png
Apr 8 2022, 5:04 PM
F35043989: obrazek.png
Apr 8 2022, 4:34 PM

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:
At the very beginning, there is an empty space. The source HTML contains an empty span tag, which seems to be produced by DiscussionTools:

<span data-mw-comment="{&quot;type&quot;:&quot;heading&quot;,&quot;level&quot;:0,&quot;id&quot;:&quot;h--2022-04-06T20:00:00.000Z&quot;,&quot;replies&quot;:[&quot;c-David_V.-2022-04-06T20:00:00.000Z&quot;],&quot;headingLevel&quot;:99,&quot;placeholderHeading&quot;:true,&quot;name&quot;:&quot;h-David_V.-2022-04-06T20:00:00.000Z&quot;}"><span data-mw-comment-start="" id="h--2022-04-06T20:00:00.000Z"></span><span data-mw-comment-end="h--2022-04-06T20:00:00.000Z"></span></span>

What should have happened instead?:
There is no such space (the artifact is not produced or is hidden).

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

obrazek.png (284×1 px, 72 KB)

1.39.0-wmf.6 (d88a0c4)

Event Timeline

matmarex added subscribers: Pikne, Marc.

Related issues reported in comments on that task:

Setting the marker to display:inline-block appears to break something else after all. An empty inline element in front of a <div> block is invisible, but an empty inline-block element in front of a <div> block appears to cause a quite visible space. B.t.w. I'm not sure if this is only the case with <div> blocks.

Is it possible to narrow the above fix to the browser/system/circumstances it is intended for?

There also an exessive whitespace in front of headerless first comment at the top of page, where display:inline-block apparently applies to an empty header:

emptyheader.png (295×803 px, 20 KB)

matmarex moved this task from Backlog to Triaged on the DiscussionTools board.
matmarex added a subscriber: Esanders.

@Esanders It looks like the original issue only affected headings, perhaps we can apply the fix only inside headings to avoid causing these issues?

(Also, thanks for reporting this, everyone. The fix will probably have to wait until next week, as people are unhappy about deploying changes right before the weekend.)

About the example on nl.wikipedia that @matmarex quoted:

Any temporary quickfixes for these "Articles for deletion" pages on nl.wikipedia are made in the tbp-links template. So keep that in mind while checking this example when investigating/fixing the issue.
With kind regards, Mar(c).

Change 778637 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Revert "Make comment markers inline-block to fix comment wrapping in Safari"

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

About the example on nl.wikipedia that @matmarex quoted:

Any temporary quickfixes for these "Articles for deletion" pages on nl.wikipedia are made in the tbp-links template. So keep that in mind while checking this example when investigating/fixing the issue.
With kind regards, Mar(c).

I would suggest updating this fix to set span[data-mw-comment-start] to display:none. We are planning to revert the change setting it to inline-block, and with your negative margins this will cause the text to overlap. All the hacks can be removed at the end of the week once the code has been successfully deployed.

Change 778637 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Revert "Make comment markers inline-block to fix comment wrapping in Safari"

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

matmarex added a project: Editing QA.

The fix will be deployed to Wikimedia wikis later this week, per the usual schedule.

matmarex renamed this task from Talk pages without initial header start with space to Empty space added above talk page comments in some cases (page without initial header; before some templates; in a gallery).Apr 14 2022, 6:01 PM
matmarex added subscribers: XanonymusX, Raymond, doctaxon.

Also affects galleries when they appear at the beginning of a comment:

When using a gallery at the beginning of a comment on a talk page, apparently a span data-mw-comment-start with an anchor id is added inside the gallery, which causes the first image to have a larger top-margin. See the examples on dewiki, where it was first reported.

image.png (2×3 px, 726 KB)

Now deployed everywhere, and the examples above look correct now.

@Marc As a result of your quickfix, there is now a different issue on https://nl.wikipedia.org/wiki/Wikipedia:Te_beoordelen_pagina's/Toegevoegd_20220406:

image.png (2×3 px, 609 KB)

I tried to revert your workaround in https://nl.wikipedia.org/w/index.php?title=Sjabloon:Tbp-links/styles.css&diff=61738717&oldid=61645980, but somehow that did not fix it.

All examples look good now

Screenshot 2022-04-27 at 16.36.03.png (702×3 px, 293 KB)

Screenshot 2022-04-27 at 16.36.14.png (806×3 px, 315 KB)

Screenshot 2022-04-27 at 16.38.49.png (1×2 px, 440 KB)

I'll go ahead to verify it.

ppelberg claimed this task.