Commit Graph

7 Commits

Author SHA1 Message Date
hunteraraujo
57bcbdf45c Refactor LeaderboardSubmissionDialog to use SharedPreferencesService 2023-10-10 23:19:35 -07:00
hunteraraujo
f97fc0dd3d Add GitHub Repository Validation to Leaderboard Submission Dialog (#5539) 2023-10-04 11:32:45 -07:00
hunteraraujo
0847505add Dismiss leaderboard submission pop up after submitting 2023-09-27 15:46:54 -07:00
hunteraraujo
122c996714 Add helpful print statements and fix isURL validation 2023-09-27 15:46:05 -07:00
hunteraraujo
105b80101e Update Leaderboard Submission Dialog to Pass Parameters to ViewModel
This commit updates the Leaderboard Submission Dialog to pass the team name, repository URL, and commit SHA as parameters to the submitToLeaderboard function in the SkillTreeViewModel. These changes ensure that the dialog and the ViewModel are aligned in terms of parameter requirements, facilitating efficient and accurate leaderboard submissions.
2023-09-27 15:33:11 -07:00
hunteraraujo
9c1b55b9fb Integrate UriUtility in LeaderboardSubmissionDialog for URL Validation
This commit integrates the newly created UriUtility class into the LeaderboardSubmissionDialog. The isURL method from UriUtility is used to add an additional layer of validation for the GitHub repository URL input field. It ensures that users enter a valid URL format before submitting their leaderboard entries.

Changes made:
- Integrated UriUtility’s isURL method in the _validateAndSubmit function of the LeaderboardSubmissionDialog.
- Added a specific error message "Invalid URL format" to inform users when the entered URL does not meet the validation criteria.
- Updated the state management to reflect the URL validation status and re-render the dialog with appropriate error messages when necessary.

With this integration, the application now provides real-time feedback on the validity of the entered URL, enhancing user experience and data integrity by ensuring that only valid URLs are submitted to the leaderboard.
2023-09-27 15:11:27 -07:00
hunteraraujo
6365071bb4 Add LeaderboardSubmissionDialog with SharedPreferences support
Introduce the LeaderboardSubmissionDialog widget which allows users to submit their team name, GitHub repo URL, and commit SHA for leaderboard consideration.

Features:
- Field validation: Ensure that all required fields are filled before submission.
- SharedPreferences integration: Save the user's last submission values and auto-populate the fields with these values when the dialog is shown next time.

This enhancement provides a smoother user experience by reducing repetitive data entry for subsequent leaderboard submissions.
2023-09-26 15:41:51 -07:00