Skip to content

Commit 7bba082

Browse files
wardeturrtheonlyone
authored andcommitted
Adding chat component (#648)
* Create ChatApp.js * Add files via upload * Add files via upload * Update GradingWorkspace.tsx * Update AssessmentWorkspace.tsx * Chatkit token provider * Update readme * Crude way to work around no connection Won't render the text area and bottom until ChatManager is connected. After it is connected, losing connection does not result in crash when Send is hit. * Add a . * Update connection check * MessageList js to tsx * Input js to tsx * Remove chat scss * Option to disable chatkit during development * Chatkit room id from backend * minor fix * todo for chatkit client merge * Add files via upload * Remove the outer class * Add pretty date for chat msg * Move styling to scss file * Move styling to scss file * revert to previous * remove grading result view mde * Remove MDE and replace comment field * remove redundant comments * Update AssessmentWorkspace.tsx * remove redundant comments * fixed input.tsx format * Added jwt-decode dependency * fix travis * Update package.json * Update package.json * _chat.scss format * Changed USE_CHATKIT * Regroup imports + add a horizontal line The line is to demarcate message list and input area since their color is the same now * Move dependencies * Use TextArea from blueprintjs * Update Input.tsx * Update package.json * Update AssessmentWorkspace.tsx * Update AssessmentWorkspace.tsx * Update ChatApp.js * Update AssessmentWorkspace.tsx * Update package.json * Update package-lock.json * Update package-lock.json * Update README.md `npm run win-start` script was removed for some reason. `npm start` suffices anyway. * Update README.md * Update README.md * Minor fix to comment being overwritten when new grades are submitted * Removed print
1 parent 4eb121d commit 7bba082

File tree

16 files changed

+1676
-3593
lines changed

16 files changed

+1676
-3593
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ REACT_APP_LUMINUS_CLIENT_ID=your_luminus_client_id_here
22
REACT_APP_VERSION=$npm_package_version
33
REACT_APP_BACKEND_URL=http://localhost:4001
44
REACT_APP_USE_BACKEND=TRUE
5+
REACT_APP_CHATKIT_INSTANCE_LOCATOR=instance_locator_here_otherwise_empty_string

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,14 @@
1515

1616
## For Windows Users
1717

18-
### Running cadet-frontend
19-
Run `npm run win-start`
20-
2118
### Dealing with hooks
2219
In package.json, change line 28:\
2320
"pre-push": "bash scripts/test.sh",\
2421
to an empty line.
2522

2623
Please note that doing this will disable the test suite, so you will need to run the tests manually instead. Using Git Bash (or any other UNIX-based command line), run the following:\
27-
cd scripts\
28-
bash test.sh
24+
`cd scripts`
25+
`bash test.sh`
2926

3027
## js-slang
3128

@@ -85,3 +82,11 @@ Because we use a local version of `js-slang`, the CI just breaks all the time.
8582
## TypeScript Coding Conventions
8683

8784
We reference [this guide](https://github.com/piotrwitek/react-redux-typescript-guide).
85+
86+
## Chatkit
87+
88+
The chat functionality replacing the previous comment field found in assignments is built on top of Chatkit. Its documentation can be found [here](https://pusher.com/docs/chatkit).
89+
90+
If you are using Chatkit without the backend server running, use the [test token provider](https://pusher.com/docs/chatkit/reference/test-token-provider), and hardcode `userId` and `roomId`.
91+
92+
Internet connection is required for usage.

0 commit comments

Comments
 (0)