[NEW] Add recording, uploading activity indicators#3243
[NEW] Add recording, uploading activity indicators#3243sumukhah wants to merge 74 commits intoRocketChat:developfrom
Conversation
5c71f29 to
2faf9b2
Compare
|
This pull request introduces 1 alert when merging 2faf9b2 into a6ded95 - view on LGTM.com new alerts:
|
code clean up mainly on userActivity reducer, Since adding or removing activity indicators share same logic.
| if (this.actionTimeouts?.[roomId]) { | ||
| clearTimeout(this.actionTimeouts[roomId]); | ||
| delete this.actionTimeouts[roomId]; | ||
| } |
There was a problem hiding this comment.
is this the correct way?
app/sagas/room.js
Outdated
| if (id in activityRenews && status === true) { | ||
| yield delay(2000); | ||
| } |
There was a problem hiding this comment.
Is it a correct way of limiting server requests?
There was a problem hiding this comment.
@diegolmello I think only you or your team can answer here, I don't have that knowledge
app/lib/rocketchat.js
Outdated
| const { user } = login; | ||
| const name = UI_Use_Real_Name ? user.name : user.username; | ||
| return this.methodCall('stream-notify-room', `${ room }/typing`, name, typing); | ||
| const stream = Use_New_Activity_Indicators ? 'user-activity' : 'typing'; |
There was a problem hiding this comment.
Should emit both if you accept my comment on the other PR
There was a problem hiding this comment.
Maybe we can make the backend control this and emit the old event as well if the setting is enabled. Something to check
There was a problem hiding this comment.
Here you need to check the server version and only emit the new event when the connected server is the version containing this improvement. We still don't know when it will be released but you can keep a specific number and make a note in the PR's description to update it when we have the right info.
| return <ActivityIndicator action='uploading' users={users} />; | ||
| } | ||
|
|
||
| return null; |
There was a problem hiding this comment.
| return null; | |
| return; |
There was a problem hiding this comment.
But it is a component. 'return;' is not returning the "null", getting an error with eslint.
app/sagas/room.js
Outdated
| if (id in activityRenews && status === true) { | ||
| yield delay(2000); | ||
| } |
There was a problem hiding this comment.
@diegolmello I think only you or your team can answer here, I don't have that knowledge
Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
|
I've changed the event format, need to update this PR |
|
okay I'll update it very soon |
ec37259 to
39bdbb8
Compare
|
This pull request introduces 5 alerts when merging b7792c9 into 5bb5d54 - view on LGTM.com new alerts:
|
b7792c9 to
448cf94
Compare
| }; | ||
| } | ||
|
|
||
| export function clearUserActivity(username, rid, tmid) { |
app/reducers/usersActivity.js
Outdated
| case USERS_ACTIVITY.ADD: | ||
| if (state[roomId]) { | ||
| const obj = state[roomId]; | ||
| delete obj[username]; |
There was a problem hiding this comment.
Reducers should not mutate the state https://redux.js.org/usage/structuring-reducers/prerequisite-concepts
This line of code was making events forEach to be unpredictable https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/3243/files#diff-67b9b270a5ff6f8faa4f97992f40a09631edb29f76b5201cb83d491566bc006aR131
…se (allow multiple uploads)
|
This pull request introduces 4 alerts when merging 603dd06 into b75e192 - view on LGTM.com new alerts:
|
|
This pull request introduces 5 alerts when merging 6913f1a into b75e192 - view on LGTM.com new alerts:
|
|
This pull request introduces 5 alerts when merging e490d94 into b75e192 - view on LGTM.com new alerts:
|
Setup #222392 on server.
Recording, Uploading activities
Screen.Recording.2021-11-22.at.23.00.01.mov
Thread activities
Screen.Recording.2021-11-22.at.23.01.23.mov
Proposed changes
Issue(s)
How to test or reproduce
First of all, you need to check which version type of the server you are on. If you are in the servers with a version equal to or greater than 4.0.0 the indicators will appear as demonstrated in the video, and will happen for rooms and threads. Adding to this, the test plan is:
you are uploading, you are typingAlthough, if you are on a server with a version less than 4.0.0 the indicators should occur just into rooms and only for typing
Screenshots
Types of changes
Checklist
Further comments
web app integration
#222327