Lucas_Werkmeister_WMDE added a comment.

  We agreed during story time that the logging should happen in the app module, 
not in the init module, but didn’t yet know what exactly should be transmitted 
between the two modules.
  
  As far as I can tell, the app will need the DOM elements corresponding to the 
edit links (which will probably be the surrounding `<span 
data-bridge-flow="…">`s, not the `<a`>s directly) so it can attach event 
handlers to them. The app could extract all the information from those elements 
itself, but I’m not sure if that won’t result in duplication between init and 
app – after all, init doesn’t send all the DOM elements to the app, only the 
ones that correspond to edit links. Or the ones that looks like they might 
correspond to edit links even if they don’t contain complete information?
  
  I think either init extracts the full information for each edit link, and 
then passes to the app a list of init links along with their information; or 
init’s selection of DOM elements is fairly simple (CSS selector 
`[data-bridge-flow]`, i. e. has that attribute), and what init sends to app is 
a list of //candidate// elements, and it’s app’s responsibility to extract the 
information from them (and, if some information is missing, discard them since 
they’re not valid edit links at all).
  
  ---
  
  Side note: in the doc draft 
<https://www.mediawiki.org/wiki/Wikidata_Bridge/Development/DocDrafts/How_to_Enable_Wikidata_Bridge_for_your_Infobox>
 I used the name `data-bridge-edit-flow` rather than `data-bridge-flow` – 
either is fine, but I think the more verbose variant is also clearer. Any other 
opinions?

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

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

To: Lucas_Werkmeister_WMDE
Cc: Aklapper, Lucas_Werkmeister_WMDE, darthmon_wmde, Nandana, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Wikidata-bugs, 
aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to