jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/366551 )
Change subject: Use group label as popup label ...................................................................... Use group label as popup label The buildPopup() $content argument is now always the $element of a ConstraintReportList, and all ConstraintReportGroups are initialized with a label. Instead of adding a separate label to the popup content, the buildPopup() function moves the label of the first constraint report group into the head area of the popup content. (A label inside that head area gets some special padding, which is why we don’t just leave the label where it is.) Change-Id: Ieedfb8bdf51c683cf05c53a96d8ce73559bd7584 --- M modules/gadget.js 1 file changed, 13 insertions(+), 9 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/modules/gadget.js b/modules/gadget.js index a1d6268..d10b811 100644 --- a/modules/gadget.js +++ b/modules/gadget.js @@ -15,7 +15,7 @@ width: 400, padded: true, head: true, - label: $( '<strong>' ).text( mw.message( 'wbqc-' + messageKey + '-short' ).text() ) + label: $content.find( '.wbqc-reports:first-child > .oo-ui-labelElement-label *' ).detach() } } ); widget.popup.$element.css( 'z-index', 2 ); // prevent collision with rank selector and property grey field @@ -80,7 +80,8 @@ { statuses: [ { - status: 'violation' + status: 'violation', + label: mw.message( 'wbqc-potentialissues-short' ).text() }, { status: 'bad-parameters', @@ -113,7 +114,7 @@ reports, i, report, - stack, + list, $statement, $target; @@ -132,11 +133,14 @@ } } - stack = new OO.ui.StackLayout( { - items: reports, - continuous: true, - expanded: false, - classes: [ 'wbqc-reports' ] + list = new wikibase.quality.constraints.ui.ConstraintReportList( { + items: [ + new wikibase.quality.constraints.ui.ConstraintReportGroup( { + items: reports, + label: mw.message( 'wbqc-badparameters-short' ).text() + } ) + ], + expanded: false // expanded: true does not work within a popup } ); $statement = $( '.wikibase-statement-' + constraintId.replace( /\$/g, '\\$' ) + @@ -145,7 +149,7 @@ if ( $target.length === 0 ) { $target = $statement; } - $target.append( buildPopup( stack.$element, 'badparameters', 'warning' ).$element ); + $target.append( buildPopup( list.$element, 'badparameters', 'warning' ).$element ); } } -- To view, visit https://gerrit.wikimedia.org/r/366551 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieedfb8bdf51c683cf05c53a96d8ce73559bd7584 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints Gerrit-Branch: master Gerrit-Owner: Lucas Werkmeister (WMDE) <lucas.werkmeis...@wikimedia.de> Gerrit-Reviewer: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits