-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add optional pageType
parameter to ParselyMetadata
class in Android SDK
#102
Add optional pageType
parameter to ParselyMetadata
class in Android SDK
#102
Conversation
hi @MartinAkram ! Thanks for preparing the PR 👍 Presently, the I've just prepared |
Absolutely will do, @wzieba! Thanks so much |
To improve readability and reduce boilerplate.
They don't provide any new data (not covered lines are still visible on Codecov portal) but they shadow diff change of the whole PR, making it more difficult to read.
Just above we clear `eventQueue` and purge locally stored events. There's no need to check the size of the queues.
This way, we don't have to check for nullability of the tracker. Also using `ParselyAPIConnection` without first initialising `ParselyTracker` doesn't seem to make any use case, so I think it's a save change.
BREAKING CHANGE: `ParselyAPIConnection` is no longer accessible for library consumers. This is a deliberate design change. The `ParselyAPIConnection` on its own doesn't provide value for library consumers: it doesn't do anything domain-specific for Parsely, except purging queue after successful events. I think it's completely save to make it accessible only from the library.
No need for this field to be `public`
Every time SDK purges in-memory events queue, it purges stored queue and vice-versa. The extraction of method asserts this behaviour and increases readability
To unit test HTTP communication logic, framework agnostic.
Previously, the `ParselyAPIConnection` task was not finishing execution before the test finished. Only because the task's `onBackground` was fast, the test was passing. To remove this flakiness, the introduced change uses LooperMode.Mode.PAUSED to wait for AsyncTask execution to finish, before running assertions.
See ab4fe3a for details.
In Java implementation, `pubDate` was `@Nullable` so there's no reason to change it in Kotlin implementation.
Reasons: to reduce responsibilities of `ParselyTracker` and introduce unit tests coverage for "no internet connection" case
Instead of returning `-1` in case of missing interval
BREAKING CHANGE: this method was part of the public contract but I can't find a justified value of it
In case of an empty `url` parameter, the SDK should not crash the application. The logging SDK is likely not as critical to the consumer business flow to the degree, that providing an incorrect argument would kill the whole process.
`toMap` will never produce `null` because it creates a new map each time
4ec921b
to
c2eb7e5
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/3.2.0 #102 +/- ##
================================================
Coverage ? 72.04%
================================================
Files ? 18
Lines ? 372
Branches ? 53
================================================
Hits ? 268
Misses ? 92
Partials ? 12 ☔ View full report in Codecov by Sentry. |
This PR adds a new optional parameter,
pageType
, to theParselyMetadata
class in the Android SDK. This is being done in response to a client question/request (see linked issue below).Companion iOS SDK PR: Parsely/AnalyticsSDK-iOS#90
✔️ TODOs ✔️