SuchetaG has uploaded a new change for review. https://gerrit.wikimedia.org/r/208624
Change subject: [WIP] Highlight matching parts of link suggestions ...................................................................... [WIP] Highlight matching parts of link suggestions Change-Id: I1778dc204e45e0b124e3a171b9cce171a3138a58 --- M modules/ve-mw/ui/styles/widgets/ve.ui.MWInternalLinkMenuOptionWidget.css M modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkMenuOptionWidget.js 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/24/208624/1 diff --git a/modules/ve-mw/ui/styles/widgets/ve.ui.MWInternalLinkMenuOptionWidget.css b/modules/ve-mw/ui/styles/widgets/ve.ui.MWInternalLinkMenuOptionWidget.css index e240f10..98171e6 100644 --- a/modules/ve-mw/ui/styles/widgets/ve.ui.MWInternalLinkMenuOptionWidget.css +++ b/modules/ve-mw/ui/styles/widgets/ve.ui.MWInternalLinkMenuOptionWidget.css @@ -52,6 +52,10 @@ overflow: hidden; } +.ve-ui-text-highlight { + font-weight: bold; +} + .oo-ui-menuOptionWidget:not(.oo-ui-optionWidget-selected) .ve-ui-mwInternalLinkMenuOptionWidget-description, .oo-ui-menuOptionWidget.oo-ui-optionWidget-highlighted .ve-ui-mwInternalLinkMenuOptionWidget-description { color: #888; diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkMenuOptionWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkMenuOptionWidget.js index bec3d13..1f272e8 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkMenuOptionWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkMenuOptionWidget.js @@ -25,7 +25,7 @@ this.pagename = config.pagename; // Parent constructor - ve.ui.MWLinkMenuOptionWidget.call( this, $.extend( { label: this.pagename, href: mw.util.getUrl( this.pagename ) }, config ) ); + ve.ui.MWLinkMenuOptionWidget.call( this, $.extend( { label: ve.highlightQuery( this.pagename, config.query ), href: mw.util.getUrl( this.pagename ) }, config ) ); // Style based on link cache information ve.init.platform.linkCache.styleElement( this.pagename, this.$link ); -- To view, visit https://gerrit.wikimedia.org/r/208624 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1778dc204e45e0b124e3a171b9cce171a3138a58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: SuchetaG <sucheta.ghos...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits