Adjust use of 'plainlinks' class to fix button styling in some cases

It was previously applied on the whole wrapper of the anon
warning, including the buttons. In some cases (on mobile, and
on some sites with weird customized site CSS), this causes the
buttons to lose some styling. Apply it only on the label.
Follow-up to 522b7932d7.

Bug: T270536
Bug: T291000
Change-Id: Ia4bc99fc219a80efbf46a7cc196ea29720a34de8
This commit is contained in:
Bartosz Dziewoński 2021-06-22 19:01:52 +02:00 committed by Krinkle
parent 4c39068eb3
commit 3dbc5749ea

View file

@ -212,7 +212,7 @@ function ReplyWidget( commentController, comment, commentDetails, config ) {
returnto: mw.config.get( 'wgPageName' ) returnto: mw.config.get( 'wgPageName' )
}; };
this.anonWarning = new OO.ui.MessageWidget( { this.anonWarning = new OO.ui.MessageWidget( {
classes: [ 'ext-discussiontools-ui-replyWidget-anonWarning plainlinks' ], classes: [ 'ext-discussiontools-ui-replyWidget-anonWarning' ],
type: 'warning', type: 'warning',
label: mw.message( 'discussiontools-replywidget-anon-warning' ) label: mw.message( 'discussiontools-replywidget-anon-warning' )
.params( [ .params( [
@ -222,6 +222,7 @@ function ReplyWidget( commentController, comment, commentDetails, config ) {
.parseDom() .parseDom()
} ); } );
this.anonWarning.$element.append( this.$actions ); this.anonWarning.$element.append( this.$actions );
this.anonWarning.$label.addClass( 'plainlinks' );
this.$element.append( this.anonWarning.$element, this.$footer ); this.$element.append( this.anonWarning.$element, this.$footer );
this.$actionsWrapper.detach(); this.$actionsWrapper.detach();
} }