From bcd76a24c45c8ad3ff9fea41ff1aa35c8ea8a886 Mon Sep 17 00:00:00 2001 From: WMDE-Fisch Date: Fri, 4 Oct 2024 09:28:54 +0200 Subject: [PATCH] Allow the ref re-use sub-menu options to wrap We discovered that the label can be really long depending on the language. On mobile, where the screen is quite narrow it seems more useful to let it wrap. In this context it's even more relevant, because the options you can choose from might only differ in the last parts of the message. Bug: T375053 Change-Id: I9ec111ab1b80843f993d605ff11a1702c3d7b37c --- modules/ve-cite/ve.ui.MWReferenceResultWidget.less | 4 ++++ modules/ve-cite/ve.ui.MWReferenceSearchWidget.js | 1 + 2 files changed, 5 insertions(+) diff --git a/modules/ve-cite/ve.ui.MWReferenceResultWidget.less b/modules/ve-cite/ve.ui.MWReferenceResultWidget.less index b514cf0b4..aaa4e12e3 100644 --- a/modules/ve-cite/ve.ui.MWReferenceResultWidget.less +++ b/modules/ve-cite/ve.ui.MWReferenceResultWidget.less @@ -65,6 +65,10 @@ } } +.ve-ui-mwReferenceResultsReuseOptionsItem .oo-ui-menuOptionWidget > .oo-ui-labelElement-label { + white-space: initial; +} + // FIXME: T375053 Should just be temporary to test some UI changes .ve-ui-mwReferenceSearchReuseHacks .ve-ui-mwReferenceResultWidget { display: flex; diff --git a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js index 42315ca4f..6b312bfbf 100644 --- a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js +++ b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js @@ -219,6 +219,7 @@ ve.ui.MWReferenceSearchWidget.prototype.buildReuseOptionsMenu = function ( ref ) icon: 'ellipsis', invisibleLabel: true, menu: { + classes: [ 've-ui-mwReferenceResultsReuseOptionsItem' ], horizontalPosition: 'end', items: [ new OO.ui.MenuOptionWidget( {