Skip to content

feat: extra registration fields improvements#9

Open
BryanttV wants to merge 10 commits intoednx-release/teak.masterfrom
bav/extra-registration-fields-improvements-teak.master
Open

feat: extra registration fields improvements#9
BryanttV wants to merge 10 commits intoednx-release/teak.masterfrom
bav/extra-registration-fields-improvements-teak.master

Conversation

@BryanttV
Copy link
Copy Markdown

@BryanttV BryanttV commented Apr 24, 2026

Closes: https://github.com/eduNEXT/consulting-issues-mapping/issues/829

Description

This PR improves the FormFieldRenderer component and the configurable registration form with better UX feedback, input validation, and more robust error message handling.

  1. Placeholder support for text and textarea fields in FormFieldRenderer.
  2. maxLength restriction applied natively on text inputs using fieldData.restrictions.max_length.
  3. Animated help text on focus, displays fieldData.instructions while the field is focused, using TransitionReplace.
  4. Error message normalization, new normalizeErrorMessage utility that converts backend error messages arriving as objects (e.g., { required: "..." }) to strings, preventing [object Object] from being displayed.

Testing Instructions

Using Tutor:

  1. Use changes in this PR: https://github.com/eduNEXT-collab/campus-agora-your-cluster-project/pull/8
  2. Create a mount of the MFE, cloning this repository in your tutor root environment, and run tutor mounts add frontend-app-authn
  3. Run nvm use && npm install
  4. Go to the registration page at http://apps.local.openedx.io:1999/authn/register
  5. You should see a new field called Date of birth.
  6. You can test the new validations, user feedback, and error messages.

Screenshots/sandbox (optional):

Before After
Without placeholder and help text image With placeholder and help text image
ERROR! ❌ Field required message image
Without max length restriction image With max length restriction image

@BryanttV BryanttV marked this pull request as ready for review April 27, 2026 18:02
@mariajgrimaldi
Copy link
Copy Markdown

This is a very nice improvement to the user experience, but if we don't contribute it back upstream, we'd have to maintain it ourselves. Can we consider opening this against upstream master?

@BryanttV
Copy link
Copy Markdown
Author

@mariajgrimaldi, Yes, I definitely think that would be the best option. I didn't choose to push it directly to upstream right away because the unit tests aren't ready yet, and I'd also like to have it reviewed from a front-end perspective before publishing it to upstream.

@BryanttV BryanttV force-pushed the bav/extra-registration-fields-improvements-teak.master branch from 315e000 to 610a0a6 Compare April 28, 2026 21:53
@BryanttV BryanttV force-pushed the bav/extra-registration-fields-improvements-teak.master branch from 9cf0660 to cc0f791 Compare April 29, 2026 19:36
@BryanttV BryanttV requested review from bra-i-am and removed request for bra-i-am April 30, 2026 19:01
@mariajgrimaldi mariajgrimaldi requested a review from a team May 5, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants