Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XWIKI-21492: Underline inline links #2694

Merged
merged 37 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
14d93af
XWIKI-21492: Underline inline links
Sereza7 Oct 24, 2023
d97e093
XWIKI-21492: Underline inline links
Sereza7 Oct 30, 2023
59e3c22
XWIKI-21492: Underline inline links
Sereza7 Oct 30, 2023
78dc29c
XWIKI-21492: Underline inline links
Sereza7 Nov 2, 2023
4959418
XWIKI-21492: Underline inline links
Sereza7 Oct 24, 2023
ea1e0e4
XWIKI-21492: Underline inline links
Sereza7 Oct 30, 2023
5e6335b
XWIKI-21492: Underline inline links
Sereza7 Oct 30, 2023
2ec89a8
XWIKI-21492: Underline inline links
Sereza7 Nov 2, 2023
b841c0d
Merge remote-tracking branch 'origin/XWIKI-21492' into XWIKI-21492
Sereza7 Nov 22, 2023
3855a6a
XWIKI-21492: Underline inline links
Sereza7 Dec 5, 2023
864b32d
XWIKI-21492: Underline inline links
Sereza7 Dec 6, 2023
51295dc
Merge branch 'xwiki:master' into XWIKI-21492
Sereza7 Dec 6, 2023
43b7ce3
XWIKI-21492: Underline inline links
Sereza7 Dec 6, 2023
766f617
Merge branch 'xwiki:master' into XWIKI-21492
Sereza7 Dec 18, 2023
344d906
XWIKI-21492: Underline inline links
Sereza7 Dec 18, 2023
71191ee
XWIKI-21492: Underline inline links
Sereza7 Dec 18, 2023
f689000
XWIKI-21492: Underline inline links
Sereza7 Dec 18, 2023
af84d5b
Merge branch 'xwiki:master' into XWIKI-21492
Sereza7 Jan 3, 2024
acb4768
XWIKI-21492: Underline inline links
Sereza7 Jan 3, 2024
18c1f4d
XWIKI-21492: Underline inline links
Sereza7 Jan 3, 2024
b4e00a6
XWIKI-21492: Underline inline links
Sereza7 Jan 3, 2024
6b9d08c
XWIKI-21492: Underline inline links
Sereza7 Jan 5, 2024
9b88f8f
XWIKI-21492: Underline inline links
Sereza7 Jan 5, 2024
7e5d8f0
XWIKI-21492: Underline inline links
Sereza7 Jan 5, 2024
5da3f61
Merge branch 'xwiki:master' into XWIKI-21492
Sereza7 Jan 30, 2024
d2941bf
XWIKI-21492: Underline inline links
Sereza7 Jan 30, 2024
32a7cca
XWIKI-21492: Underline inline links
Sereza7 Jan 31, 2024
7bf473e
XWIKI-21492: Underline inline links
Sereza7 Feb 6, 2024
eba9834
Revert "XWIKI-21492: Underline inline links"
Sereza7 Feb 9, 2024
3ae794d
XWIKI-21492: Underline inline links
Sereza7 Feb 12, 2024
09af3b4
XWIKI-21492: Underline inline links
Sereza7 Mar 12, 2024
6d02af5
XWIKI-21492: Underline inline links
Sereza7 Mar 22, 2024
cc1aae8
Merge branch 'master' into XWIKI-21492
Sereza7 Apr 3, 2024
0a6a53f
Merge branch 'xwiki:master' into XWIKI-21492
Sereza7 Apr 17, 2024
674b74f
XWIKI-21492: Underline inline links
Sereza7 Apr 17, 2024
5c627bc
XWIKI-21492: Underline inline links
Sereza7 Apr 17, 2024
df185ba
XWIKI-21492: Underline inline links
Sereza7 Apr 17, 2024
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 @@ -129,7 +129,30 @@
#if($xcontext.action == "admin" || $xcontext.action == "import" || $xcontext.action == "export")
#set($bodyAction = "view")
#end
## Query user preferences for UI customization
## Get the legacy preference for backward compatibility
#set ($a11y = "$!{xwiki.getUserPreference('accessibility')}")
Sereza7 marked this conversation as resolved.
Show resolved Hide resolved
#set ($underlining = "$!{xwiki.getUserPreference('underline')}")
## Underlining of links
## This preference will take the values: preference-underlining-yes, preference-underlining-only-inline-links and
## preference-underlining-no
#set ($preferenceUnderlining = "preference-underlining-")
#if ($underlining == 'Yes' || $a11y == '1')
#set ($preferenceUnderlining = $preferenceUnderlining + "yes")
#elseif($underlining == 'No')
## The legacy a11y preference is never ON when reaching here
#set ($preferenceUnderlining = $preferenceUnderlining + "no")
#else
## The default value `OnlyInlineLinks` has the same behavior as the fallback
#set ($preferenceUnderlining = $preferenceUnderlining + "only-inline-links")
#end
## These elements will be closed in the htmlfooter.vm file
<$bodyTagName id="body" class="skin-flamingo wiki-${xcontext.database} #if("$!doc.space" != "")space-${escapetool.xml($doc.space.replaceAll(' ', '_'))}#end ${bodyAction}body #if($showLeftPanels == "0")hideleft#end#if($showRightPanels == "0")hideright#end#if($hidecolumns && ($!hidecolumns == 1))hidelefthideright#end #if($showLeftPanels != "0" && $showRightPanels != "0" && $!hidecolumns != 1)content#end panel-left-width-${leftPanelsWidth} panel-right-width-${rightPanelsWidth} drawer drawer--right">
## We put a space before each class added in #if, to avoid losing them because of velocity line stripping
<$bodyTagName id="body" class="skin-flamingo wiki-${xcontext.database} ${bodyAction}body panel-left-width-${leftPanelsWidth} panel-right-width-${rightPanelsWidth} drawer drawer--right ${preferenceUnderlining}
#if("$!doc.space" != "") space-${escapetool.xml($doc.space.replaceAll(' ', '_'))}#end
#if($showLeftPanels == "0") hideleft#end
#if($showRightPanels == "0") hideright#end
#if($hidecolumns && ($!hidecolumns == 1)) hidelefthideright#end
#if($showLeftPanels != "0" && $showRightPanels != "0" && $!hidecolumns != 1) content#end">
<div id="xwikimaincontainer">
<div id="xwikimaincontainerinner">
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,64 @@ img {
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}

// User preferences ===========================================================
body.content {
/* We apply various user preference related styles to the content of the page.
We use classes that are added to the body itself in htmlheader.vm */
// Link underlining preference
&.preference-underlining-yes {
a {
text-decoration: underline;
}
}

&.preference-underlining-only-inline-links {
// Main rule for the content
#xwikicontent a {
text-decoration: underline;
}

// UIs where we want to underline outside of content.
.xdocLastModification,
.panel.HelpTipsPanel,
.commentauthor {
& a {
text-decoration: underline;
}
}

/* UIs in content where we want to not underline by default.
Those elements usually contain only links that are not inline (and a lot of links). */
#xwikicontent {
&.xwiki-livetable-container,
&.xtree,
&.xwikitabbar,
&.buttonwrapper {
& a {
text-decoration: none;
// Make sure we don't take over the default behaviour on hover with too much specificity.
&:hover, &:focus {
text-decoration: underline
}
}
}
}

// Helper classes for easier content customization. Note that those only work for this preference.
#xwikicontent .force-no-underline a {
text-decoration: none;
}

.force-underline a {
text-decoration: underline;
}
}

&.preference-underlining-no {
a {
text-decoration: none;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected void createClass(BaseClass xclass)
xclass.addTextField("imaccount", "imaccount", 30);
xclass.addStaticListField("editor", "Default Editor", "Text|Wysiwyg");
xclass.addStaticListField("usertype", "User type", "Simple|Advanced", "Simple");
xclass.addBooleanField("accessibility", "Enable extra accessibility features", "yesno");
xclass.addStaticListField("underline", "Underline links", "OnlyInlineLinks|Yes|No", "OnlyInlineLinks");
xclass.addBooleanField("displayHiddenDocuments", "Display Hidden Documents", "yesno");
xclass.addTimezoneField(TIMEZONE_FIELD, "Time Zone", 30);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,10 @@ platform.core.profile.phone=Phone
platform.core.profile.address=Address
platform.core.profile.editor=Default editor to use
platform.core.profile.userType=User Type
platform.core.profile.enableAccessibility=Enable extra accessibility features
platform.core.profile.displayHiddenDocuments=Display hidden pages
platform.core.profile.timezone=Timezone
platform.core.profile.extensionConflictSetup=Enable extension conflict setup
platform.core.profile.accessibility.underline=Underline links

platform.core.profile.category.settings=Settings
platform.core.profile.category.profile=Profile
Expand All @@ -728,6 +728,7 @@ platform.core.profile.section.sendMessage=Send Message
platform.core.profile.section.activity=My Activity Stream
platform.core.profile.section.activityof=Activity stream of {0}
platform.core.profile.section.displayPreferences=Display Preferences
platform.core.profile.section.accessibilityPreferences=Accessibility preferences
platform.core.profile.section.localizationPreferences=Localization Preferences
platform.core.profile.section.editorPreferences=Editor Preferences
platform.core.profile.section.extensionPreferences=Extensions Preferences
Expand Down Expand Up @@ -3456,6 +3457,10 @@ XWiki.XWikiUsers_usertype_Advanced=Advanced
XWiki.XWikiUsers_phone=Phone
XWiki.XWikiUsers_address=Address
XWiki.XWikiUsers_extensionConflictSetup=Enable extension conflict setup
XWiki.XWikiUsers_underline=Underline links
XWiki.XWikiUsers_underline_Yes=Yes
XWiki.XWikiUsers_underline_OnlyInlineLinks=Only Inline Links
XWiki.XWikiUsers_underline_No=No

### XWiki.XWikiSkins (core)
XWiki.XWikiSkins_name=Name
Expand Down Expand Up @@ -5638,6 +5643,7 @@ core.viewers.diff.previousChange=Previous change
## until 16.3.0RC1
#######################################
xe.admin.passwordReset.step2.error.wrongParameters=Wrong parameters! Another link was already sent or this one was already accessed!
platform.core.profile.enableAccessibility=Enable extra accessibility features

## Used to indicate where deprecated keys end
#@deprecatedend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<syntaxId>plain/1.0</syntaxId>
<hidden>true</hidden>
<content>XWiki.XWikiUsers_displayHiddenDocuments.hint=The wiki contains documents that are not displayed by default. These hidden documents represent technical content, like application classes, configuration pages, macros, styles, scripts, etc.
XWiki.XWikiUsers_accessibility.hint=Extra accessibility will enable various visual enhancements like: bigger fonts, underlined links, etc.
Sereza7 marked this conversation as resolved.
Show resolved Hide resolved
XWiki.XWikiUsers_underline.hint=Choose if links should be underlined.
XWiki.XWikiUsers_timezone.hint=Use a specific timezone so that the dates reflect your current location.
XWiki.XWikiUsers_editor.hint=Choose what editor will be the default one, overriding the default editor set globally. If not defined, a default editor is chosen, depending on what is being edited.
XWiki.XWikiUsers_usertype.hint=Choose what type of user will be the default one. Advanced users will have access to multiple editing features, terminal page creation, etc.
Expand All @@ -60,7 +60,16 @@ user.profile.network.saving=Saving...
user.profile.network.error=Error saving the notification setting
user.profile.status.done=Done
user.profile.status.saving=Saving...
user.profile.status.error=Error saving the user status</content>
user.profile.status.error=Error saving the user status

## Used to indicate where deprecated keys start
#@deprecatedstart

## Deprecated since 16.3.0RC1
XWiki.XWikiUsers_accessibility.hint=Extra accessibility will enable various visual enhancements like: bigger fonts, underlined links, etc.

## Used to indicate where deprecated keys end
#@deprecatedend</content>
<object>
<name>XWiki.UserProfileTranslations</name>
<number>0</number>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,22 @@
&lt;h2&gt;$escapetool.xml($services.localization.render('platform.core.profile.section.displayPreferences'))&lt;/h2&gt;
&lt;dl&gt;
#displayField('displayHiddenDocuments', 'platform.core.profile.displayHiddenDocuments', '0')
#displayField('accessibility' , 'platform.core.profile.enableAccessibility' , '0')
&lt;/dl&gt;
&lt;h2&gt;$escapetool.xml($services.localization.render('platform.core.profile.section.accessibilityPreferences'))&lt;/h2&gt;
#set ($defaultLegacyValue = $xwiki.getXWikiPreference('accessibility'))
&lt;dl&gt;
#set ($defaultValue = $xwiki.getXWikiPreference('underline'))
#if ("$!defaultValue" == '' &amp;&amp; "$!defaultLegacyValue" == '1')
#set ($defaultValue = 'Yes')
#end
#if ("$!defaultValue" == '')
#set ($defaultValue = 'OnlyInlineLinks')
#end
#displayField('underline', 'platform.core.profile.accessibility.underline', $defaultValue)
Sereza7 marked this conversation as resolved.
Show resolved Hide resolved
&lt;/dl&gt;
&lt;dl hidden&gt;
## Unset the legacy 'accessibility' parameter
#displayField('accessibility', 'platform.core.profile.enableAccessibility', '')
&lt;/dl&gt;
&lt;h2&gt;$escapetool.xml($services.localization.render('platform.core.profile.section.localizationPreferences'))&lt;/h2&gt;
&lt;dl&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ $originalUrl?$queryString## prevent line break in output

<link href="#concatenateQueryParameter($defaultStyleURL, $urlParameters)" rel="stylesheet" type="text/css" media="all" />
<link href="#concatenateQueryParameter($escapetool.xml($xwiki.getSkinFile('print.css', true)), $urlParameters)" rel="stylesheet" type="text/css" media="#if ($printss)all#{else}print#{end}" />
#set ($a11y = "$!{request.getCookie('a11y').getValue()}")
#if ($a11y == '')
#set ($a11y = "$!{xwiki.getUserPreference('accessibility')}")
#end
#if ($a11y == '1')
<link href="$escapetool.xml($xwiki.getSkinFile('css/accessibility.css', true))" rel="stylesheet" type="text/css" media="all" />
#end
## The stylesheets configuration option allows to override the alternate stylesheets
## style1.css, style2.css and style3.css
#set ($stylesheets = $xwiki.getSpacePreference('stylesheets'))
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,30 @@
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
</title>
<underline>
<cache>0</cache>
<customDisplay/>
<disabled>0</disabled>
<displayType>select</displayType>
<freeText>forbidden</freeText>
<largeStorage>0</largeStorage>
<multiSelect>0</multiSelect>
<name>underline</name>
<number>12</number>
<picker>1</picker>
<prettyName>Underline links</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators>|, </separators>
<size>1</size>
<sort>none</sort>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<values>OnlyInlineLinks|Yes|No</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</underline>
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we shouldn't also remove the legacy accessibility property here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be honest I'm not sure what's the exact purpose of this file (seems like a repeat with the content of XWikiPreferences.xml ), so I'd rather not break unknown things by only adding what seems to make sense adding and leaving the legacy content unchanged.

<upload_maxsize>
<customDisplay/>
<disabled>0</disabled>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,30 @@
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
</title>
<underline>
<cache>0</cache>
<customDisplay/>
<disabled>0</disabled>
<displayType>select</displayType>
<freeText>forbidden</freeText>
<largeStorage>0</largeStorage>
<multiSelect>0</multiSelect>
<name>underline</name>
<number>12</number>
<picker>1</picker>
<prettyName>Underline links</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators>|, </separators>
<size>1</size>
<sort>none</sort>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<values>OnlyInlineLinks|Yes|No</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</underline>
<upload_maxsize>
<customDisplay/>
<disabled>0</disabled>
Expand Down Expand Up @@ -2652,6 +2676,30 @@
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
</title>
<underline>
<cache>0</cache>
<customDisplay/>
<disabled>0</disabled>
<displayType>select</displayType>
<freeText>forbidden</freeText>
<largeStorage>0</largeStorage>
<multiSelect>0</multiSelect>
<name>underline</name>
<number>12</number>
<picker>1</picker>
<prettyName>Underline links</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators>|, </separators>
<size>1</size>
<sort>none</sort>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<values>OnlyInlineLinks|Yes|No</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</underline>
<upload_maxsize>
<customDisplay/>
<disabled>0</disabled>
Expand Down Expand Up @@ -2973,6 +3021,9 @@ Your account on ${wikiname} has been successfully activated. You can now login a
<property>
<title>$tdoc.getRenderedTitle('plain/1.0') - XWiki</title>
</property>
<property>
<underline>OnlyInlineLinks</underline>
</property>
<property>
<upload_maxsize>107374182400</upload_maxsize>
</property>
Expand Down
Loading