Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

Tables inside divs should not be wrapped in div.noresize
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The table is being wrapped in a noresize class but this shouldn't happen if the table is itself a direct child of a DIV element.

//

screenshot 706.png (906×1 px, 290 KB)

What should have happened instead?:
The table should not be wrapped with div.noresize as div.ts-wikidata-population-table should act as an opt out.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Derived Requirement

Ensure that tables within a div.ts-wikidata-population-table are not wrapped with a div.noresize on the MediaWiki sandbox page.

BDD

Feature: Table Wrapping in Sandbox Page

Scenario: Ensure tables inside a div.ts-wikidata-population-table are not wrapped with div.noresize

Given a user is viewing the sandbox page on MediaWiki
When the user resizes the browser window
Then tables within a div.ts-wikidata-population-table should not be wrapped with div.noresize
Test Steps

Test Case 1: Ensure Tables in div.ts-wikidata-population-table are Not Wrapped with div.noresize

  1. Visit MediaWiki sandbox page.
  2. Resize the browser window.
  3. AC1: Confirm that tables inside a div.ts-wikidata-population-table are not wrapped with div.noresize.

QA Results - Prod

ACStatusDetails
1T367248#10222708

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Not ‘breaks on all skins’, breaks in new Vector specifically because of .noresize class. Works fine for me in regular Vector.

Screenshot 2024-06-11 at 6.09.27 PM.png (1×1 px, 1 MB)

That's how it's supposed to display? Huh. Okay.. I had assumed this shouldn't be floated; the heading shouldn't be overlapping infoboxes; and the [20][21] shouldn't be spilling out in Vector.

But, now I look a bit closer at this, it looks like this is not working to spec. The noresize class shouldn't be kicking in at all as the table has a parent div.ts-wikidata-population-table and we said we wouldn't apply this to tables inside div elements. Retagging.

Jdlrobson renamed this task from [Russian Wikipedia] Template:Wikidata/Population isn't responsive - breaks on all skins to Tables inside divs should not be wrapped in div.noresize.Jun 12 2024, 1:11 AM
Jdlrobson updated the task description. (Show Details)

The caption weirdness on your screenshot seems to be due to trying to fix <caption> issues when a .mw-collapsible table is collapsed (try to remove it: <caption> starts to be displaying one word per line). This should be fixed, yeah. If you know a better way, would be good to fix https://ru.wikipedia.org/wiki/Шаблон:Wikidata/Population/Table/styles.css with it.

There is also some weirdness with how multiple references are displayed, but that I can’t say anything about.

Change #1042415 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Test case: Tables inside divs should not be wrapped in div.noresize

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

Jdlrobson set the point value for this task to 2.Jun 14 2024, 7:00 PM
ovasileva subscribed.

Removing from this sprint for the time being so we can better coordinate with related tables work

Change #1042415 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] Test case: Tables inside divs should not be wrapped in div.noresize

Reason:

(Moved back to backlog)

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

(This task doesn't need any analysis - it's estimated and good to go. The current state is likely giving a bad impression of the Vector 2022 skin as it breaks certain tables with no way to opt out)

Just to clarify, by default tables will be wrapped by a div 'mw-parser-output', our JS will just have to handle this to not apply noresize when the table is wrapped by another div. this is also different in parsoid, where tables are wrapped by section elements

Change #1042415 restored by Bernard Wang:

[mediawiki/skins/Vector@master] Test case: Tables inside divs should not be wrapped in div.noresize

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

Change #1077462 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Update tables code to only target unwrapped tables

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

Change #1077462 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Update tables code to only target unwrapped tables

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

Jdlrobson lowered the priority of this task from Medium to Low.Oct 5 2024, 12:06 AM
Edtadros subscribed.

Unsure of how to test this in Beta given the table template. Let us know if there are any pages we can test on, or if it's better to just test in prod.

Since this behaviour is disabled in production, we can handle QA for this in production using this page: https://www.mediawiki.org/wiki/User:Jdlrobson/sandbox

Please open both sidebars and then follow the prompts for the three tables. Scrollable = no overlap. The second table in the screenshot is considered "overlap".

Screenshot 2024-10-08 at 6.09.05 PM.png (1×2 px, 403 KB)

Test Result - Mediawiki

Status: ✅ PASS
Environment: Mediawiki
OS: macOS Sonoma 15.0
Browser: Chrome 129
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Ensure Tables in div.ts-wikidata-population-table are Not Wrapped with div.noresize

  1. Visit MediaWiki sandbox page.
  2. Resize the browser window.
  3. ✅ AC1: Confirm that tables inside a div.ts-wikidata-population-table are not wrapped with div.noresize.

As designed per T367248#10212923

2024-10-11_11-30-18.mp4.gif (1×1 px, 3 MB)

ovasileva claimed this task.

Change #1042415 abandoned by Jdlrobson:

[mediawiki/skins/Vector@master] Test case: Tables inside divs should not be wrapped in div.noresize

Reason:

Done in https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/1077462

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