Skip to content

Fix lag banner#1741

Merged
benheng merged 6 commits into
masterfrom
fix-lag-banner
Mar 2, 2018
Merged

Fix lag banner#1741
benheng merged 6 commits into
masterfrom
fix-lag-banner

Conversation

@benheng

@benheng benheng commented Feb 27, 2018

Copy link
Copy Markdown
Contributor

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 andyhuang91 left a comment

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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,

Copy link
Copy Markdown

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;

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

reenableTaskLagNotificationTimeoutId

@kwm4385

kwm4385 commented Mar 2, 2018

Copy link
Copy Markdown
Contributor

🚢

@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