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

Fix lag banner #1741

Merged
merged 6 commits into from
Mar 2, 2018
Merged

Fix lag banner #1741

merged 6 commits into from
Mar 2, 2018

Conversation

benheng
Copy link
Contributor

@benheng benheng commented Feb 27, 2018

When a user dismisses the lag warning/error, it won't reappear for another hour and only if it's still lagging, or until they refresh the app.

screen shot 2018-02-27 at 16 44 26

Copy link

@andyhuang91 andyhuang91 left a comment

Choose a reason for hiding this comment

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

Mostly just comments on how your variable names could be more descriptive. As we discussed in person, you want to think about the context of where your variables are defined when deciding how specific variable names should be. When defining methods or component level properties / state, then the names should be specific enough in the context of the entire component.

clearInterval(this.timerId);
}

pauseNotification() {

Choose a reason for hiding this comment

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

dismissTaskLagNotification

constructor(props) {
super(props);
this.state = {
canShowLagError: true,

Choose a reason for hiding this comment

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

canShowTaskLagNotification

`
});
const PAUSE_INTERVAL_IN_MS = 1000 * 60 * 60;
const LAG_THRESHOLD_IN_MS = 1000 * 60 * 3;

Choose a reason for hiding this comment

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

DISMISS_TASK_LAG_NOFICATION_DURATION_IN_MS
MAX_TASK_LAG_NOTIFICATION_THRESHOLD_IN_MS


pauseNotification() {
this.setState({ canShowLagError: false });
this.timerId = setInterval(() => {

Choose a reason for hiding this comment

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

This should be setTimeout since it only needs to happen once


pauseNotification() {
this.setState({ canShowLagError: false });
this.timerId = setInterval(() => {

Choose a reason for hiding this comment

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

reenableTaskLagNotificationTimeoutId

@kwm4385
Copy link
Contributor

kwm4385 commented Mar 2, 2018

🚢

@benheng benheng merged commit 3bb321a into master Mar 2, 2018
@benheng benheng deleted the fix-lag-banner branch March 2, 2018 20:06
@ssalinas ssalinas added this to the 0.19.2 milestone Mar 26, 2018
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.

4 participants