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

feat: add emulator detection property to static context #154

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

thisames
Copy link
Contributor

@thisames thisames commented Aug 7, 2024

Description

This PR adds emulator detection to the static context and updates the tests to verify this functionality.

  • Implemented isEmulator method to detect if the app is running on an emulator.
  • Integrated emulator detection into the static context cache.
  • Added assertions to verify emulator detection in the static context.
  • Ensured static context includes the new \$is_emulator property.

Motivation and Context

A crucial property for future use as a filter.

#113

How Has This Been Tested?

The tests have been updated to include checks for the new \$is_emulator property in the static context.
I tested it manually on both an emulator and a physical device.

Checklist

  • I have reviewed the submitted code.
  • I have added tests to verify the changes.
  • I have updated the documentation if necessary.
  • No breaking changes or changes to the changelog entry.

- Implemented `isEmulator` method to detect if the app is running on an emulator.
- Integrated emulator detection into the static context cache.
- Added assertions to verify emulator detection in static context.
- Ensured static context includes the new `\$is_emulator` property.
@thisames thisames requested a review from marandaneto as a code owner August 7, 2024 21:37
@marandaneto
Copy link
Member

@thisames please add a changelog entry =)

@marandaneto
Copy link
Member

@thisames would you be willing to add to our taxonomy on the backend/frontend as well? See example https://github.com/PostHog/posthog/blob/46e6624cd9b314c67cd1f076f41eda901cd9b1f6/frontend/src/lib/taxonomy.tsx#L844-L848
Its as simple as the linked lines

@thisames
Copy link
Contributor Author

thisames commented Aug 8, 2024

@thisames please add a changelog entry =)

lets waiting #153 be merged? to avoid future conflicts

@thisames
Copy link
Contributor Author

thisames commented Aug 8, 2024

@thisames would you be willing to add to our taxonomy on the backend/frontend as well? See example https://github.com/PostHog/posthog/blob/46e6624cd9b314c67cd1f076f41eda901cd9b1f6/frontend/src/lib/taxonomy.tsx#L844-L848
Its as simple as the linked lines

sure!

@marandaneto
Copy link
Member

@thisames please add a changelog entry =)

lets waiting #153 be merged? to avoid future conflicts

done

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.

2 participants