Skip to content
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

Feedback #1

Open
wants to merge 218 commits into
base: feedback
Choose a base branch
from
Open

Feedback #1

wants to merge 218 commits into from

Conversation

github-classroom[bot]
Copy link

@github-classroom github-classroom bot commented Sep 3, 2024

👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to main since the assignment started. Your teacher can see this too.

Notes for teachers

Use this PR to leave feedback. Here are some tips:

  • Click the Files changed tab to see all of the changes pushed to main since the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue + (plus sign). To learn more about comments, read “Commenting on a pull request”.
  • Click the Commits tab to see the commits pushed to main. Click a commit to see specific changes.
  • If you turned on autograding, then click the Checks tab to see the results.
  • This page is an overview. It shows commits, line comments, and general comments. You can leave a general comment below.
    For more information about this pull request, read “Leaving assignment feedback in GitHub”.

Subscribed: @samuelim01 @McNaBry @KhoonSun47 @LimZiJia @limcaaarl

samuelim01 and others added 6 commits November 12, 2024 22:21
* Add backend deploy script

To save costs, backend services are spun down most of the time. This was manually done by changing the desired number of tasks to 0 manually. Let's create a bash script to simplify the process.

* Document backend deploy

* Elaborate on access key process

* Fix formatting

* Clarify expired env variables
The chat service is embedded within collaboration. Let's modify history to use port 8085 instead
* Fix bug
- Previously, on successful forfeit call, we still set
a new entry in the yjs doc. This causes the yjs doc
to be reintialise when both users has already forfeited

* Refactoring in Collaboration Service:

- Refactor comments in collab service
- Move interface from controller folder to types folder
- Refactor README.md
- Remove unused variable in queue: MATCH_FOUND

* Update message for when user agrees to submit

---------

Co-authored-by: KhoonSun47 <[email protected]>
* Downgrade PrimeNG version

* The previous PrimeNG version seems to be causing a font file issue. Downgrading it fixes the issue.

* Update match label for nav bar
* Replace panel with PrimeNG sidebar to make it responsive

* Make questions table responsive

* Add min width to ensure the contents don't collapse on each other
* Reduce margins on smaller screen
* Create Profile Page

Profile page is under '/account' route. It allows users to change
account details and password.

I moved around some files and refactored getters from register.component into
forms.utils.service.

Slightly changed behavior of user service update user. Did not
understand what it was trying to do before, so I changed it to work. It
feels like it works, but not extensively tested.

Known bugs: (1) Enter does not submit edit forms. (2) Edit profile form does not
inherit theme from primeng.

* Add webpage for history

Branch has not merged with history service, so although history service
is made, it is not being used.

* Working History page

Bugs fixed: Imported PInputText so editing profile page looks normal. The behaviour for 'Enter' to submit form is restored for profile page.

Not Fixed: Linting.

* Fix linting

Added interfaces for hisotry response.

* Fix merge

* Fix suggestions on the PR

Most of it has been fixed, except for changing how user service works.

* Improve error messages

* Enable viewing of code in history page

Similar to questions page, there is a sliding window to view the last
snapshot of the coding session before forfeit or submit.

History table is now searchable.

Profile page now properly subscribes to user$ and does not need to
refresh.

Known bugs: during a colab session, cannot view history page. No idea
how to debug since it did not show errors or any console.log()

* Fix linting

* Fix test case

* Fix bug where histories cannot be loaded during colab session

Fix interfaces to be more correct.

* Fix lint

* Add new routes to user service to handle update to user details

* Redefine zod schemas for better reusability
* Add route to handle update to user's username and email
* Add route to handle update to user's password

* Update frontend to call the correct routes when updating user profile

* Fix linting

* Add dialogs for editing user profile and password

* Update styles for profile page

* Shift buttons out of profile container
* Display profile details as text instead of readonly input

* Refactor backend to handle history snapshot

Remove the need for the frontend to send the final code and language

* Fix history panel appearing when no code history exists

* Add description to question

* Fix history code being editable

* Remove redundant login calls

* Redirect to the collab session if in progress

---------

Co-authored-by: Samuel Lim <[email protected]>
Co-authored-by: McNaBry <[email protected]>
samuelim01 and others added 6 commits November 13, 2024 21:10
* Fix forfeit not retrieving snapshot

* oops
* Bug fix for #77
- Users will now be warned if their tokens are about to expire
- Users will be logged out upon token expiration

* Update from toast to alert for expired token

* Replace interval with timer

* Enhance warning

* Fix linting

* Fix takeUntilDestroyed

https://stackoverflow.com/questions/76264067/takeuntildestroyed-can-only-be-used-within-an-injection-context

---------

Co-authored-by: Samuel Lim <[email protected]>
* Fixed bugs

- Changed transitions to 50ms so that it doesnt break
- Disabled clicks to checkbox and edit buttons propagating to row select

* Adjust sidebar speed

---------

Co-authored-by: McNaBry <[email protected]>
* Update user service README

* Add documentation for new routes to update username, email and password
* Modify examples to conform to format requirements
* Add new section detailing input format requirements
* Add input validation segment to relevant routes

* Add input validation for user service when updating user

* Fix linting

* Rename required_errors to requiredErrors

* Update user service README

* Shift endpoint input validation to be under body section
* Fix question page error

It was using the old error system and was missing a toast for
messagingService to serve error messages to user

* Fix linting

---------

Co-authored-by: LimZiJia <[email protected]>
* Update history page styles

* Move history out of account as parent div being flex/grid affects table style
* Adjust width of side panel to be maximum 90% of screen width
* Update styles of readonly editor

* Fix compose.dev.yml

* Fix panel description styling

Co-authored-by: samuelim01 <[email protected]>

* Conver history panel to primeNG sidebar

* Fix sorting for history table

* Remove console log statements in history component

* Add fix to history

* Make SortEvent required
* Adjust undefined handling for dt
* Adjust time format

* Remove removable sort

* Fix question sort

* Fix filter

---------

Co-authored-by: Samuel Lim <[email protected]>
Co-authored-by: samuelim01 <[email protected]>
* To create a PR

* Emergency commit

Not working but need to restart computer.

* Same as above commit

* Add some test cases

* Fix question page error

It was using the old error system and was missing a toast for
messagingService to serve error messages to user

* Almost done with questionController

* Done with questionController.spec.ts

* Question Service tests

* All testing files for question service

* Fix Lint

* Collab Service tests

* Try fix ts

* Another try at ts

* Edit package.json of question

* Pls work for collab now

* Edit workflow to add tests

* Trying out something

* Fix Linting

* Pray

* Desperate Measures

Commented out problem files

* Remove empty testing files in user service

* Fix history tests

* Fix question tests

* Simplify history tests

* Remove dotenv

* Attempt to fix question

* Fix collab tests

* Try fix

* Oops

* Remove package-lock

* Remove dotenv

* Tidy history tests

---------

Co-authored-by: McNaBry <[email protected]>
Co-authored-by: Samuel Lim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants