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

Allow disabling alerts #8550

Merged
merged 4 commits into from
May 8, 2020
Merged

Allow disabling alerts #8550

merged 4 commits into from
May 8, 2020

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented May 7, 2020

The unconnected account alert can now be disabled. A "don't show this again" checkbox has been added to the alert, which prevents that alert from being shown in the future.

An alert settings page has been added to the settings as well. This page allows the user to disable or enable any alert.

@Gudahtt Gudahtt force-pushed the dont-show-me-this-alert-again branch 2 times, most recently from 26940cb to 986eb48 Compare May 7, 2020 23:47
@Gudahtt Gudahtt force-pushed the dont-show-me-this-alert-again branch 2 times, most recently from f4883a1 to 66fdb00 Compare May 8, 2020 00:54
@Gudahtt
Copy link
Member Author

Gudahtt commented May 8, 2020

Screenshots:

"Unconnected account" alert with the new checkbox:

alert-with-checkbox

"Unconnected account" alert with the new checkbox, showing the hover state of the info-icon:

alerith-with-checkbox-and-hover

Alert settings tab in settings menu:

alerts-settings-list

Alert settings page:

alerts-page

@metamaskbot
Copy link
Collaborator

Builds ready [66fdb00]
Page Load Metrics (652 ± 39 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint308839126
domContentLoaded3507596508239
load3527616528239
domInteractive3507596508239

@Gudahtt Gudahtt marked this pull request as ready for review May 8, 2020 01:19
@Gudahtt Gudahtt requested a review from a team as a code owner May 8, 2020 01:19
@Gudahtt Gudahtt requested a review from rachelcope May 8, 2020 01:19
@Gudahtt Gudahtt force-pushed the dont-show-me-this-alert-again branch from 66fdb00 to 8a9c8f9 Compare May 8, 2020 02:37
@metamaskbot
Copy link
Collaborator

Builds ready [8a9c8f9]
Page Load Metrics (709 ± 43 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint3210645199
domContentLoaded3908637078943
load3928677098943
domInteractive3908627078943

@metamaskbot
Copy link
Collaborator

Builds ready [5c4df55]
Page Load Metrics (666 ± 18 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint327939105
domContentLoaded6057366643818
load6067376663818
domInteractive6047356643818

whymarrh
whymarrh previously approved these changes May 8, 2020
Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

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

LGTM! (One small non-blocking suggestion.)

app/scripts/controllers/alert.js Show resolved Hide resolved
rachelcope
rachelcope previously approved these changes May 8, 2020
Copy link

@rachelcope rachelcope left a comment

Choose a reason for hiding this comment

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

This looks good. Small copy suggestion on the tooltip > This can be changed in "Settings > Alerts"

@Gudahtt Gudahtt dismissed stale reviews from rachelcope and whymarrh via 740a4f4 May 8, 2020 18:02
The unconnected account alert can now be disabled. A "don't show this
again" checkbox has been added to the alert, which prevents that alert
from being shown in the future.

An alert settings page has been added to the settings as well. This
page allows the user to disable or enable any alert.
The string `unconnectedAccount` is now stored as a constant. This was
done to make it more clear that this string had to match exactly in
each of these places.
@Gudahtt Gudahtt force-pushed the dont-show-me-this-alert-again branch from 740a4f4 to e9bb114 Compare May 8, 2020 18:02
@Gudahtt
Copy link
Member Author

Gudahtt commented May 8, 2020

@rachelcope Thanks, that does look better. It has been updated here: e9bb114

@metamaskbot
Copy link
Collaborator

Builds ready [e9bb114]
Page Load Metrics (668 ± 18 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint319147199
domContentLoaded6147666673617
load6167676683618
domInteractive6147666673617

whymarrh
whymarrh previously approved these changes May 8, 2020
Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

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

LGTM!

@metamaskbot
Copy link
Collaborator

Builds ready [82fec4f]
Page Load Metrics (670 ± 21 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32623873
domContentLoaded6167766694321
load6177776704321
domInteractive6157766684321

@Gudahtt Gudahtt merged commit c4fb514 into develop May 8, 2020
@Gudahtt Gudahtt deleted the dont-show-me-this-alert-again branch May 8, 2020 19:45
Gudahtt added a commit that referenced this pull request May 9, 2020
When disabling an alert, the background `alertEnabledness` state of the
alert was being set to `undefined` instead of `false`. This didn't have
any user-facing effect, since `undefined` is falsey, but it did result
in a PropType error on the Alert settings page. This mistake was made
in #8550.

The `alertEnabledness` state is now correctly set to `false` instead of
`undefined`.
Gudahtt added a commit that referenced this pull request May 9, 2020
When disabling an alert, the background `alertEnabledness` state of the
alert was being set to `undefined` instead of `false`. This didn't have
any user-facing effect, since `undefined` is falsey, but it did result
in a PropType error on the Alert settings page. This mistake was made
in #8550.

The `alertEnabledness` state is now correctly set to `false` instead of
`undefined`.
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