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

feat: new notification #239

Closed
wants to merge 23 commits into from
Closed

feat: new notification #239

wants to merge 23 commits into from

Conversation

trim21
Copy link
Contributor

@trim21 trim21 commented Dec 16, 2022

#236

没按照设计稿实现,只是简单加了个红点。

https://www.figma.com/file/jW61odhQl5lZzhY4CqvvSF/Web-Page?node-id=2666%3A9575&t=uUz5CLyoLcRof3zU-0

netlify 不支持 websocket,只能用 socket.io 了

image

@trim21 trim21 changed the title feat: new notification [WIP]: feat: new notification Dec 16, 2022
@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Base: 91.74% // Head: 91.74% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (41a3408) compared to base (8f7d5fa).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #239   +/-   ##
=======================================
  Coverage   91.74%   91.74%           
=======================================
  Files          76       76           
  Lines        3862     3864    +2     
  Branches      451      451           
=======================================
+ Hits         3543     3545    +2     
  Misses        317      317           
  Partials        2        2           
Impacted Files Coverage Δ
packages/client/user.ts 93.75% <100.00%> (+0.89%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2022

@trim21
Copy link
Contributor Author

trim21 commented Dec 16, 2022

这个要怎么mock与写测试用例?🤔

@Ayase-252
Copy link
Contributor

mock 下 WebSocket 构造函数?或者获取通知的逻辑包装成一个 hook,直接 mock 这个 hook,不管协议的部分了

@pull-request-size pull-request-size bot added size/L and removed size/M labels Dec 17, 2022
@trim21 trim21 changed the title [WIP]: feat: new notification feat: new notification Dec 17, 2022
@FoundTheWOUT
Copy link
Contributor

现在每个tab都会开两个链接,应该是useEffect被调用了两几次,不知道这里该怎么解决...useEffect 已经有 user 作为deps了。

StrictMode 的问题

@trim21
Copy link
Contributor Author

trim21 commented Dec 18, 2022

现在每个tab都会开两个链接,应该是useEffect被调用了两几次,不知道这里该怎么解决...useEffect 已经有 user 作为deps了。

StrictMode 的问题

是的,我的 cleanup 写错了,所以第一次开的链接没有被真正关掉...

@trim21 trim21 marked this pull request as draft December 21, 2022 09:03
@trim21 trim21 marked this pull request as ready for review December 23, 2022 02:00
@trim21 trim21 marked this pull request as draft December 26, 2022 15:21
@trim21 trim21 mentioned this pull request Dec 26, 2022
@trim21 trim21 closed this Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants