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

Conversation

Projects
None yet
4 participants
@benheng
Contributor

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

@andyhuang91

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() {

This comment has been minimized.

@andyhuang91

andyhuang91 Feb 28, 2018

dismissTaskLagNotification

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

This comment has been minimized.

@andyhuang91

andyhuang91 Feb 28, 2018

canShowTaskLagNotification

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

This comment has been minimized.

@andyhuang91

andyhuang91 Feb 28, 2018

DISMISS_TASK_LAG_NOFICATION_DURATION_IN_MS
MAX_TASK_LAG_NOTIFICATION_THRESHOLD_IN_MS

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

This comment has been minimized.

@andyhuang91

andyhuang91 Feb 28, 2018

This should be setTimeout since it only needs to happen once

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

This comment has been minimized.

@andyhuang91

andyhuang91 Feb 28, 2018

reenableTaskLagNotificationTimeoutId

@kwm4385

This comment has been minimized.

Contributor

kwm4385 commented Mar 2, 2018

🚢

@benheng benheng added the hs_stable label Mar 2, 2018

@benheng benheng merged commit 3bb321a into master Mar 2, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@benheng benheng deleted the fix-lag-banner branch Mar 2, 2018

@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