In this PR, we combine the implementation of the minimum viable product (MVP) for the Commons Chat. This consists of a minimizable ChatPanel on the PlayPage for each commons. This panel displays the 10 most recent messages in the commons, with usernames, user ids, and timestamps. This window ensures that the chats are sorted, and autolocks the scrollbar to the most recent message (bottom). There is also a form to send a new message, with checks to prevent empty messages. The backend has all the necessary CRUD operation endpoints, including POST and a paginated GET. DELETE is implemented with a hidden flag, and there are admin-only endpoints for retrieving hidden messages. UPDATE is not necessary, as the chats should be immutable, save for the hidden flag.
Refer to #76, #77, and #79 for steps along the way
Screenshots (Optional)
Validation (Optional)
Download this branch.
Run the project.
Go to the PlayPage for any commons.
Try out some messages!
Tests
[x] Backend Unit tests (mvn test) pass
[x] Backend Test coverage (mvn test jacoco:report) 100%
[x] Backend Mutation tests (mvn test pitest:mutationCoverage) 100%
[x] Frontend Unit tests (npm test) pass
[x] Frontend Test coverage (npm run coverage) 100%
Overview
In this PR, we combine the implementation of the minimum viable product (MVP) for the Commons Chat. This consists of a minimizable ChatPanel on the PlayPage for each commons. This panel displays the 10 most recent messages in the commons, with usernames, user ids, and timestamps. This window ensures that the chats are sorted, and autolocks the scrollbar to the most recent message (bottom). There is also a form to send a new message, with checks to prevent empty messages. The backend has all the necessary CRUD operation endpoints, including POST and a paginated GET. DELETE is implemented with a
hidden
flag, and there are admin-only endpoints for retrieving hidden messages. UPDATE is not necessary, as the chats should be immutable, save for the hidden flag.Refer to #76, #77, and #79 for steps along the way
Screenshots (Optional)
Validation (Optional)
Tests
mvn test
) passmvn test jacoco:report
) 100%mvn test pitest:mutationCoverage
) 100%npm test
) passnpm run coverage
) 100%npx stryker run
) 100%npx eslint --fix src
)Linked Issues
Closes #47 Closes #46 Closes #71 Closes #73 Closes #74 Closes #75