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-22813: Create User dialog no longer automatically suggests username based on first and last names #3906

Merged
merged 8 commits into from
Feb 20, 2025

Conversation

Sereza7
Copy link
Contributor

@Sereza7 Sereza7 commented Feb 18, 2025

Jira URL

https://jira.xwiki.org/browse/XWIKI-22813

Changes

Description

  • Added a parameter in the registration class.
  • Added the API to retrieve this parameter
  • Added the script service associated to the new API.
  • Used this script service in the velocity template for the form.
  • Deprecated the About You section title and reorganized the form to take into account the discussion.
  • Added translations for the new admin parameter hint

Clarifications

  • By default, the first and last names are not in the form anymore. That's pretty much an arbitrary default, we can switch it around someday if facts show us that this is a wrong choice. Feedback and brainstorming done so far couldn't highlight a clear preference for a default value.
  • If the admin wants them like they used to be, they can check this parameter in the User and rights -> Registration section. Checking this box will make the form very similar to what used to be before the changes brought in XWIKI-22121.

Screenshots & Video

Video demo of the changes, with the toggle ON and OFF:

2025-02-18.15-38-06.mp4

I'm not 200% sure about the position in the Admin form, we can still move it later if needed.
At the time of the video, I forgot to add the parameter hint. Here is what it looks like after the last commit:
image

Executed Tests

Manual tests, see above.
Passed successfully mvn clean install -f xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication -Pquality,docker,integration-tests in three minutes (2 minutes in the docker tests).
Initial self proofreading done.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • 16.10.X, like XWIKI-22121

…name based on first and last names

* Added a parameter in the registration class.
* Added the API to retrieve this parameter
* Used this API in the velocity template for the form.
* Deprecated the `About You` section title and reorganized the form to take into account the discussion.

WIP: atm, setting the parameter to true does not make the fields appear...
…name based on first and last names

* Added the script service associated to the new API.
…name based on first and last names

* Fixed the form error that prevented the form from being submitted by admins when in a dialog.
* Updated documentation to reflect the new state of the form.
…name based on first and last names

* Updated translations to provide a correct description of the admin parameter added.
…name based on first and last names

* Fixed the changes to the registration form template
@Sereza7 Sereza7 requested a review from surli February 18, 2025 15:12
@Sereza7 Sereza7 marked this pull request as draft February 18, 2025 17:00
@Sereza7
Copy link
Contributor Author

Sereza7 commented Feb 18, 2025

Discussed on the live chat: the removal of the first and last name fields should be discussed more and not backported to LTS without careful consideration. We won't be merging this PR in 16.10.4 in order to have more time to discuss some changes. Opening this PR back up for reviews when we have agreed on:

  • Removing the first and last name from the form on the "low importance" option
  • What the default state of this toggle should be.

@Sereza7
Copy link
Contributor Author

Sereza7 commented Feb 20, 2025

The conclusion reached is that we should revert the changes to the form to keep only the version with first and last name. A switch for that is superfluous and it's not worth the complexity in the Admin UI.

…name based on first and last names

* Reverted the addition of a toggle for the state of the form. Reverted the form field order to what used to be.
…name based on first and last names

* Reverted the addition of a toggle for the state of the form. Reverted misc leftover changes
…name based on first and last names

* Reverted the addition of a toggle for the state of the form. Reverted misc leftover changes
@Sereza7
Copy link
Contributor Author

Sereza7 commented Feb 20, 2025

Done in the past three commits.

@Sereza7 Sereza7 marked this pull request as ready for review February 20, 2025 13:10
@surli surli merged commit 340e8c9 into xwiki:master Feb 20, 2025
github-actions bot pushed a commit that referenced this pull request Feb 20, 2025
…name based on first and last names (#3906)

* Reverted the form field order to what used to be.

(cherry picked from commit 340e8c9)
Copy link

💚 All backports created successfully

Status Branch Result
stable-16.10.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

surli pushed a commit that referenced this pull request Feb 21, 2025
…name based on first and last names (#3906)

* Reverted the form field order to what used to be.

(cherry picked from commit 340e8c9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants