jamesMAwalker / murder-mystery

https://murder-mystery-bay.vercel.app
1 stars 0 forks source link

UI: Create Notification System #7

Open jamesMAwalker opened 1 year ago

jamesMAwalker commented 1 year ago

Users will need to know when they have been invited to a team, and captains will need to know when they have new requests to join their team.

First, users should see a 'toast' notification - a small popup message that tells them there is a new notification of some kind.

Also create a way to indicate new notifications. I'm imagining something similar to this avatar component.

UPDATE: Just expanding the functionality of this element to include any notifications. Aside from invitations and requests, I we should notify users of:

jmayheww commented 1 year ago

Cool, sounds good. And, I'm guessing the user has/or will have a notifications attribute that will be like an array of invites or requests?

On Sun, Sep 17, 2023, 2:39 AM James M. Walker @.***> wrote:

Assigned #7 https://github.com/jamesMAwalker/murder-mystery/issues/7 to @jmayheww https://github.com/jmayheww.

— Reply to this email directly, view it on GitHub https://github.com/jamesMAwalker/murder-mystery/issues/7#event-10390230297, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJM5XDQABZRXN2Z6OJ7OHLTX2X557ANCNFSM6AAAAAA43CV6O4 . You are receiving this because you were assigned.Message ID: @.***>

jamesMAwalker commented 1 year ago

Kind of. When an invitation is sent a new entry in the 'invitations' table is created with the invited user's ID as one of the columns.

These will show up as pending invitations somewhere in the UI. Invitations should have a accept and decline buttons, deleting the invitation on decline, and executing the add member function on accept.

jmayheww commented 1 year ago

Nice, I was wondering because we'll either handle the logic in the backend first or frontend right. I mean, if in the front end, I'd iterate over the invitations obj from the backend to find/filter invitations with user IDs matching the logged user.. then if such an item or collections exists, mapping it as notifications like you're asking with the toast bubble icon thing fixed at top and viewable anywhere

On Sun, Sep 17, 2023, 2:21 PM James M. Walker @.***> wrote:

Kind of. When an invitation is sent a new entry in the 'invitations' table is created with the invited user's ID as one of the columns.

These will show up as pending invitations somewhere in the UI. Invitations should have a accept and decline buttons, deleting the invitation on decline, and executing the add member function on accept.

— Reply to this email directly, view it on GitHub https://github.com/jamesMAwalker/murder-mystery/issues/7#issuecomment-1722413064, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJM5XDUXT4CLMOHMLZXMS5TX22QH3ANCNFSM6AAAAAA43CV6O4 . You are receiving this because you were mentioned.Message ID: @.***>

jmayheww commented 1 year ago

Nice yeah, so the buttons would either patch the user team attribute or delete a user team right. Will get on it

On Sun, Sep 17, 2023, 2:30 PM Joshua Mayhew @.***> wrote:

Nice, I was wondering because we'll either handle the logic in the backend first or frontend right. I mean, if in the front end, I'd iterate over the invitations obj from the backend to find/filter invitations with user IDs matching the logged user.. then if such an item or collections exists, mapping it as notifications like you're asking with the toast bubble icon thing fixed at top and viewable anywhere

On Sun, Sep 17, 2023, 2:21 PM James M. Walker @.***> wrote:

Kind of. When an invitation is sent a new entry in the 'invitations' table is created with the invited user's ID as one of the columns.

These will show up as pending invitations somewhere in the UI. Invitations should have a accept and decline buttons, deleting the invitation on decline, and executing the add member function on accept.

— Reply to this email directly, view it on GitHub https://github.com/jamesMAwalker/murder-mystery/issues/7#issuecomment-1722413064, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJM5XDUXT4CLMOHMLZXMS5TX22QH3ANCNFSM6AAAAAA43CV6O4 . You are receiving this because you were mentioned.Message ID: @.***>

jmayheww commented 1 year ago

submitted pull request for first iteration of this notification system ui based on dummy data. will refactor following real invites and requests.