Lucas_Werkmeister_WMDE created this task.
Lucas_Werkmeister_WMDE added projects: Wikidata, Wikidata-Bridge.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  As a Wikipedia editor, I want to be able to use the Data Bridge with an 
image, such as an “edit” icon, as the “button” / “link” to activate the bridge.
  
  **Problem:**
  The bridge is initialized on all links that are direct children of an element 
with a `data-bridge-edit-flow` attribute:
  
  name=BridgeDomElementsSelector.selectElementsToOverload()
    const selectedLinks = Array.from( document.querySelectorAll( 
'[data-bridge-edit-flow] > a' ) );
  
  However, since the new media structure for Parsoid compatibility was rolled 
out, an image link is wrapped in an additional element that causes it not to be 
matched by this selector anymore:
  
    <span data-bridge-edit-flow="single-best-value">
      <span class="mw-valign-text-top" typeof="mw:File/Frameless"> <!-- NEW! -->
        <a 
href="https://wikidata.beta.wmflabs.org/wiki/Q540739?uselang=en#P725"; 
title="Edit this on Wikidata" rel="nofollow"><img alt="Edit this on Wikidata" 
src="..." decoding="async" width="10" height="10" class="mw-file-element" 
srcset="..." data-file-width="20" data-file-height="20"></a>
      </span>
    </span>
  
  **Example:**
  This can currently be seen on Beta enwiki:Wikidata Bridge Showcase 
<https://en.wikipedia.beta.wmflabs.org/wiki/Wikidata_Bridge_Showcase>.
  
  The DOM change was deployed to cawiki on 15 December 2022 
<https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/866653>, and at 
the same time (plus a couple of days for parser cache expiry), we stopped 
seeing Data Bridge metrics in Grafana 
<https://grafana.wikimedia.org/d/pVG7xcAZz/wikidata-bridge?orgId=1&viewPanel=2&from=1664582400000&to=1677542400000>:
  F41663246: image.png <https://phabricator.wikimedia.org/F41663246>
  
  **BDD**
  GIVEN a page with wikitext like `<span 
data-bridge-edit-flow="single-best-value">[[File:OOjs UI icon 
edit-ltr-progressive.svg|frameless|text-top|10px|alt=Edit this on 
Wikidata|link=https://wikidata.beta.wmflabs.org/wiki/Q540739?uselang=en#P725|Edit
 this on Wikidata]]</span>`
  AND Data Bridge is enabled on the wiki
  WHEN visiting the page
  AND clicking the link / icon
  THEN data bridge is opened
  
  **Acceptance criteria:**
  
  -

TASK DETAIL
  https://phabricator.wikimedia.org/T354750

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Aklapper, Danny_Benjafield_WMDE, Astuthiodit_1, 
karapayneWMDE, Invadibot, Lectrician1, maantietaja, ItamarWMDE, Akuckartz, 
Michael, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, KimKelting, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Aschroet, Wikidata-bugs, aude, 
Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to