Skip to content

feat: add global notification component #996

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

Merged
merged 6 commits into from
Apr 13, 2022
Merged

Conversation

BrunoQuaresma
Copy link
Collaborator

Closes #992

@BrunoQuaresma BrunoQuaresma requested a review from a team as a code owner April 13, 2022 16:07
@BrunoQuaresma BrunoQuaresma self-assigned this Apr 13, 2022
@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #996 (4a1a133) into main (5ecc823) will increase coverage by 0.16%.
The diff coverage is 56.97%.

@@            Coverage Diff             @@
##             main     #996      +/-   ##
==========================================
+ Coverage   66.82%   66.99%   +0.16%     
==========================================
  Files         241      250       +9     
  Lines       14549    14819     +270     
  Branches      115      131      +16     
==========================================
+ Hits         9723     9928     +205     
- Misses       3854     3911      +57     
- Partials      972      980       +8     
Flag Coverage Δ
unittest-go-macos-latest 54.01% <ø> (+0.21%) ⬆️
unittest-go-postgres- 66.63% <ø> (+0.06%) ⬆️
unittest-go-ubuntu-latest 56.62% <ø> (+0.08%) ⬆️
unittest-go-windows-2022 53.19% <ø> (?)
unittest-js 61.24% <56.97%> (-0.33%) ⬇️
Impacted Files Coverage Δ
site/src/app.tsx 0.00% <0.00%> (ø)
site/src/components/Snackbar/GlobalSnackbar.tsx 27.27% <27.27%> (ø)
...ite/src/components/Snackbar/EnterpriseSnackbar.tsx 50.00% <50.00%> (ø)
site/src/components/Snackbar/index.ts 77.77% <77.77%> (ø)
site/src/components/Icons/ErrorIcon.tsx 100.00% <100.00%> (ø)
site/src/hooks/events.ts 100.00% <100.00%> (ø)
site/src/util/events.ts 100.00% <100.00%> (ø)
coderd/workspaceagents.go 59.82% <0.00%> (-3.58%) ⬇️
peer/conn.go 80.20% <0.00%> (-2.80%) ⬇️
peerbroker/dial.go 83.60% <0.00%> (ø)
... and 16 more

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 5ecc823...4a1a133. Read the comment docs.

@kylecarbs
Copy link
Member

I'm nervous about adding this, as I've seen our global notifications lead to errors that aren't attached to any user action or component. An example is the connection failures we display in v1.

Does anyone else feel similarly?

@BrunoQuaresma
Copy link
Collaborator Author

BrunoQuaresma commented Apr 13, 2022

@kylecarbs IMO this component itself is not the issue but how we were using it in V1. We will be cautious about the usage of this component for sure. It is also important to share more context:

  • We decided to move with this because of the deadline
  • Ideally, we want to have the feedback messages close to where the action is triggered but it would take some time to refactor the existing code from v1.

@greyscaled
Copy link
Contributor

Something we could right now is only port displaySuccess. We had talked in slack about not wanting to port displayError as it was in v1, so very much agreed @kylecarbs

Copy link
Contributor

@greyscaled greyscaled left a comment

Choose a reason for hiding this comment

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

A lot of this code can be cleaned up later --> I'll create a ticket to refactor it mentioning XService port.

Thanks for porting this @BrunoQuaresma

@greyscaled greyscaled mentioned this pull request Apr 13, 2022
2 tasks
@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) April 13, 2022 16:56
@BrunoQuaresma BrunoQuaresma disabled auto-merge April 13, 2022 18:18
@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) April 13, 2022 18:19
@kylecarbs kylecarbs disabled auto-merge April 13, 2022 18:33
@kylecarbs kylecarbs merged commit 300c6d0 into main Apr 13, 2022
@kylecarbs kylecarbs deleted the bq/992/notifications branch April 13, 2022 18:34
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port GlobalNotifications component
4 participants