[go: nahoru, domu]

Page MenuHomePhabricator

Attempting to add a qualifier and then cancelling leaves a "trace" behind
Closed, ResolvedPublicBUG REPORT

Description

On the File page, going through the steps to add a new Qualifier to an existing statement, and then aborting that step, leaves behind a visible trace on the page.

Steps to Reproduce:

  1. Go to a File page and view the Structured Data tab. This bug is viewable on both BetaCommons and on master. Using a Statement Panel which already contains one or more statements will make this easier to see.
  2. Toggle a Statement panel into edit mode, and click the "Add Qualifier" button
  3. Do not actually submit a new qualifier; instead, click the Cancel button.
  4. (optional): Repeat this an arbitrary number of times.

Actual Results:

Each time the user toggles the qualifier input UI and then cancels it, something is left behind that confuses the panel. These "ghost qualifiers" were never submitted to the server and have no content... but you can see them.

In Read mode, you can see one "ghost qualifier" for each cancelled attempt that was made (note the little lines and weird spacing):

Screen Shot 2019-05-29 at 5.28.16 PM.png (644×1 px, 95 KB)

Screen Shot 2019-05-29 at 5.35.25 PM.png (546×1 px, 73 KB)

In Edit mode, the ghost qualifiers come back with a vengeance, and show up as full (empty, disabled) rows. They are there from the moment the panel becomes editable and persist between mode switches:

Screen Shot 2019-05-29 at 5.35.17 PM.png (964×1 px, 127 KB)

Expected Results:

If the user clicks "add qualifier" but then cancels without submitting new data, the DOM should revert to the same state that it was in before when it returns to read mode. If the user toggles back into edit mode again at this point, there should be no extra empty input rows visible.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 514263 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Make sure statements always get fed the new data

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

Change 514263 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Make sure statements always get fed the new data

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

Edtadros subscribed.

Test Result

Status: ❌ FAIL
OS: macOS Mojave
Browser: Chrome
Device: MBP

Test Artifact(s):

QA Steps

Note: I tested this on test commons: https://test-commons.wikimedia.org/wiki/File:Cat_with_headphones.gif

  1. Go to a File page and view the Structured Data tab.
  2. Toggle a Statement panel into edit mode, and click the "Add Qualifier" button
  3. Do not actually submit a new qualifier; instead, click the Cancel button.

❌ AC1: Ghost qualifiers can be seen in the gif below.

T224639.gif (922×937 px, 777 KB)

Change 517976 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@wmf/1.34.0-wmf.8] Make sure statements always get fed the new data

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

Looks like testcommons also got rolled back, so the failure is ok - the fix isn't there anymore. Let's test again next week :)

Change 517976 merged by Matthias Mullie:
[mediawiki/extensions/WikibaseMediaInfo@wmf/1.34.0-wmf.8] Make sure statements always get fed the new data

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

This fix was now backported to the currently deployed branch.
This works.