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(angular): Only open report dialog if error was sent #7750

Merged
merged 3 commits into from Apr 5, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Apr 5, 2023

As reported in #7732, the report dialog in the Angular SDK opens even if an event was dropped before it's sent.
This PR leverages lifecycle hooks (afterSendEvent) to open the dialog if they're available. It keeps the current behaviour as a fallback if hooks are not available. Also adjusted tests for the change.

Tested locally with my Angular test apps and this I can no longer reproduce the bug in #7732

We should do the same change in the react SDK

closes #7732

@AbhiPrasad
Copy link
Member

I can open a PR to do this in React as well.

@Lms24 Lms24 marked this pull request as ready for review April 5, 2023 10:51
@Lms24 Lms24 requested review from a team, mydea and AbhiPrasad and removed request for a team April 5, 2023 10:51
@@ -57,7 +57,7 @@
"lint": "run-s lint:prettier lint:eslint",
"lint:eslint": "eslint . --format stylish",
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
"yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push"
"yalc:publish": "yalc publish build --push"
Copy link
Member Author

Choose a reason for hiding this comment

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

Just noticed while testing with yalc that we don't need to call the prepack script here

@Lms24 Lms24 merged commit 2531853 into develop Apr 5, 2023
30 checks passed
@Lms24 Lms24 deleted the lms/fix-angular-show-reportdialog branch April 5, 2023 11:47
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.

Dialog shows regardless of the ignoreErrors rules
2 participants