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

chore: support to session replay #123

Merged
merged 34 commits into from
Dec 3, 2024
Merged

chore: support to session replay #123

merged 34 commits into from
Dec 3, 2024

Conversation

marandaneto
Copy link
Member

@marandaneto marandaneto commented Nov 27, 2024

💡 Motivation and Context

Closes #69
Continues #116
Depends on PostHog/posthog-ios#266

💚 How did you test it?

Running sample on Android

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

sessionReplay = it
}

this.sessionReplayConfig.captureLogcat = false
Copy link
Member Author

Choose a reason for hiding this comment

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

flutter has its own logging system, so no need to watch logcat

Comment on lines +275 to +277
val id = call.argument<Int>("id") ?: 1
val x = call.argument<Int>("x") ?: 0
val y = call.argument<Int>("y") ?: 0
Copy link
Member Author

Choose a reason for hiding this comment

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

its ok to have a fallback here but it should never be the case anyway, x and y are always 0, and the id is ok to be 1

Copy link
Member Author

Choose a reason for hiding this comment

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

what is really important is imageBytes

Choose a reason for hiding this comment

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

yes make sense

@marandaneto marandaneto changed the title feat(wip): support to session replay (#116) chore: support to session replay Nov 27, 2024
Makefile Outdated Show resolved Hide resolved
android/build.gradle Outdated Show resolved Hide resolved
@@ -1,2 +1,3 @@
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.suppressUnsupportedCompileSdk=34
Copy link
Member Author

@marandaneto marandaneto Nov 27, 2024

Choose a reason for hiding this comment

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

needed for latest versions and we want to keep back compatibility so not bumping the sample

@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
Copy link
Member Author

Choose a reason for hiding this comment

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

this is new but its the sample so its ok

properties: properties,
);
}) {
_currentScreen = screenName;
Copy link
Member Author

Choose a reason for hiding this comment

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

@marandaneto marandaneto requested a review from a team November 27, 2024 15:34
Copy link

@thisames thisames left a comment

Choose a reason for hiding this comment

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

Looks good to me

@marandaneto marandaneto marked this pull request as ready for review November 28, 2024 10:05
@marandaneto
Copy link
Member Author

@pauldambra @ioannisj ready for review =)

Copy link

@ioannisj ioannisj left a comment

Choose a reason for hiding this comment

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

I'll probably need to test this locally as well - but left a few minor comments here and there. Awesome work!

ios/Classes/PosthogFlutterPlugin.swift Outdated Show resolved Hide resolved
lib/src/posthog_widget_widget.dart Show resolved Hide resolved
lib/src/posthog_widget_widget.dart Show resolved Hide resolved
lib/src/replay/element_parsers/image_element/scaler.dart Outdated Show resolved Hide resolved
lib/src/replay/mask/widget_elements_decipher.dart Outdated Show resolved Hide resolved
lib/src/replay/screenshot/screenshot_capturer.dart Outdated Show resolved Hide resolved
lib/src/replay/screenshot/screenshot_capturer.dart Outdated Show resolved Hide resolved
lib/src/replay/screenshot/screenshot_capturer.dart Outdated Show resolved Hide resolved
ios/Classes/PosthogFlutterPlugin.swift Show resolved Hide resolved
ios/Classes/PosthogFlutterPlugin.swift Outdated Show resolved Hide resolved
Copy link

@ioannisj ioannisj left a comment

Choose a reason for hiding this comment

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

Awesome! :D

@marandaneto marandaneto merged commit 5fdf1c7 into main Dec 3, 2024
3 checks passed
@marandaneto marandaneto deleted the chore/session_replay branch December 3, 2024 13:05
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.

Flutter Session Recordings (Android/iOS)
3 participants