Michael added a comment.

  In T230326#5459413 <https://phabricator.wikimedia.org/T230326#5459413>, 
@Lucas_Werkmeister_WMDE wrote:
  
  > Side note: OOUI has two general classes for buttons. In both, a tag name is 
configurable, but `ButtonWidget` 
<https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.ButtonWidget> is for 
general, client-handled buttons (`<span>` by default),
  
  My understanding was that `ButtonWidget` 
<https://doc.wikimedia.org/oojs-ui/master/demos/?page=widgets&theme=wikimediaui&direction=ltr&platform=desktop#ButtonWidget-normal>
 uses an `<a tabindex="0">` as the clickable element, wrapped in a `<span>` for 
styling purposes. But I think it is quite possible that I missed something or 
misunderstood some functionality. How would I change the tag name?
  
  > whereas `ButtonInputWidget` 
<https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.ButtonInputWidget> is 
for forms (`<button>` by default).
  > To be honest, I’ve lost track of the different types of buttons we’re 
discussing here, so I can’t judge if all their needs could/should be served by 
one implementation. Which ones are we talking about?
  
  Right now we are talking buttons based on a `<a>`, i.e. something similar to 
`ButtonWidget`. While I still maintain that it would be best to have button 
based on `<button>` as the general default, we are going to need one based on 
`<a>` to implement the buttons in Anon edit warning 
<https://tools-static.wmflabs.org/wikibase-termbox-storybook/?path=/story/anoneditwarning--in-modal>
 and I'm too exhausted to have this exact discussion again when the time for 
implementing that component comes. That is why I'm fine with having only one 
component for now that is based on a `<a>`.
  
  In the longer term future we are going to need both, as a Button based on a 
clickable `<a>` or `<span>` cannot submit a form. But neither Termbox nor 
bridge will submit forms without js, so it doesn't matter for now.
  
  But I think the main issue of the discussion is whether this button we are 
implementing here should be conceptually based OOUI's `ButtonWidget` or 
Termbox' `EventEmitingButton`. I outlined above my reasoning as to why I think 
it should be based on `ButtonWidget`. I just renamed that button in my patch to 
make this more clear, though I would want to wait with investing more time into 
implementing the review comments until we decided whether we actually want to 
go with this approach.

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

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

To: Matthias_Geisler_WMDE, Michael
Cc: Lucas_Werkmeister_WMDE, Lydia_Pintscher, Charlie_WMDE, Jakob_WMDE, Michael, 
Aklapper, Pablo-WMDE, Hook696, Daryl-TTMG, RomaAmorRoma, 0010318400, 
E.S.A-Sheild, darthmon_wmde, joker88john, DannyS712, CucyNoiD, Nandana, 
NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, 
Cpaulf30, Lahi, Gq86, Af420, Darkminds3113, Bsandipan, Lordiis, 
GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, 
LawExplorer, WSH1906, Lewizho99, Maathavan, _jensen, rosalieper, Wikidata-bugs, 
aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to