-
-
Notifications
You must be signed in to change notification settings - Fork 552
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-22191: Account disabling and password changing action links should be buttons #3148
base: master
Are you sure you want to change the base?
Conversation
…uld be buttons * Updated the account disabling buttons Note: There doesn't seem to be a test about this. AFAICS, the selectors for this element rely on the id, and not the anchor nature of them. https://github.com/xwiki/xwiki-platform/blob/d11ca5d781f8a42a85bc98eb82306c1431e764d4/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-profile/xwiki-platform-user-profile-ui/src/test/java/org/xwiki/user/profile/UserProfilePageTest.java#L65 https://github.com/xwiki/xwiki-platform/blob/7461bac6bbba52befecac6d2c03cc9869b6cef35/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-profile/xwiki-platform-user-profile-ui/src/main/resources/XWiki/XWikiUserProfileSheet.xml#L224-L225
…uld be buttons * Improved teh consistency of the inline-link-only selector to also match `.button` links Note: There doesn't seem to be a test about this. AFAICS, the selectors for this element rely on the id, and not the anchor nature of them. https://github.com/xwiki/xwiki-platform/blob/d11ca5d781f8a42a85bc98eb82306c1431e764d4/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-profile/xwiki-platform-user-profile-ui/src/test/java/org/xwiki/user/profile/UserProfilePageTest.java#L65 https://github.com/xwiki/xwiki-platform/blob/7461bac6bbba52befecac6d2c03cc9869b6cef35/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-profile/xwiki-platform-user-profile-ui/src/main/resources/XWiki/XWikiUserProfileSheet.xml#L224-L225
…uld be buttons * Updated the `Change password` button to be a button instead of an anchor styled like a button
@@ -183,7 +183,8 @@ body { | |||
|
|||
/* Remove the underlining from links with the btn class. | |||
Those are already styled differently from their neighboring text. */ | |||
& a.btn { | |||
& a.btn, | |||
& a.button { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this change, you didn't introduced a button class here, but you replaced a link to a button, so the selector should be just button no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -340,8 +340,8 @@ | |||
<div class="passwordManagement"> | |||
<h2>$escapetool.xml($services.localization.render('platform.core.profile.section.security'))</h2> | |||
<span class="buttonwrapper"> | |||
<a id="changePassword" href="$doc.getURL('view', 'xpage=passwd')">$escapetool.xml( | |||
$services.localization.render('platform.core.profile.changePassword'))</a> | |||
<button id="changePassword" onclick="location='$doc.getURL('view', 'xpage=passwd')'">$escapetool.xml( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmmm it means it won't work anymore when javascript is disabled. Not a big fan of this onclick attribute to be honest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted those changes in d043470 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the need for disable/enable button, which really aren't links. But for the changePassword I don't understand why you changed it: it's really a link here so IMO it should stay like it was.
It's fair. There was no feedback about this on the forum topic. I'll update the changes to keep this an anchor but avoid underlining on hover. |
…uld be buttons * Set the changePassword element back to an anchor * Updated the underlining rules to count this one as a `link styled like a button` category
Resolved merge conflict and addressed comments. |
Jira URL
https://jira.xwiki.org/browse/XWIKI-22191
Changes
Description
Change password
button to be a button instead of an anchor styled like a button.button
links, which can happen, such as the one for the creation of a new wiki.Clarifications
xwiki-platform/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-ui/xwiki-platform-wiki-ui-mainwiki/src/main/resources/WikiManager/WebHome.xml
Line 46 in 8aa04a3
Screenshots & Video
None, abrely any visual change. The link underlining doesn't happen when hovered on both of those buttons anymore.
Executed Tests
xwiki-platform/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-profile/xwiki-platform-user-profile-ui/src/test/java/org/xwiki/user/profile/UserProfilePageTest.java
Line 65 in d11ca5d
xwiki-platform/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-profile/xwiki-platform-user-profile-ui/src/main/resources/XWiki/XWikiUserProfileSheet.xml
Lines 224 to 225 in 7461bac
Manual tests for both of the buttons. They both still had the same effect after the DOM changes.
Expected merging strategy