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: check if the notifications started flow is running #27038

Merged
merged 6 commits into from
Sep 11, 2024

Conversation

matteoscurati
Copy link
Contributor

@matteoscurati matteoscurati commented Sep 10, 2024

Description

This PR adds a check to the modal for enabling notifications. If the enabling process is in progress, closing the modal does not trigger the “dismissed” event.

Open in GitHub Codespaces

Related issues

N/A

Manual testing steps

N/A

Screenshots/Recordings

N/A

Before

N/A

After

N/A

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@matteoscurati matteoscurati added the team-notifications Notifications team label Sep 10, 2024
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@matteoscurati matteoscurati marked this pull request as ready for review September 10, 2024 15:32
@matteoscurati matteoscurati requested a review from a team as a code owner September 10, 2024 15:32
@matteoscurati matteoscurati changed the title fix: 🐛 check if the process in on going fix: check if the notifications started flow is running Sep 10, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [dc4cfd5]
Page Load Metrics (1687 ± 75 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15022007168515072
domContentLoaded14952000167015072
load15032046168715675
domInteractive145929126
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 3 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

mathieuartu
mathieuartu previously approved these changes Sep 10, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [614e557]
Page Load Metrics (1933 ± 79 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint23324771869416200
domContentLoaded17242459191116278
load17282463193316479
domInteractive166435157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 3 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [e7341cb]
Page Load Metrics (1758 ± 55 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22321251542551264
domContentLoaded16042098174411656
load16142120175811555
domInteractive136531105
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 15 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 70.15%. Comparing base (7dc6362) to head (5e081d2).

Files with missing lines Patch % Lines
...k-notifications/turn-on-metamask-notifications.tsx 16.67% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #27038      +/-   ##
===========================================
- Coverage    70.15%   70.15%   -0.00%     
===========================================
  Files         1425     1425              
  Lines        49653    49656       +3     
  Branches     13891    13892       +1     
===========================================
  Hits         34833    34833              
- Misses       14820    14823       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -51,14 +51,14 @@ export default function TurnOnMetamaskNotifications() {
);
const isProfileSyncingEnabled = useSelector(selectIsProfileSyncingEnabled);

const [buttonState, setButtonState] = useState<boolean>(
const [loadingState, setLoadingState] = useState<boolean>(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm always a bit more in favor of "boolean" names, like [isLoading, setIsLoading], wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, you are right. I was a bit lazy :)

Copy link

@metamaskbot
Copy link
Collaborator

Builds ready [5e081d2]
Page Load Metrics (1788 ± 75 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint26622191644477229
domContentLoaded15752211177315374
load16152221178815675
domInteractive17178463617
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 15 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@mathieuartu mathieuartu left a comment

Choose a reason for hiding this comment

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

Nice!!

@matteoscurati matteoscurati merged commit b960add into develop Sep 11, 2024
78 checks passed
@matteoscurati matteoscurati deleted the fix/notification-services-fix-modal-event branch September 11, 2024 09:08
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2024
@metamaskbot metamaskbot added release-12.6.0 Issue or pull request that will be included in release 12.6.0 release-12.3.0 Issue or pull request that will be included in release 12.3.0 and removed release-12.6.0 Issue or pull request that will be included in release 12.6.0 labels Sep 11, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-12.3.0 on PR. Adding release label release-12.3.0 on PR and removing other release labels(release-12.6.0), as PR was cherry-picked in branch 12.3.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-notifications Notifications team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants