Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

feat!: typing indicator implementation #90

Merged
merged 9 commits into from
Oct 21, 2020
Merged

Conversation

HishamYahya
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Sep 25, 2020

Codecov Report

Merging #90 into main will decrease coverage by 0.17%.
The diff coverage is 5.40%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
- Coverage   12.84%   12.67%   -0.18%     
==========================================
  Files          55       55              
  Lines        1479     1507      +28     
  Branches      364      359       -5     
==========================================
+ Hits          190      191       +1     
- Misses       1287     1315      +28     
+ Partials        2        1       -1     
Impacted Files Coverage Δ
src/components/routes/chat/MessagesPanel.tsx 2.46% <0.00%> (-0.35%) ⬇️
src/components/routes/chat/ChatPanel.tsx 2.70% <7.69%> (+0.55%) ⬆️
src/components/routes/chat/ChannelsPanel.tsx 5.40% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7dd03b...3c5efdf. Read the comment docs.

@HishamYahya HishamYahya marked this pull request as ready for review September 28, 2020 03:25
Copy link
Member

@amishshah amishshah left a comment

Choose a reason for hiding this comment

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

Sorry the review took so long! It works really well.

The only things I changed:

  1. Styling of the "typing..." indicator (it's a lighter shade and there's a smaller gap between it and the user's name)
  2. I changed the method of how you block typing events from being sent too frequently. Instead of using a boolean with timeouts to toggle it, it now uses a number storing the last timestamp a packet was sent. The previous implementation had a leak issue if the component unmounted for example, as a timeout could still be active. Instead of creating a separate effect to clean this up, I think this was the cleaner solution.

@amishshah amishshah changed the title feat!: initial typing indicator implementation feat!: typing indicator implementation Oct 21, 2020
@amishshah amishshah added the enhancement New feature or request label Oct 21, 2020
@amishshah amishshah merged commit dea1f49 into main Oct 21, 2020
@amishshah amishshah deleted the feat/typing-indicator branch October 21, 2020 20:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants