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

Create a live icon for showing notification counts #4503

Merged
merged 14 commits into from
Jan 26, 2024

Conversation

nick-funk
Copy link
Contributor

What does this PR do?

Adds a live icon that shows notification counts.

These changes will impact:

  • commenters
  • moderators
  • admins
  • developers

What changes to the GraphQL/Database Schema does this PR introduce?

None, piggybacks on existing notificationCount(...) query.

Does this PR introduce any new environment variables or feature flags?

Adds the notificationsPollRate env var.

If any indexes were added, were they added to INDEXES.md?

N/A

How do I test this PR?

  • post a comment
  • have another account reply to it
  • see the little bell icon increment a count

Were any tests migrated to React Testing Library?

None

How do we deploy this PR?

Merge into epic branch and release that.

Copy link

netlify bot commented Jan 23, 2024

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
🔨 Latest commit 957623a
🔍 Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/65b03e94820a2b0008b3b1ca

@nick-funk nick-funk changed the base branch from develop to epic/notifications January 23, 2024 22:33
@nick-funk nick-funk requested a review from kabeaty January 24, 2024 17:46
Copy link
Contributor

@kabeaty kabeaty left a comment

Choose a reason for hiding this comment

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

Looks good overall! Left a few small comments. Also, I did notice that the live bell is only working for admins/moderators and it's not working for regular commenters. This seems to be due to the @auth placed on the notificationCount.

config/lib/config.ts Outdated Show resolved Hide resolved
@nick-funk nick-funk requested a review from kabeaty January 25, 2024 17:51
@nick-funk
Copy link
Contributor Author

Looks good overall! Left a few small comments. Also, I did notice that the live bell is only working for admins/moderators and it's not working for regular commenters. This seems to be due to the @auth placed on the notificationCount.

I looked into it and have fixed this issue. The check is now handled gracefully in the resolver and no longer needs an @auth(...) directive since the conditions are simple. Should work properly now for all users!

Copy link
Contributor

@kabeaty kabeaty left a comment

Choose a reason for hiding this comment

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

looks good! thanks for the update

@kabeaty kabeaty merged commit 8cc6b18 into epic/notifications Jan 26, 2024
2 checks passed
@kabeaty kabeaty deleted the feat/notifications-live-bell branch January 26, 2024 15:24
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.

2 participants