Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
P2Fancy: SourceAcademy GitHub Classroom with central repository (#1771)
* test: Fixed tests for FileExplorerDialog * test: wrote tests for GitHubMissionDataUtils * test: wrote tests for GitHubMissionBrowserDialog and GitHubSaveDialog * feat: removed unnecessary console log * feat: increased code coverage for GitHubMissionDataUtils * style: run format * refactor: removed unused files * feat: Added back apparently used files * feat: Improved the default text for Task and Mission briefings * feat: added GitHubAssessmentsNavigationBar Shifted working GitHubLogin to the navbar * Revert "feat: added GitHubAssessmentsNavigationBar" This reverts commit f44eb77. * Refactor GitHub missions to use navbar * Yarn run format and test * feat: Added time-based sorting for mission browser * feat: Added due date display * style: fixed imports for GitHubMisisons * refactor: removed outdated code * Updated props for Application and Navbar tests * fixed typo in NavigationBar test * refactor: changed MissionData to use a typescript declaration * refactor: changed MissionMetadata to use a typescript declaration * style: ran yarn format * feat: Made MissionRepoData a typescript type * refactor: changed TaskData to use a typescript declaration * refactor: fixed imports for some files * feat: removed the popover from GitHubLoginButton for better UX * test: Added snapshot test for GitHubAssessmentsNavigationBar * style: ran format * style: used relative imports * removed unused props * Added GitHubMission navlink to mobile * fixed editorvalue in applicationtypes * removed popover for GitHubLoginButton * refactor: used the old buttons for next and previous task * Changed MissionData and MissionMetadata to use TypeScript type declaration. * yarn run format * yarn run format * fixed GitHubmissionDataUtil test * fixed import for GitHubMissionDataUtils * refactor: removed the TaskView button from the control bar * feat: Added error-handling to getContentAsString in GitHubMissionDataUtils * refactor: made the GH Assessments datatypes to be export defaults * refactor: fixed imports * refactor: removed redundant missionTask and missionBriefing types * refactor: renamed _mission.scss for more clarity * test: Fixed test import for GitHubMissionDataUtils * refactor: moved references to store out of FileExplorerDialog * refactor: renamed GitHubMissions to GitHubMissionListing * test: updated tests * refactor: Fixed imports in Application * feat: fixed the case check for mission repos * feat: the mission listing only lists mission repositories that have a METADATA file * feat: Added more user feedback for when loading mission repos * style: ran format * refactor: GitHubAssessment(Workspace) refactored * style: fixed styling in GitHubAssessmentWorkspace * refactor: removed files unused in current phase of project * Added briefing and reset overlay to GitHubAssessmentWorkspace * feat: Added toggle variable to constants for GitHubAssessments * fix: fix for previous commit * fix: display correct task descriptions * feat: Added unsaved changes warning to the save button * fixed GitHubAssessmentWorkspace editCode to use setTaskList * feat: Added re-routing to mission listing if user is not logged in * fix: made correct task descriptions show * feat: changed the filename of the metadata file * style: ran format * feat: Added loading state to GitHubAssessmentWorkspace page * docs: removed unnecessary comments from ControlBarGitHubButtons * docs: removed unnecessary comments * docs: Added comments for ControlBarGitHubButtons * docs: Added comments to GitHubMissionDataUtils * docs: Added documentation for GitHub-related components * style: run yarn format * docs: Added comments to GitHubAssessmentsNavigationBar * docs: Added more documentation to GitHubUtils * docs: Added documentation to GitHubMissionListing * test: updated snapshot for navbar * removed githuboctokitinstance from Application * fixed Playground test props * fix: updated Constants to pass CI * Added: filter for GitHubMissionListing page * let getGitHubOctokitInstance be any type for test * Yarn run format and test * updated GitHubMissionListingFilter Filter is now && for all tags (meaning that mission must contain all tags to be shown. Filter is case insensitive now. * fix: updated .env.example file * fix: force 404 on githubassessments page according to .env variables * fix: removed unused prop, fixed props types in ControlBarGitHubButtons * fix: used explicit prop type in RepositoryDialog and FileExplorerDialog * refactor: slight refactor in FileExplorerDialog * fix: add error pop-up to GitHubMissionDataUtils * fix: fix typo, numProps should be dateProps * fix: moved github mission types into a single file * fix: removed unused props from GitHubAssessmentWorkspace * fix: revert the previous changes that removed props * fix: editCode function no longer mutates original array * fix: removed unnecessary array copying * fix: used properly updated large spinner size * fix: Added explicit typing for GitHubRepositoryInformation retrieved through octokit * fix: removed unused side content type for current phase * fix: Added tracking for unsaved changes after resetting * fix: removed unused Debugger functions from GitHubAssessmentWorksapce * style: yarn run format * fix: removed handleInterruptEval from GitHubAssessmentWorkspace * fix: removed more unused callbacks from GitHubAssessmentWorkspace * fix: renamed SourceChapter * feat: made showOverlay in the same re-render as loading missions * fix: use same onChangeTabs for mobile workspace * Added GitHubCourseListing page * Updated to show mission links * Updated snapshot * Fixed GitHubCourseListing filter * feat: Added explicit typing for Octokit return values * feat: explicitly typed listForAuthenticatedUser * fix: removed unnecessary console log * fix: made GitHubMissionDataUtils octokit param explicitly typed * test: rewrote FileExplorerDialog test * test: rewrote tests for GitHubTreeNodeCreator * refactor: rewrote GitHubMissionListing for better readability * refactor: rewrote GitHubMissionListing to use Promise.all * reactor: rewrote GitHubMissionListing for better clarity * feat: tags are now case-agnostic in GitHubMissionListing * Added feature to filter missions by org and show unaccepted missions * fix: solved compile error due to possible null or undefined * fix: Added handling of case where there are no mission repos * fix: removed currently unused style for missionEditor * fix: Fix style naming for GitHubAssessmentWorkspace * fix: temporarily removed sideContentMissionEditor style * Removed white navbar from mobile GitHubMissionListing * Fixed missing props in NavigationBarMobileSideMenu test * fix: Removed refresh calls in FileExplorerDialog * Replaced deprecated ITreeNode with TreeNodeInfo * fix: Fixed GitHubMissionListing which would sometimes display wrong non-ideal state message * fix: Added login button to GitHubMissionListing in mobile version * test: fixed OctokitTypes to pass CI * test: fixed OctokitTypes to pass CI * test: fixed OctokitTypes to pass CI * test: fixed OctokitTypes to pass CI * fix: reinstated 404 when githubassessments should not be shown * fix: Fixed prop types for ControlBarGitHubButtons * feat: Added onClickReturn callback to next button in GitHubAssessmentWorkspace * fix: Fix issue with save button lighting up * fix: made the save button stop highlighting after save * fix: Made MissionListing asynchronous * fix: Made prompt appear when attempting to navigate away from GitHubAssessmentWorkspace * fix: unexported getTasksData * fix: setCachedTaskList to the original task list * fix: removed OctokitTypes and imported octokit types instead * Updated .env.example file * Add asynchronous fetching of tasks when loading GithubAssessmentWorkspace * updated .env.example * Fixed GitHubMissions Login Logout button visibility * fix: Use store variables for unsaved changes, prevent github logout if there are unsaved changes * test: fix logout github to work for test * fix: added prompt for user when attempting to navigate away from current question with unsaved changes * Fix workspace width issue * feat: Reset to previously saved code when navigating away * GitHub Mission now processes new .CourseInformation.json correctly. * Yarn run format * Added filter for specific named orgs * Updated feature to process course-info.json .metadata file is no longer needed to retrieve mission data from GitHub. orgs without course-info repo will no longer show up. * Update props for GitHubAssessmentsNavigationBar Test * Updated failing snapshots * GitHub Classroom now properly separated into different assessment groups. * fixed typing for store in useSelector * Merged from upstream * Added temporary navbar for mobile GitHubClassroom The page is unusable without at least a navbar * fix: disable teacher mode if student is member of organization * style: yarn run format * Added tests for GitHubClassroom * Merge branch 'P2Fancy' of https://github.com/chekjun/cadet-frontend into P2Fancy * A default course is selected if found * Yarn run format * Refactored GitHubClassroom, Navbar and added AssessmentListing * Updated routing * Remove comments * Update snapshots * Remove outdated css * Added refreshButton, shorter courseNames and sorting by dueDate/published * fix: Prevent saving if assessment is overdue * fix: Removed save dialog for learners in assessment workspace * Fix course selection issue * fix: removed unnecessary variables from MissionMetadata * Added welcome page for no course * Yarn test * Fixed bug with redirecting to GitHub Classrooms * Fix routing location state issue * Fixed bug where non-accepted assessment has "Review Answers" button. * Fix github navbar.. * Update welcome page css Co-authored-by: ChengGeng97 <47176493+ChengGeng97@users.noreply.github.com> Co-authored-by: Martin Henz <henz@comp.nus.edu.sg> Co-authored-by: Chow En Rong <53928333+chownces@users.noreply.github.com>
- Loading branch information