From 407bb94afda9bb425d46ac4b30863e6a228dd1dc Mon Sep 17 00:00:00 2001 From: LucasC Date: Thu, 29 Jan 2026 17:34:35 +0100 Subject: [PATCH 1/2] XWIKI-23961: Inconsistencies in the "underline inline links" preference * Fixed the hover state for preference=No * Removed the underlining on the search page entries names * Removed the underlining on the search page version numbers * Removed the underlining from breadcrumbs found in the page content. * Fixed the search filter items being underlined only on XWiki org. * Removed underline from the selectize links that come with icons. * Removed underline for navigation elements. --- .../src/main/resources/flamingo/less/general.less | 11 +++++++---- .../src/main/resources/Main/SolrSearch.xml | 4 ++-- .../src/main/resources/Main/SolrSearchMacros.xml | 5 ++--- .../resources/uicomponents/suggest/xwiki.selectize.js | 1 + 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/less/general.less b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/less/general.less index 6289272e21d..907a0f09896 100644 --- a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/less/general.less +++ b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/less/general.less @@ -189,7 +189,9 @@ body { & .vertical-menu, // In vertical menus (user menu, syntax guide, ...), do not underline the menu items. & .jstree-xwiki, // Do not underline links in jstrees & .xwiki-livedata .cell .displayer-link, // Do not underline links that are in their own livedata cell - & .xwiki-livedata .cell .breadcrumb // Do not underline links that are in breadcrumbs in livedatas + & .xwiki-livedata .cell .breadcrumb, // Do not underline links that are in breadcrumbs in livedatas + & .breadcrumb, // The breadcrumb contains enough presentation to distinguish it from neighboring text. + & nav, & *[role="navigation"] // Navigation nodes are meant to contain anchors. This meaning is most of the time conveyed through the style { & a { .not-inline-link(); @@ -197,8 +199,9 @@ body { } a { - &.user-name, &.group-name // Usually user names and group names displayed with the userDisplayMacro + &.user-name, &.group-name, // Usually user names and group names displayed with the userDisplayMacro // are next to the user avatar. This specific rule can be removed once XWIKI-22269 is fixed. + &.search-result-version // The search result version is distinct from neighboring text. { .not-inline-link(); } @@ -233,8 +236,8 @@ body { text-decoration: underline; } } - - &.preference-underlining-no { + /* We make sure the 'No underlining' preference reflects the legacy behaviour, which still underlined when hovering.*/ + &.preference-underlining-no:not(:hover):not(:focus) { a { text-decoration: none; } diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearch.xml b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearch.xml index 214845cde2a..6f2f1bbafd0 100644 --- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearch.xml +++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearch.xml @@ -816,8 +816,8 @@ dl.search-result-highlights.preview dd:first-of-type blockquote:first-of-type { } /* Override the default style for links in content. */ -body.content.preference-underlining-only-inline-links #xwikicontent .search-facet-body .itemName, -body.content.preference-underlining-only-inline-links #xwikicontent .search-facet-body .more { +body.preference-underlining-only-inline-links #xwikicontent .search-facet-body .itemName, +body.preference-underlining-only-inline-links #xwikicontent .search-facet-body .more { text-decoration: none; /* Make sure we don't take over the default behaviour on hover with too much specificity. */ &:hover, &:focus { diff --git a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearchMacros.xml b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearchMacros.xml index 23d3aa96f4d..315457cdf03 100644 --- a/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearchMacros.xml +++ b/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearchMacros.xml @@ -508,10 +508,10 @@ #macro (displaySearchResult_attachment $searchResult) <h2 class="search-result-title"> - $services.icon.renderHTML('attach') #set ($attachmentURL = $xwiki.getURL($searchResultReference)) #set ($downloadHint = $services.localization.render('core.viewers.attachments.download')) <a href="$attachmentURL" title="$escapetool.xml($downloadHint)"> + $services.icon.renderHTML('attach') $escapetool.xml($searchResultReference.name) </a> #set ($attachmentHistoryURL = $xwiki.getURL($searchResultReference, 'viewattachrev', $NULL)) @@ -553,8 +553,7 @@ #set ($titleURL = $xwiki.getURL($searchResultReference, 'view', "language=$searchResult.locale")) #end <h2 class="search-result-title"> - $services.icon.renderHTML('file-white') - <a href="$titleURL">$escapetool.xml($searchResult.title_)</a> + <a href="$titleURL">$services.icon.renderHTML('file-white') $escapetool.xml($searchResult.title_)</a> #if ($showLocale) <span title="$escapetool.xml($services.localization.render('solr.result.language'))" class="search-result-language" >($escapetool.xml($searchResult.locale))</span> diff --git a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/resources/uicomponents/suggest/xwiki.selectize.js b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/resources/uicomponents/suggest/xwiki.selectize.js index a21dad215d5..a9dd066f51a 100644 --- a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/resources/uicomponents/suggest/xwiki.selectize.js +++ b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/resources/uicomponents/suggest/xwiki.selectize.js @@ -68,6 +68,7 @@ define('xwiki-selectize', [ } var label = (option && typeof option === 'object') ? (option.label || option.value) : option; output.find('.xwiki-selectize-option-label').text(label); + output.find('.xwiki-selectize-option-icon').prependTo(output.find('.xwiki-selectize-option-label')); return output; }; From d9888776b289561ff52a54968825a449d1457736 Mon Sep 17 00:00:00 2001 From: LucasC Date: Wed, 4 Feb 2026 10:45:18 +0100 Subject: [PATCH 2/2] XWIKI-23961: Inconsistencies in the "underline inline links" preference * Removed a repetitive rule --- .../src/main/resources/flamingo/less/general.less | 1 - 1 file changed, 1 deletion(-) diff --git a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/less/general.less b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/less/general.less index 907a0f09896..402756b2973 100644 --- a/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/less/general.less +++ b/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/less/general.less @@ -189,7 +189,6 @@ body { & .vertical-menu, // In vertical menus (user menu, syntax guide, ...), do not underline the menu items. & .jstree-xwiki, // Do not underline links in jstrees & .xwiki-livedata .cell .displayer-link, // Do not underline links that are in their own livedata cell - & .xwiki-livedata .cell .breadcrumb, // Do not underline links that are in breadcrumbs in livedatas & .breadcrumb, // The breadcrumb contains enough presentation to distinguish it from neighboring text. & nav, & *[role="navigation"] // Navigation nodes are meant to contain anchors. This meaning is most of the time conveyed through the style {