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

feature/31 create graphical error notifications #118

Merged
merged 7 commits into from Jul 21, 2020

Conversation

itsViggo
Copy link
Contributor

No description provided.

@itsViggo itsViggo requested review from maxwowo, lukefisklennon and esyw and removed request for maxwowo June 30, 2020 10:10
@lukefisklennon
Copy link
Contributor

Looks good! There's just a couple of minor things, like do you reckon the contrast with the background is high enough here?
image
Also I noticed a weird glitch where when you close the notification, the text disappears just before the notification disappears (only for like one frame). 6x slowed down gif of it happening:
notangles3
These are only very minor things though, we probably don't need to fix them now.

Copy link
Contributor

@maxwowo maxwowo left a comment

Choose a reason for hiding this comment

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

Good attempt, we could improve the error reporting technique though

client/src/api/getCourseInfo.ts Outdated Show resolved Hide resolved
client/src/api/getCoursesList.ts Outdated Show resolved Hide resolved
client/src/api/config.ts Outdated Show resolved Hide resolved
@maxwowo
Copy link
Contributor

maxwowo commented Jun 30, 2020

Looks good! There's just a couple of minor things, like do you reckon the contrast with the background is high enough here?
image
Also I noticed a weird glitch where when you close the notification, the text disappears just before the notification disappears (only for like one frame). 6x slowed down gif of it happening:
notangles3
These are only very minor things though, we probably don't need to fix them now.

Sharp eyes! I think the reason the text disappears first before the snackbar goes away is because

  1. There's a single snackbar

  2. The error message that it contains is a state

  3. Whether the snackbar is open or not depends on if the error message it contains is empty or not, empty error message => close snackbar

  4. Closing the snackbar by clicking on the cross calls a handler which sets the error message it contains to be empty, which means the snackbar will close. So the text will always disappear first before the snackbar closes, since it's the precondition for the snackbar to close

I reckon we can fix this issue by using separate variables for snackbar text and error messages

@lukefisklennon
Copy link
Contributor

@maxwowo Ahh I see, that makes sense. I'm probably being a bit pedantic, unlikely that anyone will notice. But if it's an easy fix, might as well.

…ears just before the notification dissapears and changed snackbar design for higher contrast with background
@maxwowo
Copy link
Contributor

maxwowo commented Jul 7, 2020

For some reason when I hover over the close button the snackbar would shrink and grow a little bit, any idea what might be causing this?
gif

Copy link
Contributor

@maxwowo maxwowo 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

const newSelectedCourses = [...selectedCourses, selectedCourseClasses];
populateTimetable(selectedCourseClasses); // TODO: temp until auto-timetabling is done
setSelectedCourses(newSelectedCourses);
} catch (e) {
console.log('here');
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably don't need this here

…e/31-create-graphical-error-notifications
Copy link
Contributor

@maxwowo maxwowo left a comment

Choose a reason for hiding this comment

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

Some minor issues here and there :P

if (data.status === 400) {
throw new NetworkError('Internal server error');
}
console.log();
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need this

client/src/api/getCoursesList.ts Show resolved Hide resolved
Copy link
Contributor

@maxwowo maxwowo left a comment

Choose a reason for hiding this comment

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

I realized that starting with npm start no longer shows the error snackbar but does report the error, does it happen for you too?
image

@itsViggo itsViggo merged commit 742360a into dev Jul 21, 2020
@munjoonteo munjoonteo deleted the feature/31-create-graphical-error-notifications branch February 11, 2022 07:42
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.

None yet

4 participants