From ce78add7e4174d32faf535f389927e82dd114f3e Mon Sep 17 00:00:00 2001 From: thiemowmde Date: Thu, 7 Sep 2023 17:48:16 +0200 Subject: [PATCH] Fix settings button not working on reference previews Apparently caused by a mistake in I8697232, and the QA for T340256 not covering the full functionality of what was changed in the patch. Bug: T345829 Change-Id: I482d32183ef7f2226c7ad114be0fbaf97bc7b898 --- resources/dist/index.js | Bin 47582 -> 47699 bytes resources/dist/index.js.map.json | Bin 216182 -> 216422 bytes src/ui/renderer.js | 5 ++++- .../referencePreview/referencePreview.js | 2 +- webpack.config.js | 4 ++-- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/dist/index.js b/resources/dist/index.js index 18219c81813681922ca486ee2f6f53be9252dee2..922d0b6ea1d8dd5455c8d49a01204935c1ae47ef 100644 GIT binary patch delta 138 zcmccjnd$NurVXh%jES4GbFPUnCQf#2lw-|I)5z1DoZOh|ZJnA^oLXI$Sfo&7o0nRy z;969aU!E delta 52 zcmccoh3VdBrVXh%Y)PdhCHZ-q({iqfOg2d8nY=!Pb8=oO8@rOGb)K4<#^i*?R7TCs Ic1@xd08&pAvH$=8 diff --git a/resources/dist/index.js.map.json b/resources/dist/index.js.map.json index 033e545c0820e6dd78f5a79c31f82c6d965bdc0e..f7f44470cd96782c80af78cfd2ae6030eaf81066 100644 GIT binary patch delta 6741 zcmb7JYjE7vb)S`)L~<}PSjNT>BR{Z=_aE(Bs|_J=@7=#vtJUs*SF6=(1p~8^R{MUh z_SH`Hfy^Y+X+9*kt)R&;ahwDS6uTB+Lx9i_2)Mz4#5B;lAKK9LQ>WxZGo49a=bXE; zB}2&ci`M^p&pqedbAIP_{hNn({pv4vow;~ink=_$Ts-dh)W!je$k?ataLI60~X0G5OI?!As`sk_wxPl?h;_mjoJewkWTEYyk@ zq`|{TlIM+Ww*RArCjKyFNKx^YbT6oGeS|D8l1D@HZpIHXBXv7f2FOJ&=ky<*9p_rNy2+s84vNslI=KwrRz2O zkU`QK*2;Xc$yeGw&G1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8b0rXX1i=I}U{X6Tr5}Lw@C+3!eYR9>;?arbwRs~*x zX!VF4U56D%qsD5+q&-!@+q@n67=f8Db0B6BDTd>rzclHhR z_JXtP#dm6s8!*ddM~6c)Z{eb7)BGy&?soOx?}oN{s3dnI^cacv)wW8!H@3CT549-# zXr$-->aXA1eNooA_p%pcj3tO;UM{Q2AOGPwV|fO;}Sm|LoK@ z{rKzVMmZgfumAne-g5N2`At1tQ;+?_Eu)vrqrlOo)zU3xw#IKbIEi@k$qHAmY+w?V z+?qr?0)Z*y4bt}lbG7xOBmGXz+w;KjkDfjLk>iF#*Uq(?&1&W3__ckzo-JL|_v_%v oKm6UkPoDhu>-)By{M_Ar=TH9j-o9;L_|>t#XMc6 { @@ -312,6 +312,9 @@ export function bindBehavior( preview, behavior ) { behavior.showSettings( event ); } ); + } else { + const err = new Error( 'Page previews: No settings button found in preview.' ); + mw.errorLogger.logError( err, 'error.web-team' ); } } diff --git a/src/ui/templates/referencePreview/referencePreview.js b/src/ui/templates/referencePreview/referencePreview.js index a85e98634..01febac8b 100644 --- a/src/ui/templates/referencePreview/referencePreview.js +++ b/src/ui/templates/referencePreview/referencePreview.js @@ -106,7 +106,7 @@ export function renderReferencePreview( // TODO: Remove when not in Beta any more if ( !mw.config.get( 'wgPopupsReferencePreviewsBetaFeature' ) ) { // TODO: Do not remove this but move it up into the templateHTML constant! - const settingsButton = document.createElement( 'button' ); + const settingsButton = document.createElement( 'a' ); settingsButton.classList.add( 'cdx-button', 'cdx-button--fake-button', 'cdx-button--fake-button--enabled', 'cdx-button--weight-quiet', 'cdx-button--icon-only', 'mwe-popups-settings-button' ); const settingsIcon = document.createElement( 'span' ); settingsIcon.classList.add( 'popups-icon', 'popups-icon--size-small', 'mw-ui-icon-settings' ); diff --git a/webpack.config.js b/webpack.config.js index 3b9a45adc..bcd1cdbf6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -118,8 +118,8 @@ module.exports = ( env, argv ) => ( { // Minified uncompressed size limits for chunks / assets and entrypoints. Keep these numbers // up-to-date and rounded to the nearest 10th of a kibibyte so that code sizing costs are // well understood. Related to bundlesize minified, gzipped compressed file size tests. - maxAssetSize: 46.5 * 1024, - maxEntrypointSize: 46.5 * 1024, + maxAssetSize: 46.7 * 1024, + maxEntrypointSize: 46.7 * 1024, // The default filter excludes map files but we rename ours. assetFilter: ( filename ) => !filename.endsWith( srcMapExt )