Michael added a comment.
Maybe my post above was a bit too concise, so here is a longer version of my reasoning. Also, some update. I think we should not try to extract a single component that replaces all usages of the `EventEmittingButton` component in Termbox. From my point of view there were two main reasons for that: **1. Termbox and WikidataBridge/OOUI use significantly different styles for the conceptually same elements (which is fine!)** Example 1: The Termbox cancel button has different hover behavior and click/active styles than a frameless, icon only ButtonWidget - Termbox cancel button: https://tools-static.wmflabs.org/wikibase-termbox-storybook/?path=/story/eventemittingbutton--cancel - OOUI frameless, icon-only ButtonWidget: https://doc.wikimedia.org/oojs-ui/master/demos/?page=widgets&theme=wikimediaui&direction=ltr&platform=desktop#ButtonWidget-frameless-icon-only Example 2: The Termbox framelessProgressive button has different hover behavior and click/active styles than a frameless, icon only ButtonWidget - Termbox framelessProgressive button: https://tools-static.wmflabs.org/wikibase-termbox-storybook/?path=/story/eventemittingbutton--framelessprogressive - OOUI frameless, progressive ButtonWidget: https://doc.wikimedia.org/oojs-ui/master/demos/?page=widgets&theme=wikimediaui&direction=ltr&platform=desktop#ButtonWidget-frameless-progressive Example 3: The Termbox publish button uses a different icon than from what is available in OOUI - Termbox publish button: https://tools-static.wmflabs.org/wikibase-termbox-storybook/?path=/story/eventemittingbutton--publish - OOUI Icons: https://doc.wikimedia.org/oojs-ui/master/demos/?page=icons&theme=wikimediaui&direction=ltr&platform=desktop Termbox and OOUI seem to share styles for the primaryProgressive button. **2. Termbox uses links as buttons in order to be able to create a Link in SSR which is then overloaded by client-side js.** The understanding I got from conversation was that there is a single instance <https://github.com/wikimedia/wikibase-termbox/blob/dd989ca43e04239d13cb5a7a37318eb40cca530e/src/components/TermBox.vue#L15> where that functionality was used. But apparently these buttons are also used as true links (i.e. regardless of SSR) in the AnonEditWarning <https://github.com/wikimedia/wikibase-termbox/blob/dd989ca43e04239d13cb5a7a37318eb40cca530e/src/components/AnonEditWarning.vue#L19> **Conclusion** Based especially on reason 1, I think we should not try to replace all buttons in Termbox with a shared one, because that would require us to integrate two styles for the same conceptual button into one component. Also, in order to keep the component simple we should not switch between two so conceptually different HTML tags as `<button>` and `<a>` but use one consistently. Since we will apparently not get around using these "buttons" as links, it makes most sense to use `<a>` tags for this component and to look to OOUI for how to make "buttons" with them that are still accessible. Further we should focus on what is needed for the current story, that is the publish button, i.e. primary progressive button. That is why I suggest adjusting the I55c95b7d3e6a5c594139c228a083c4c69fa2c0ed <https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/530865> patch as described above and to proceed incrementally as we pass through the stories. TASK DETAIL https://phabricator.wikimedia.org/T230326 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Matthias_Geisler_WMDE, Michael Cc: 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, Lydia_Pintscher, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs