Skip to content

T2902 Create loading state on profile settingspage#253

Open
Danielgergely wants to merge 42 commits into14.0from
T2902-profile-settingspage
Open

T2902 Create loading state on profile settingspage#253
Danielgergely wants to merge 42 commits into14.0from
T2902-profile-settingspage

Conversation

@Danielgergely
Copy link
Member

@Danielgergely Danielgergely commented Jan 23, 2026

  • Added loading spinner which blocks buttons and indicates loading -> improves UX
  • Adapted the form to utilize basic client-side validation with visual indicators. (Faster and better feedback to the user, instead of waiting until the backend returns the validation result)
  • Utilized the already existing global form validation
  • Adapted and tweaked it a bit
  • Small bugfixes and UI improvements

EliasKeller and others added 30 commits August 18, 2025 13:09
…sership-form' into T2586-phone-number-check-in-sponsership-form

# Conflicts:
#	theme_compassion_2025/templates/components/FormField.xml
…-sponsership-form

T2586 phone number check in sponsership form
…n messages

# FEATURE: Added (optional) display content and edit field tags to the FormField
# REFACTOR: Adapted last and firstname form fields to be compatible with new FormField
# REFACTOR: Changed form from generic <div> to a better suited <form>
# REFACTOR: Added e.preventDefault() to button event handlers to prevent automatic submission of form when clicking a button
# REFACTOR: Added validation to all form fields
# REFACTOR: Changed clearErrors to clearValidations -> my_user_settings.js
# REFACTOR: Added validation check event listener to input fields
# FEATURE: Added loading spinner to settings page
# FEATURE: Show/hide spinner based on backend loading state
# FEATURE: Added some styling for the spinner
# FEATURE: spinner parent styling
# REFACTOR: Added wrapper to spin icon and applied animation to the wrapper instead of the icon itself
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Danielgergely, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience on the profile settings page. It introduces a loading spinner to provide clear feedback during save operations and implements robust client-side validation for form fields. These additions ensure users receive immediate visual cues and error messages, making the interaction smoother and more intuitive.

Highlights

  • Loading Spinner Implementation: A loading spinner has been added to the user profile settings page. This spinner activates when the user attempts to save changes, blocking interaction with the buttons and providing visual feedback that an operation is in progress, thereby improving the user experience.
  • Client-Side Form Validation: The profile settings form now incorporates basic client-side validation. This provides immediate feedback to the user regarding invalid input, such as missing required fields or incorrect formats (e.g., email, phone numbers, zip codes), before the data is sent to the backend. This significantly enhances responsiveness and user guidance.
  • UI/UX Enhancements: The changes collectively improve the overall user experience by offering faster feedback on form input and clearly indicating when the system is processing a request, reducing uncertainty and potential for multiple submissions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly improves the user experience on the profile settings page by adding client-side validation and a loading spinner. The implementation is generally solid, particularly the handling of UI states during asynchronous operations. I've identified a few issues, including a critical CSS syntax error, some overly restrictive validation patterns that could impact users, and an incorrect HTML input type. I've also included suggestions for code consistency and modernization in the JavaScript. Addressing these points will further enhance the quality and robustness of the feature.

# FIX: removed redundant mobile version override selector
# FIX: fixed typos and made minor corrections to regex patterns
# REFACTOR: Simplified javascript
@NoeBerdoz NoeBerdoz changed the title T2902 profile settingspage T2902 Create loading state on profile settingspage Jan 27, 2026
@NoeBerdoz
Copy link
Contributor

The implemented field validation logic goes in conflict with an awaiting PR #230, It would be perfect if you can take the time to review this PR, and integrate its work into yours.

Here is how to proceed:

  1. Review PR T2591 extend usage of form field validator #230
  2. Merge PR T2591 extend usage of form field validator #230 into yours T2902 Create loading state on profile settingspage #253
  3. Refactor your field validation to be compliant with the approach of T2591 extend usage of form field validator #230
  4. Document this in both PR when done

Fee free to suggest another way of doing it.

Copy link
Contributor

@NoeBerdoz NoeBerdoz left a comment

Choose a reason for hiding this comment

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

Reason in my last comment

…profile-settingspage

# Conflicts:
#	my_compassion/static/src/js/my2_user_settings.js
#	my_compassion/templates/pages/my2_user_settings.xml
#	theme_compassion_2025/templates/components/FormField.xml
@ecino ecino changed the base branch from 14.0-MyCompassion2.0 to 14.0 February 5, 2026 10:25
@NoeBerdoz NoeBerdoz marked this pull request as draft February 6, 2026 11:56
# Conflicts:
#	theme_compassion_2025/templates/components/Select.xml
- REFACTOR: removed unused toggleLoader function calls
- REFACTOR: removed user reference and phone required from user settings
- REFACTOR: added classes to hide the red asterisk in display mode
- REFACTOR: changed var to const, and changed error message to display in white when dark-bg class is added to input
@Danielgergely
Copy link
Member Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant improvements to the user experience by adding a loading state to the profile settings page and implementing client-side form validation. The new FormFieldValidator widget centralizes validation logic for required fields, email, and phone numbers, providing faster feedback to the user. Styles for invalid fields and required asterisks have been updated globally and specifically for the user settings and new sponsorship wizard forms. While the changes are generally positive, there are some areas that require attention, particularly regarding redundant validation logic and potential issues with event listeners in the user settings JavaScript.

- REFACTOR: changed position of loading indicator
- REFACTOR: consolidated and simplify js business logic on user form settings
- REFACTOR: added container to edit + cancel button for better positioning
- REFACTOR: added a limit of 15 numbers to phone number fields
- FEAT: added name and zip regex
@Danielgergely
Copy link
Member Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant improvements to the user experience and code maintainability. The addition of a loading spinner on the profile settings page provides clear feedback to the user during save operations. The major refactoring of form validation to a client-side, component-based approach is excellent. It centralizes validation logic, making the code cleaner, more robust, and easier to extend. The CSS has also been nicely refactored to use global styles, reducing duplication. Overall, this is a high-quality contribution.

@Danielgergely Danielgergely marked this pull request as ready for review February 11, 2026 10:53
@Danielgergely
Copy link
Member Author

Danielgergely commented Feb 11, 2026

IMPORTANT: For the title it is recommended to use these 4 values: Mr., Mrs., Miss., Fam. To activate these theis_published value should be set to true. This will populate the title dropdown accordingly.
Additionally the French (and maybe Italian) translations might need to be adapted because the title.shortcut is used. In English and German the translation is good.

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.

3 participants