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

Notification System #140

Open
Austin2Shih opened this issue Oct 29, 2024 · 0 comments
Open

Notification System #140

Austin2Shih opened this issue Oct 29, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Austin2Shih
Copy link
Contributor

Austin2Shih commented Oct 29, 2024

Overview

Write up Implementation Document to design a system for displaying short lived notifications in the top right of the current viewing window. Use the ContentWindowContext context and useContentWindowContext hook to implement this behavior. There is a branch already made that has a partially made solution for this, but it comes with limitations. Use this as inspiration if you want for solutions.

The idea is the top right window will contain all the notifications in a little stack of messages. If multiple notifications appear at the same time, just add to the top of the message stack. Message senders should be able to access the sendMessage/sendNotification function from the context value. The message sender can configure the message and the time it lives for.

Image

Some Challenges to consider

When you add a message to a stack, you'll need to set a timeout which will remove that specific message out of the stack. They don't necessarily have to be removed in order. If the first message you send is going to live for 5 min but the second message you send only lives for 5 seconds, you'll have to remove from the middle of the stack.

You'll need a way to identify by some unique feature. Timestamp perhaps. If it's the timestamp, you cannot assume that two messages won't be sent at the same time. This is maybe 1 in a million but it can still happen.

@Austin2Shih Austin2Shih added the enhancement New feature or request label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants