T2902 Create loading state on profile settingspage#253
T2902 Create loading state on profile settingspage#253Danielgergely wants to merge 42 commits into14.0from
Conversation
…er in my2_new_sponsorship_wizard.js
…s/form_field_validator.js
…er in my2_new_sponsorship_wizard.js
…s/form_field_validator.js
…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
… for sponsorship-wizard
…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
Summary of ChangesHello @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
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this comment.
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
|
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:
Fee free to suggest another way of doing it. |
NoeBerdoz
left a comment
There was a problem hiding this comment.
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
# 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
|
/gemini review |
There was a problem hiding this comment.
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
|
/gemini review |
There was a problem hiding this comment.
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.
|
IMPORTANT: For the title it is recommended to use these 4 values: Mr., Mrs., Miss., Fam. To activate these the |
Uh oh!
There was an error while loading. Please reload this page.