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 a Snackbar for each backend data update #26

Open
emibcn opened this issue Oct 10, 2020 · 5 comments
Open

Add a Snackbar for each backend data update #26

emibcn opened this issue Oct 10, 2020 · 5 comments
Labels
design Similar to UI/UX enhancement New feature or request good first issue Good for newcomers Hacktoberfest Simple issues suitable Hacktoberfest PRs material/ui Related to Material/UI dependency react React knowledge needed ui/ux Issues related to design/UI/UX

Comments

@emibcn
Copy link
Owner

emibcn commented Oct 10, 2020

Each backend (currently, Maps and Charts) automatically tries to update the data -at least- once a day, when the official publication and covid-data Worflow finishes.

All of that is done without user intervention, neither giving any feedback.

Proposal

Add a Material/UI Snackbar to each backend update callback/subscription success execution.

  • Currently, backends only allow reaction to a successful update.
  • Probably -in the near future-, we'll have more callbacks available to better handle data updates statuses:
    • Schedule time for next update.
    • Start data update check.
    • Update found/not found.
    • Updating data.
    • Error updating data.
    • Success updating data (the only one currently exists).

Data updates callbacks:

@emibcn emibcn added enhancement New feature or request good first issue Good for newcomers Hacktoberfest Simple issues suitable Hacktoberfest PRs react React knowledge needed ui/ux Issues related to design/UI/UX design Similar to UI/UX material/ui Related to Material/UI dependency labels Oct 10, 2020
@MeghalBisht
Copy link

Can i take this?

@emibcn
Copy link
Owner Author

emibcn commented Oct 10, 2020

@MeghalBisht Assigned!

@MeghalBisht
Copy link

@emibcn Since I am new here, please guide me, do I need to add snackbar for everytime user chooses a chart/map or only when it updates from the official publication.I am confused if the data updates only once per day, how is snackbar useful? Thanks

@emibcn
Copy link
Owner Author

emibcn commented Oct 11, 2020

Since I am new here, please guide me, do I need to add snackbar for everytime user chooses a chart/map or only when it updates from the official publication

Only on data update and until user closes. Probably would be a good idea to:

  • Add an array of objects to Widget/List.jsx component's state, like: [ {title: "Map data has been updated", icon: faOk, color: "blue"} ].
  • Add an onAck(index) handler for this array to handle the event when user ACK's it (remove it after remove transition ends?).
  • Use them both on a sub-component.

I am confused if the data updates only once per day, how is snackbar useful? Thanks

It's only once a day, but it's nice to give feedback if a background and automatic action (DB update) that, in fact, changes some of the data the user may be visualizing (among them, the list of days, so all widgets need to update the view on DB update). Even more, some future data sources may need to update more than once a day.

Currently, the unique feedback given by the app on data update are some console.log messages (only in development environment).

@emibcn
Copy link
Owner Author

emibcn commented Oct 11, 2020

Maybe it's better to have a Notifications menu and show a snackbar after the first 5 minutes of each new notification?

@MeghalBisht MeghalBisht removed their assignment Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Similar to UI/UX enhancement New feature or request good first issue Good for newcomers Hacktoberfest Simple issues suitable Hacktoberfest PRs material/ui Related to Material/UI dependency react React knowledge needed ui/ux Issues related to design/UI/UX
Projects
None yet
Development

No branches or pull requests

2 participants