mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 15:16:50 +00:00
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
This commit is contained in:
parent
b0d1ce6d75
commit
ce78add7e4
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map.json
vendored
BIN
resources/dist/index.js.map.json
vendored
Binary file not shown.
|
@ -304,7 +304,7 @@ export function bindBehavior( preview, behavior ) {
|
|||
|
||||
preview.el.addEventListener( 'click', behavior.click );
|
||||
|
||||
const button = preview.el.querySelector( '.mwe-popups-settings-button' );
|
||||
const button = preview.el.querySelector( 'a.mwe-popups-settings-button' );
|
||||
if ( button ) {
|
||||
button.href = behavior.settingsUrl;
|
||||
button.addEventListener( 'click', ( event ) => {
|
||||
|
@ -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' );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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' );
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Reference in a new issue