Skip to content

Commit 1be2f64

Browse files
committed
Merge branch 'main' into antonis/appstart-frames
# Conflicts: # CHANGELOG.md
2 parents f946360 + 7d3c3cb commit 1be2f64

File tree

6 files changed

+67
-13
lines changed

6 files changed

+67
-13
lines changed

CHANGELOG.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,50 @@
1010

1111
### Features
1212

13-
- Adds the `FeedbackButton` component that shows the Feedback Widget ([#4378](https://github.com/getsentry/sentry-react-native/pull/4378))
14-
- Adds the `ScreenshotButton` component that takes a screenshot ([#4714](https://github.com/getsentry/sentry-react-native/issues/4714))
15-
- Add Feedback Widget theming ([#4677](https://github.com/getsentry/sentry-react-native/pull/4677))
13+
- User Feedback Widget Updates
14+
- `FeedbackButton` for easy access to the widget ([#4378](https://github.com/getsentry/sentry-react-native/pull/4378))
15+
- `ScreenshotButton` for capturing the application visuals ([#4714](https://github.com/getsentry/sentry-react-native/issues/4714))
16+
- Theming support to better align with the application styles ([#4677](https://github.com/getsentry/sentry-react-native/pull/4677))
17+
18+
```js
19+
Sentry.init({
20+
integrations: [
21+
Sentry.feedbackIntegration({
22+
enableTakeScreenshot: true, // Enables `ScreenshotButton`
23+
themeDark: {
24+
// Add dark theme styles here
25+
},
26+
themeLight: {
27+
// Add light theme styles here
28+
},
29+
}),
30+
],
31+
});
32+
33+
Sentry.showFeedbackButton();
34+
Sentry.hideFeedbackButton();
35+
```
36+
37+
To learn more visit [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback).
38+
1639
- Re-export `ErrorEvent` and `TransactionEvent` types ([#4859](https://github.com/getsentry/sentry-react-native/pull/4859))
1740

1841
### Fixes
1942

2043
- crashedLastRun now returns the correct value ([#4829](https://github.com/getsentry/sentry-react-native/pull/4829))
2144
- Use engine-specific promise rejection tracking ([#4826](https://github.com/getsentry/sentry-react-native/pull/4826))
2245
- Fixes Feedback Widget accessibility issue on iOS ([#4739](https://github.com/getsentry/sentry-react-native/pull/4739))
46+
- Measuring TTID or TTFD could cause a crash when `parentSpanId` was removed ([#4881](https://github.com/getsentry/sentry-react-native/pull/4881))
2347
- Report slow and frozen frames as app start span data ([#4865](https://github.com/getsentry/sentry-react-native/pull/4865))
2448

2549
### Dependencies
2650

2751
- Bump Bundler Plugins from v3.4.0 to v3.5.0 ([#4850](https://github.com/getsentry/sentry-react-native/pull/4850))
2852
- [changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md#350)
2953
- [diff](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.4.0...3.5.0)
30-
- Bump Cocoa SDK from v8.50.2 to v8.51.1 ([#4839](https://github.com/getsentry/sentry-react-native/pull/4839))
31-
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8511)
32-
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.50.2...8.51.1)
54+
- Bump Cocoa SDK from v8.50.2 to v8.52.0 ([#4839](https://github.com/getsentry/sentry-react-native/pull/4839), [#4887](https://github.com/getsentry/sentry-react-native/pull/4887))
55+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8520)
56+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.50.2...8.52.0)
3357
- Bump CLI from v2.45.0 to v2.46.0 ([#4866](https://github.com/getsentry/sentry-react-native/pull/4866))
3458
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2460)
3559
- [diff](https://github.com/getsentry/sentry-cli/compare/2.45.0...2.46.0)

packages/core/RNSentry.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
3737

3838
s.compiler_flags = other_cflags
3939

40-
s.dependency 'Sentry/HybridSDK', '8.51.1'
40+
s.dependency 'Sentry/HybridSDK', '8.52.0'
4141

4242
if defined? install_modules_dependencies
4343
# Default React Native dependencies for 0.71 and above (new and legacy architecture)

packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryOnDrawReporterTests.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,30 @@ final class RNSentryOnDrawReporterTests: XCTestCase {
119119

120120
XCTAssertNil(RNSentryTimeToDisplay.pop(for: ttidPrefix + spanId))
121121
}
122+
123+
func testFullDisplayEmitNewFrameCallbackHandlesMissingParentSpanId() {
124+
let reporter = RNSentryOnDrawReporterView.createWithMockedListener()
125+
126+
// We call the callback manually in this test to simulate a change between
127+
// start of listening for next frame and the next frame render
128+
let emitNewFrameCallback = reporter!.createEmitNewFrameEvent()
129+
130+
reporter!.fullDisplay = true
131+
reporter!.parentSpanId = nil
132+
133+
emitNewFrameCallback!(1)
134+
}
135+
136+
func testInitialDisplayEmitNewFrameCallbackHandlesMissingParentSpanId() {
137+
let reporter = RNSentryOnDrawReporterView.createWithMockedListener()
138+
139+
// We call the callback manually in this test to simulate a change between
140+
// start of listening for next frame and the next frame render
141+
let emitNewFrameCallback = reporter!.createEmitNewFrameEvent()
142+
143+
reporter!.initialDisplay = true
144+
reporter!.parentSpanId = nil
145+
146+
emitNewFrameCallback!(1)
147+
}
122148
}

packages/core/ios/RNSentryOnDrawReporter.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ - (RNSentryEmitNewFrameEvent)createEmitNewFrameEvent
4242
return ^(NSNumber *newFrameTimestampInSeconds) {
4343
self->isListening = NO;
4444

45+
if (![_parentSpanId isKindOfClass:[NSString class]]) {
46+
return;
47+
}
48+
4549
if (self->_fullDisplay) {
4650
[RNSentryTimeToDisplay
4751
putTimeToDisplayFor:[@"ttfd-" stringByAppendingString:self->_parentSpanId]

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"@sentry-internal/eslint-config-sdk": "8.54.0",
8282
"@sentry-internal/eslint-plugin-sdk": "8.54.0",
8383
"@sentry-internal/typescript": "8.54.0",
84-
"@sentry/wizard": "5.0.0",
84+
"@sentry/wizard": "5.1.0",
8585
"@testing-library/react-native": "^12.7.2",
8686
"@types/jest": "^29.5.13",
8787
"@types/node": "^20.9.3",

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8897,7 +8897,7 @@ __metadata:
88978897
"@sentry/react": 8.54.0
88988898
"@sentry/types": 8.54.0
88998899
"@sentry/utils": 8.54.0
8900-
"@sentry/wizard": 5.0.0
8900+
"@sentry/wizard": 5.1.0
89018901
"@testing-library/react-native": ^12.7.2
89028902
"@types/jest": ^29.5.13
89038903
"@types/node": ^20.9.3
@@ -8990,9 +8990,9 @@ __metadata:
89908990
languageName: node
89918991
linkType: hard
89928992

8993-
"@sentry/wizard@npm:5.0.0":
8994-
version: 5.0.0
8995-
resolution: "@sentry/wizard@npm:5.0.0"
8993+
"@sentry/wizard@npm:5.1.0":
8994+
version: 5.1.0
8995+
resolution: "@sentry/wizard@npm:5.1.0"
89968996
dependencies:
89978997
"@clack/core": ^0.3.4
89988998
"@clack/prompts": 0.7.0
@@ -9011,7 +9011,7 @@ __metadata:
90119011
yargs: ^16.2.0
90129012
bin:
90139013
sentry-wizard: dist/bin.js
9014-
checksum: bfa966fad28329d2c9c5adee3591689ea1fae6769a77ca06f2d622481fa169e05f05a8cadf8e49e6814cedfb1431641416ce77611585e413960a01b73472015b
9014+
checksum: d50b46266b2680872cd21a03c9daafa7b5f9d10c319c27d665585e66042b990c451fddaa8d4eff94ceb6b4803f0e721c9804b81e8672df51e3af7f057206d7d9
90159015
languageName: node
90169016
linkType: hard
90179017

0 commit comments

Comments
 (0)