[MediaWiki-commits] [Gerrit] Fix image alignment in media dialog search - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Fix image alignment in media dialog search .. Fix image alignment in media dialog search Make the image results align to the full width of the dialog. This fix uses dynamic values of the width of the container rather than a hard-coded value so it should work properly on all themes. Bug: T78050 Change-Id: I05bb0d8a8b13c246840382b12e098d0579180016 --- M modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js index c8ceb2d..3dcf966 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js @@ -108,6 +108,15 @@ return; } + // HACK: fit four images in the screen + // The -45 is here because the way the container is aligned, it + // is pushed behind the scrollbar. When we calculate the new size + // of the image results, we need to account for a bit thinner than + // the actual (partially hidden) width. + // Note: This will be fixed in an upcoming rewrite of the image + // search results. + this.size = ( this.results.$element.innerWidth() - 45 ) / 4; + // Reset message this.$noItemsMessage.hide(); -- To view, visit https://gerrit.wikimedia.org/r/179228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05bb0d8a8b13c246840382b12e098d0579180016 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mooeypoo Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix image alignment in media dialog search - change (mediawiki...VisualEditor)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/179228 Change subject: Fix image alignment in media dialog search .. Fix image alignment in media dialog search Make the image results align to the full width of the dialog. This fix uses dynamic values of the width of the container rather than a hard-coded value so it should work properly on all themes. Bug: T78050 Change-Id: I05bb0d8a8b13c246840382b12e098d0579180016 --- M modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/28/179228/1 diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js index c8ceb2d..3dcf966 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js @@ -108,6 +108,15 @@ return; } + // HACK: fit four images in the screen + // The -45 is here because the way the container is aligned, it + // is pushed behind the scrollbar. When we calculate the new size + // of the image results, we need to account for a bit thinner than + // the actual (partially hidden) width. + // Note: This will be fixed in an upcoming rewrite of the image + // search results. + this.size = ( this.results.$element.innerWidth() - 45 ) / 4; + // Reset message this.$noItemsMessage.hide(); -- To view, visit https://gerrit.wikimedia.org/r/179228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05bb0d8a8b13c246840382b12e098d0579180016 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mooeypoo ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits