[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Page MenuHomePhabricator

Viewport overflow because of data-mw-comment-start/end
Closed, ResolvedPublicBUG REPORT

Description

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

  • Use Safari (responsive mode or an iPhone SE 2019)
  • Visit https://meta.m.wikimedia.org/wiki/Community_Wishlist_Survey/FAQ (mobile, minerva skin)
  • Make sure the window is about the width of the heading "About the survey and the team" or likely any other h2 heading the width of the viewport
  • You get a tiny viewport overflow because the h2 doesn't break its line

What happens?:

  • I suspect this is because data-mw-comment-start/end add a tiny amount of inline spacing, or there is a bug with the measuring in Safari..
  • Setting display:none on them makes the viewport overflow disappear.

Event Timeline

Screenshot 2021-12-29 at 16.33.34.png (1×2 px, 1 MB)

After setting display:none;
Screenshot 2021-12-29 at 16.33.23.png (1×2 px, 921 KB)

Esanders subscribed.

The edit icon being inline is an edge case probably caused by this particular page being wrapped in a big <div>. Normal <h2>'s still work fine, so I don't think this is very high priority.

We can't hide these markers, but setting the marker to display:inline-block also fixes the layout and appears not to break anything else.

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

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

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

Change 771904 merged by jenkins-bot:

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

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

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)

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

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

Change 791101 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Make comment markers inline-block to fix comment wrapping in Safari (in headings only)

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

Change 791101 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Make comment markers inline-block to fix comment wrapping in Safari (in headings only)

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

Esanders added a project: Editing QA.
Esanders moved this task from Inbox to Low Priority on the Editing QA board.