[T2847] FIX: W&P check now happens when users enters birth date#312
[T2847] FIX: W&P check now happens when users enters birth date#312
Conversation
Danielgergely
commented
Mar 26, 2026
- FIX: added birthday change event handling and check to W&P form
- REFACTOR: changed var to const/let in JS file and extracted age check as a separate function
- FIX: sponsor me button now doesn't redirect to the profile page, but works as intended
- FIX: removed duplicate id from hidden birthdate input
- FIX: added birthday change event handling and check to W&P form - REFACTOR: changed var to const/let in JS file and extracted age check as a separate function - FIX: sponsor me button now doesn't redirect to the profile page, but works as intended - FIX: removed duplicate id from hidden birthdate input
Summary of ChangesHello, 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 enhances the user experience and code quality within the new sponsorship wizard. It primarily focuses on improving the 'Write & Pray' age verification process by making it more immediate and modular. Additionally, it includes general JavaScript refactoring and minor UI fixes to ensure smoother form interactions and correct display of elements. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the new sponsorship wizard, primarily by updating var declarations to const/let and implementing a new age verification system for the 'Write & Pray' sponsorship type. The age check logic has been extracted into a dedicated method and integrated into the form flow, with an event listener for birthdate changes. Additionally, a z-index style was applied to the 'Sponsor me Button' div. Feedback includes correcting an incorrect JavaScript selector (input #birthdate), refactoring duplicated age verification logic in _onBirthDateChange to utilize the _checkWAPAge method, and moving the inline z-index style to a CSS class for improved maintainability.
NoeBerdoz
left a comment
There was a problem hiding this comment.
Thanks @Danielgergely, it's a great approach you are proposing there 👌
But I can't approve the PR as when testing the feature, I'm facing an error 400 for already logged-in users. (Maybe this issue was already there before your proposed changes, if so confirm it to me, then we will merge your PR and create a new ticket for the issue)
- FIX: if birthday is not set, partner can now select a date and ensure the birthdate check is working
- FIX: looking at name instead of id for birthday validation check
- FIX: Wording and (French) translation verified by Olivier