-
Notifications
You must be signed in to change notification settings - Fork 0
TIG-134-Join_Request_Popup #4
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a join request modal popup that collects user phone number and optional comments before sending a ride join request. The modal notifies users that an email will be sent to the ride creator with their information.
Key Changes
- Added a modal dialog for ride join requests with phone number and comment fields
- Modified the join button to open the modal instead of directly submitting the request
- Updated backend dependencies to use
psycopg2-binaryinstead ofpsycopg2
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/pages/AllRides.jsx | Added join request modal with phone number and comment inputs; updated handleRideRequest to accept and pass these new parameters |
| backend/requirements.txt | Changed psycopg2 to psycopg2-binary for better compatibility |
| backend/app.py | Added trailing whitespace to final line |
| .gitignore | Expanded ignore patterns for Python virtual environments and Node modules |
Comments suppressed due to low confidence (1)
frontend/src/pages/AllRides.jsx:354
- The success message is shown and modal is closed before checking if the response is ok. Lines 339-349 should be moved inside a conditional block that executes only when response.ok is true, otherwise users will see a success message even when the request fails.
handleShowPopupMessage(
setPopupMessageInfo,
true,
"Request sent! An email has been sent to the ride creator."
);
// Close modal and reset fields
setShowJoinModal(false);
setPhoneNumber("");
setJoinComments("");
setSelectedRide(null);
await fetchDashboardData(); // refresh dashboardData after requesting ride
if (!response.ok) {
console.error("Request failed:", response.status);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <input | ||
| type="tel" | ||
| value={phoneNumber} | ||
| onChange={(e) => setPhoneNumber(e.target.value)} | ||
| placeholder="Enter your phone number" | ||
| className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-theme_medium_1" | ||
| /> |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phone number input lacks validation. Users can submit the form without entering a phone number or with an invalid format. Consider adding required validation and pattern matching for phone number format before allowing the request to be sent.
Popup modal for users when they click on join ride that has text boxes for phone number and optional comments. Also informs the user that an email has been sent to original ride creator.