Fix lag banner #1741
Merged
Fix lag banner #1741
Conversation
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() { |
andyhuang91
Feb 28, 2018
dismissTaskLagNotification
dismissTaskLagNotification
constructor(props) { | ||
super(props); | ||
this.state = { | ||
canShowLagError: true, |
andyhuang91
Feb 28, 2018
canShowTaskLagNotification
canShowTaskLagNotification
` | ||
}); | ||
const PAUSE_INTERVAL_IN_MS = 1000 * 60 * 60; | ||
const LAG_THRESHOLD_IN_MS = 1000 * 60 * 3; |
andyhuang91
Feb 28, 2018
DISMISS_TASK_LAG_NOFICATION_DURATION_IN_MS
MAX_TASK_LAG_NOTIFICATION_THRESHOLD_IN_MS
DISMISS_TASK_LAG_NOFICATION_DURATION_IN_MS
MAX_TASK_LAG_NOTIFICATION_THRESHOLD_IN_MS
|
||
pauseNotification() { | ||
this.setState({ canShowLagError: false }); | ||
this.timerId = setInterval(() => { |
andyhuang91
Feb 28, 2018
This should be setTimeout since it only needs to happen once
This should be setTimeout since it only needs to happen once
|
||
pauseNotification() { | ||
this.setState({ canShowLagError: false }); | ||
this.timerId = setInterval(() => { |
andyhuang91
Feb 28, 2018
reenableTaskLagNotificationTimeoutId
reenableTaskLagNotificationTimeoutId
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
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.