-
-
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-22121: Improve the registration experience #3155
Conversation
* Added the `back to home` button. * Fixed the style of the TODO: * replace the inline styling with some CSS
* Moved the login and register buttons from the drawer to the navbar. * Updated style * Part B: moved around the first and last name fields. TODO: * C. replace the registration confirmation inline styling with some CSS
* Split the form into two sections * Added an `About you` title for the second section. TODO: * C. replace the registration confirmation inline styling with some CSS
* Split the validation messages in multiple parts - WIP TODO: * C. replace the registration confirmation inline styling with some CSS
* Split the validation messages in multiple parts - Done. TODO: * C. replace the registration confirmation inline styling with some CSS * B. Check that other uses of Livevalidation are not broken by the changes.
* Replaced the registration confirmation inline styling with some CSS * Escaped the content added in RegistrationConfig TODO: * B. Check that other uses of Livevalidation are not broken by the changes.
* Took care of a fallback for backwards compatibility
* Tried to fix the register form not submitting, WIP
* Fixed a wrong ID for the UIExtensionClass
* Fixed the bug for unexpected lack of form submission
* Fixed some codestyle
* Added comments * Removed special rule for regex type validation in the JS initialization * Updated the template for creating a validationContainer to fit loading the form with values already given
* Improved backwards compatibility (WIP)
* Updated the style of `mandatory` and `must-match` fields when valid to never show the `Ok` text. (wasn't an issue before, because the text was left empty as a mistake) * fixed booleans for validation * fixed boolean for the welcome message formatting.
* Fixed `RegisterIT`
* Fixed the base page object register and login function to fit the new position of those links.
@Sereza7 since you are working on live validation, I just saw https://jira.xwiki.org/browse/XWIKI-9797, could it be fixed by your change? |
I wasn't aware of this. Since I started working on the project, I wasn't aware that there were livevalidation for usernames or page names repeating. From what I could see when checking those livevalidations, there is nothing about this. My guess is that livevalidation is client-side, and we don't want to have the whole list of usernames or pages on the client. This could be a performance and security issue at least. Validation is done server side but I don't think livevalidation has anything to do with it. This issue should probably be closed as |
There is no reason why live validation couldn't check if the user/page already exists with a call to the server. We don't hide if a username exists or not, from an attacker's point there is no difference if this check is done after clicking submit or before as the attacker could automate both calls. |
From the video, it was not clear to me if all the password requirements are visible from the start. It's an important point for someone thinking of a password in the beginning. Also, we can reduce the image size, on my mockups I used 200px. If that's still too big, meaning the user has to scroll to see the buttons, then maybe we will change the order of elements, first the message (Welcome), then the image. |
* Fixed the username duplicate validation message * Fixed the size of the hero image on successful registration
I'll consider this issue for a BFD then 👍
The password requirements are visible from the start. On this video I used the default policy, where we ask for at least 6 characters for a password. What's not visible at the start though are error message for 2024-06-07.15-31-18.mp4
Note that my screen is halfway covered by the inspector, so the display is unusually horizontal. I just checked and there's no need to scroll down with my screen. I quickly checked with standard phone/tablet resolutions and it's okay too. The only place I saw this scrolling issue is for the CI tests, they use a square window with relatively low resolution and the buttons are just a bit too low. I improved it in 683ccd5 :
Done in 683ccd5 👍 |
* Updated the version for deprecation
* Merge conflict resolution
* Updated version number
@@ -295,7 +296,7 @@ | |||
}, | |||
'noReturn' : true | |||
}) | |||
#set($discard = $fields.add($field)) | |||
#set($discard = $aboutYouFields.add($field)) |
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.
It doesn't feel accurate to put the captcha in the about you fields, also you didn't provided any screenshot for registration with captcha?
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.
The semantics are a bit wrong yup, however I'm not sure how we'd want to show it so I kept it similar to what was done before. It's also more convenient because I don't need to update how we display the captcha (here it's treated the same as any other field).
@tkrieck Do you think this is an okay position for the captcha? Do you have an idea for a design that would clearly separate it from the rest of the form without looking too cluttered?
If we don't do anything right now I can still open a low importance ticket for accessibility because of the wrong semantics. IMO this is not the core of the change and we can wait until later to improve it.
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.
@Sereza7 The positioning doesn't bother me, it looks okay. The input can get a new label though, could it be just "Captcha"? The little help beneath the captcha field can receive the current applied label (Please validate the captcha to prove you are not a robot)
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.
Thanks for your help!
Addressed in c49f94d 👍
Here's what this looks like now vvv
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.
Looks good to me, thanks! 👍
...rm-administration/xwiki-platform-administration-ui/src/main/resources/XWiki/Registration.xml
Outdated
Show resolved
Hide resolved
#if ($xcontext.user == 'XWiki.XWikiGuest' && !$xcontext.inactiveUserReference && $xwiki.hasAccessLevel('register', 'XWiki.XWikiPreferences')) | ||
<li> | ||
<a href="$xwiki.getURL('XWiki.XWikiRegister', 'register', "xredirect=$escapetool.url($xwiki.relativeRequestURL)")" id="tmRegister" rel="nofollow">$escapetool.xml($services.localization.render('register'))</a> | ||
</li> |
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'm wondering the impact of this for private wikis, you could have a wiki entirely private in which registration is still possible no? In which case here we're loosing seeing the register link at all, isn't it?
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.
If the wiki is entirely private, the user would not be able to see any of the buttons of the top right navigation bar anyways.
I think it's not that much of an issue.
Moreover, as far as I know, private wikis did not use this way to get new users:
- either invitation of new users
- or the admin creates the accounts and shares the logins with the actual users.
Maybe it'd be an issue for semi private?
Even in the case the Registration page is public, there's other ways to access it.
Let me know if you find a use case where this is wrong.
Thanks,
LC
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.
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.
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.
Okay, I tried to find back where the set of conditions to display the buttons come from.
It seems that it's just a factorization of all the conditions that were needed to display the links before.
https://github.com/xwiki/xwiki-platform/pull/3155/files#diff-97052b73aa6732071455b709190c5a5e65729555d3587e57882b79ea2f57e12dL38-L58
Unless my boolean factorization is wrong, this should be displayed in the same conditions as the drawer links and not be a regression on feature.
The original code is not factorized like this because there are other moving parts in the template that are only displayed on a specific set of conditions.
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.
Ok thanks for checking this.
...inistration/xwiki-platform-administration-ui/src/main/resources/XWiki/RegistrationConfig.xml
Outdated
Show resolved
Hide resolved
...inistration/xwiki-platform-administration-ui/src/main/resources/XWiki/RegistrationConfig.xml
Outdated
Show resolved
Hide resolved
...inistration/xwiki-platform-administration-ui/src/main/resources/XWiki/RegistrationConfig.xml
Outdated
Show resolved
Hide resolved
...ki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/register_macros.vm
Show resolved
Hide resolved
...ki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/register_macros.vm
Show resolved
Hide resolved
...eb-war/src/main/webapp/resources/uicomponents/widgets/validation/livevalidation_prototype.js
Show resolved
Hide resolved
* Updated the attachment name to be more understandable
* Removed a parameter with its default value * Escaped strings in the HTML template.
Open "blocking" discussions:
Additional open discussions (non blocking - as in, I could see the PR being merged without them being clearly closed.): |
* Improved the display of the Captcha
* Solve merge conflict
Updated status of the PR:
Additional open discussions (non blocking - as in, I could see the PR being merged without them being clearly closed.): |
xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/ApplicationResources.properties
Outdated
Show resolved
Hide resolved
* Fixed wrong version number on translation deprecation section
Jira URL
https://jira.xwiki.org/browse/XWIKI-22121
Changes
Description
Clarifications
Screenshots & Video
2024-06-04.13-58-09.mp4
(note that there was a small bug with the display name after the successful registration on the video, it's been fixed since this video has been recorded)
On the video, we can see, in this order:
Executed Tests
Successfully built
xwiki-platform-administration
with the quality, integration-tests and docker profiles. Builtxwiki-platform-flamingo-skin
too. The only fails left are already here on the CI (without the changes from this branch).Manual tests, see video. For backward compatibility of the livevalidation feature, I tested on the page location form (no changes to this form, but everything worked properly still). Note that it would be good to test more backward compatibility with a couple other forms, but AFAIK this is the only other use of
livevalidation_prototype.js
in XWiki standard.Expected merging strategy