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

Add Notification Manager #77

Open
pr1sm opened this issue Sep 13, 2018 · 8 comments
Open

Add Notification Manager #77

pr1sm opened this issue Sep 13, 2018 · 8 comments
Labels
area:frontend Related to Nebula's Frontend Electron app focus:redux things involving the redux state machine priority:high Issues that are high priority, but don't need to be solved ASAP type:enhancement New feature or request
Milestone

Comments

@pr1sm
Copy link
Collaborator

pr1sm commented Sep 13, 2018

Is your feature request related to a problem? Please describe.
There are many notifications we need to be able to show to users (errors, successes, etc.). Each of these should be presented in a consistent manner with slight visual differences based on the type of notification.

Describe the solution you'd like
A manager that is able to support creating a notification with a few preset styles (error, success, warning, info). This will allow us to trigger notifications using redux actions and handle them with a middleware. The middleware will use the notification manager to display notifications. The notification manager will be in charge of rendering the given notifications and handling the dismissal of notifications (by timeout or by user interaction).

Additional context
We'll have to figure out the specific UX around notifications, but something basic like a popup message will do for now. Other notification UX designs should be researched and chosen.

The nice part about using a notification manager will be the ability to change the UX without changing the triggering mechanism (redux actions -> redux middleware -> notification function calls).

@pr1sm pr1sm added type:enhancement New feature or request area:frontend Related to Nebula's Frontend Electron app focus:redux things involving the redux state machine labels Sep 13, 2018
@pr1sm
Copy link
Collaborator Author

pr1sm commented Sep 13, 2018

@walmat Do you think this needs to be in the stable alpha build, or will it be a new feature in the beta?

@walmat
Copy link
Owner

walmat commented Sep 13, 2018

I like this idea a lot! If it’s not too complicated, having it in alpha isn’t a bad idea!

Sent with GitHawk

@pr1sm
Copy link
Collaborator Author

pr1sm commented Sep 13, 2018

👍 Do you have any desired UX around this? A popup is one way to display this. It might be nice to also have a button the user could press to see all the recent notifications in a list.

@pr1sm pr1sm added this to the Stable Alpha milestone Sep 13, 2018
@pr1sm
Copy link
Collaborator Author

pr1sm commented Sep 13, 2018

I'll add this to the stable alpha milestone, we can always punt it to beta if we're getting short on time.

@walmat
Copy link
Owner

walmat commented Sep 13, 2018

👍 Do you have any desired UX around this? A popup is one way to display this. It might be nice to also have a button the user could press to see all the recent notifications in a list.

@pr1sm I think it depends on the notification. If it’s a notification after a user saves a profile, a pop up might be nice if it’s styled well.

But what about if the user tries to save a profile and there are errors? Does it make sense to display the errors in a pop up as well? Or is it even necessary I guess.

Sent with GitHawk

@pr1sm
Copy link
Collaborator Author

pr1sm commented Sep 13, 2018

Maybe we can roll this into a larger issue of notifying the user when the app is "working" on something (waiting for an api request, doing something else that takes time).

I can't remember where we talked about this (either in an issue comment thread or on discord), but I do remember having a discussion about a loading action to tell the UI to render some type of loading animation. This would integrate well into our existing thunks; it would look something like this:

const thunkAction = (...params) =>
  dispatch => {
+   dispatch(showLoading); // display the loading animation before promise...
    return _thunkRequest(...params) // start the promise...
      .then(response => {
        dispatch(_thunkAction);
+       dispatch(showSuccess); // display the success popup...
      })
      .catch(error => {
        dispatch(handleError);
+       dispatch(showError); // display the error popup...
      });
  };

Each of those actions would be handled by a middleware that uses the notification manager to render the popup without triggering the reducer chain.

@walmat
Copy link
Owner

walmat commented Sep 13, 2018

Maybe we can roll this into a larger issue of notifying the user when the app is "working" on something (waiting for an api request, doing something else that takes time). ...

@pr1sm okay this makes sense! I think our previous talk was a loading screen between authentication and application launch. Like a simple gif or something, but this would look really good between actions!

Sent with GitHawk

@pr1sm
Copy link
Collaborator Author

pr1sm commented Nov 9, 2018

Removing this from stable alpha since it's not a must have -- will tackle this after a couple of iterations.

@pr1sm pr1sm removed this from the Stable Alpha milestone Nov 9, 2018
@walmat walmat added this to the Beta 2 Release milestone Dec 29, 2018
@pr1sm pr1sm removed this from the Beta 3 Release milestone Jan 17, 2019
@pr1sm pr1sm added the priority:high Issues that are high priority, but don't need to be solved ASAP label Feb 11, 2019
@pr1sm pr1sm mentioned this issue Mar 28, 2019
32 tasks
@walmat walmat added this to the 1.3.0 milestone Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:frontend Related to Nebula's Frontend Electron app focus:redux things involving the redux state machine priority:high Issues that are high priority, but don't need to be solved ASAP type:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants