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

Integrate miscellaneous features for collaboration feature #57

Merged
merged 10 commits into from
Oct 29, 2024

Conversation

bensohh
Copy link

@bensohh bensohh commented Oct 28, 2024

This PR summarises the additional implementation added to the existing collaboration feature

Things Done:

  • Changed the session's Matched User to pull from the WebRTC's provider instead of localStorage (it will display Loading... until the onChange event occurs, might take some time to load)
  • Implemented a count-up stopwatch for the collaboration session and its handler to stop the stopwatch when the session end button is triggered (Currently utilising localstorage)
  • Wrapped the existing end session button within a Modal Component to double-check if user intends to end session
  • Implement the end session for both users:
    • When user1 and user2 are matched into a collaboration session, either user that triggers an end session will result in the session being ended for both users (as discussed/agreed on previously, we can change this if we want)
    • Example flow: user1 triggers end session --> sets a endSession state in the provider to inform user2 --> user2 listens for change event in states and detects a change in the states --> user2 realise its an endSession --> triggers end session for user2 --> Notification Displayed --> End Session Modal shown --> redirected to matching page
  • Minor fixes: changed the <text> component that has been throwing error to <span>

Additional TODO (to be discussed):

  • Storing of timer in db instead of localStorage
  • Detection of close window/tab for collaboration session to trigger end session
  • Selection of language for collaboration editor (Nice to have?)
  • Test-cases and execution service

Noticed unintended behaviour:

  • After submission of code, display notifications (for both user and peer), trigger end session, displays code submission notification for peer again @solomonng2001

@bensohh bensohh self-assigned this Oct 28, 2024
Copy link

@solomonng2001 solomonng2001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bensohh bensohh merged commit 02b9a80 into staging Oct 29, 2024
1 check passed
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.

2 participants