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

refactor(component): new notification center implemented with sonner #6416

Merged
merged 1 commit into from Apr 2, 2024

Conversation

CatsJuice
Copy link
Member

@CatsJuice CatsJuice commented Mar 30, 2024

The Notification has been reimplemented using sooner, no longer relies on jotai, and new story has been added.

  • Before

    import { pushNotificationAtom } from '@affine/component/notification-center';
    import { useSetAtom } from 'jotai';
    
    export const Component = () => {
      const pushNotification = useSetAtom(pushNotificationAtom);
      pushNotification({ ... });
    }
  • After

    import { notify } from "@affine/component";
    
    export const Component = () => {
      notify({ ... });
    }

Copy link

graphite-app bot commented Mar 30, 2024

Your org has enabled the Graphite merge queue for merging into canary

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @CatsJuice and the rest of your teammates on Graphite Graphite

Copy link

nx-cloud bot commented Mar 30, 2024

@CatsJuice CatsJuice marked this pull request as ready for review March 30, 2024 15:31
Copy link

codecov bot commented Mar 30, 2024

Codecov Report

Attention: Patch coverage is 37.73585% with 33 lines in your changes are missing coverage. Please review.

Project coverage is 61.96%. Comparing base (80c7750) to head (a4cd51e).
Report is 1 commits behind head on canary.

Files Patch % Lines
...es/frontend/component/src/ui/notification/utils.ts 23.52% 13 Missing ⚠️
...omponent/src/ui/notification/notification-card.tsx 8.33% 11 Missing ⚠️
...ponent/src/ui/notification/notification-center.tsx 18.18% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           canary    #6416      +/-   ##
==========================================
- Coverage   62.09%   61.96%   -0.13%     
==========================================
  Files         515      519       +4     
  Lines       23894    23947      +53     
  Branches     2289     2300      +11     
==========================================
+ Hits        14836    14838       +2     
- Misses       8793     8844      +51     
  Partials      265      265              
Flag Coverage Δ
server-test 73.91% <ø> (-0.12%) ⬇️
unittest 38.36% <37.73%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CatsJuice CatsJuice self-assigned this Mar 31, 2024
@CatsJuice CatsJuice force-pushed the catsjuice/refactor/0330/notification branch from 4d092c2 to 354f20c Compare April 1, 2024 10:35
Copy link

graphite-app bot commented Apr 2, 2024

Merge activity

…6416)

The Notification has been reimplemented using sooner, no longer relies on jotai, and new story has been added.

- Before
  ```ts
  import { pushNotificationAtom } from '@affine/component/notification-center';
  import { useSetAtom } from 'jotai';

  export const Component = () => {
    const pushNotification = useSetAtom(pushNotificationAtom);
    pushNotification({ ... });
  }
  ```

- After
  ```ts
  import { notify } from "@affine/component";

  export const Component = () => {
    notify({ ... });
  }
  ```
@EYHN EYHN force-pushed the catsjuice/refactor/0330/notification branch from 354f20c to a4cd51e Compare April 2, 2024 03:19
@graphite-app graphite-app bot merged commit a4cd51e into canary Apr 2, 2024
36 of 40 checks passed
@graphite-app graphite-app bot deleted the catsjuice/refactor/0330/notification branch April 2, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants