Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,18 @@ 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
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we weren't highlighting the breadcrumb at the top of pages, what was the rule preventing that and now that you've added the nav exclusion, shouldn't we remove the specific rule for that breadcrumb?

Copy link
Contributor Author

@Sereza7 Sereza7 Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The breadcrumb at the top of pages is not in the content. The base of the "inline" filter is considering all links in the content are inline and all links outside are not.

& a {
.not-inline-link();
}
}

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();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally-speaking I'm really not fond of all these specific lists because they are hardcoding dependencies and creating a bad dependency between the flamingo skin and specific extensions that it has to know. Thus, they don't address the generic case .

It would be much better to have a single class value to prevent highlighting links and modify the various extensions/specific pieces of code to use that rather than group them all here, which doesn't scale.

To give a specific example, &.user-name, &.group-name seems to be related to the userDisplayMacro. This should done in the code of that extension and not here, using some generic class. Similar to what a contrib extension needs to do.

Expand Down Expand Up @@ -233,8 +235,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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems you're moving the icon as part of the link, why? Why change that suddenly and in this PR (it seems it's not the topic of this PR to address that).

Thx

Copy link
Contributor Author

@Sereza7 Sereza7 Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we have a rule to not underline links with an image/icon contained in them.

When I looked at this UI, it looked like it should have matched that rule, but because of this slight difference in DOM it wouldn't.

If we don't do this, we need to add .force-underline to these or add an exception.
IMO it's okay to merge this small quality/consistency improvement in here because it avoids creating another workaround.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we have a rule to not underline links with an image/icon contained in them.

Yes, I understood this but I don't think it's a valid reason to make that change. We need to want to make the icon clickable. Is that what we do in general and elsewhere? Is that something we really want? At first sight, it looks a bit weird to me to do that.

$escapetool.xml($searchResultReference.name)
</a>
#set ($attachmentHistoryURL = $xwiki.getURL($searchResultReference, 'viewattachrev', $NULL))
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down