mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
Better support RTL direction extracts in ReferencePreviews
When the user sets a different language than the projects content language, ReferencePreviews were rendered LTR. By using the bdi tag this behavior is fixed. Note that PagePreviews gets language and direction from the TextExtracts response and use them to achive the same. The latter is not straight forward available for ReferencePreviews so I'm using bdi to achieve the same. Bug: T345833 Change-Id: I6554e6e1db3aac06c04c9185500e05de238adde2
This commit is contained in:
parent
8fa9b56518
commit
90a829179c
|
@ -71,7 +71,7 @@
|
|||
"bundlesize": [
|
||||
{
|
||||
"path": "resources/dist/index.js",
|
||||
"maxSize": "14.7kB"
|
||||
"maxSize": "14.8kB"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
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.
|
@ -13,7 +13,7 @@ const templateHTML = `
|
|||
<span class="popups-icon"></span>
|
||||
<span class="mwe-popups-title-placeholder"></span>
|
||||
</strong>
|
||||
<div class="mw-parser-output"></div>
|
||||
<bdi><div class="mw-parser-output"></div></bdi>
|
||||
</div>
|
||||
<div class="mwe-popups-fade"></div>
|
||||
</div>
|
||||
|
@ -171,6 +171,7 @@ export function renderReferencePreview(
|
|||
|
||||
element.isScrolling = !scrolledToBottom;
|
||||
extract.classList.toggle( 'mwe-popups-fade-out', element.isScrolling );
|
||||
extract.setAttribute( 'lang', mw.config.get( 'wgPageContentLanguage' ) );
|
||||
} );
|
||||
|
||||
return el;
|
||||
|
|
|
@ -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.8 * 1024,
|
||||
maxEntrypointSize: 46.8 * 1024,
|
||||
maxAssetSize: 46.9 * 1024,
|
||||
maxEntrypointSize: 46.9 * 1024,
|
||||
|
||||
// The default filter excludes map files but we rename ours.
|
||||
assetFilter: ( filename ) => !filename.endsWith( srcMapExt )
|
||||
|
|
Loading…
Reference in a new issue