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: Update Screenshot Functionality + Screenshot Automation #272

Merged
merged 21 commits into from
Nov 28, 2024

Conversation

MykhailoNester
Copy link
Collaborator

@MykhailoNester MykhailoNester commented Nov 15, 2024

This PR enhances the screenshot functionality by introducing the ability to provide a screenshotName when generating screenshots from the app. The SDK will now use the provided screenshotName to search for an existing screenshot on the platform.

  • If a screenshot with the same name is found, it will be updated.
  • If no matching screenshot is found, a new screenshot will be created.

API Changes:

  1. Added screenshotName parameter

Developers can now specify a name for the screenshot, making it easier to track and update screenshots on the platform.

Updated Methods:

    fun sendScreenshot(
        bitmap: Bitmap,
        screenshotName: String? = null,
        screenshotCallback: ScreenshotCallback? = null,
    )

and

    fun sendScreenshot(
        activity: Activity,
        screenshotName: String? = null,
        screenshotCallback: ScreenshotCallback? = null,
    )

Additional changes:

  1. Controls Widget. The screenshotName parameter can be specified through the controls widget when the screenshot functionality is enabled.
  2. New launch icon;
  3. Unit test updates;
  4. Includes changes from the feat: Screenshots automation #273 PR

- update target to 35 and compile to 34;
- add  automation test that will send screenshot;
- new API for update screenshot;
- new models for screenshot response;
- revert to target 33 - breaks broadcast functionality;
- update documentation;
- add ability to set name from controls;
- update launch icons;
- remove automator dependency;
@MykhailoNester MykhailoNester added the enhancement New feature or request label Nov 15, 2024
@MykhailoNester MykhailoNester self-assigned this Nov 15, 2024
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 35.81081% with 95 lines in your changes missing coverage. Please review.

Project coverage is 59.32%. Comparing base (bd88abc) to head (86e062a).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...m/crowdin/platform/screenshot/ScreenshotManager.kt 38.68% 53 Missing and 12 partials ⚠️
...wdin/src/main/java/com/crowdin/platform/Crowdin.kt 11.12% 14 Missing and 2 partials ⚠️
...din/platform/data/model/ListScreenshotsResponse.kt 50.00% 6 Missing ⚠️
...form/data/remote/interceptor/SessionInterceptor.kt 33.34% 0 Missing and 4 partials ⚠️
...rc/main/java/com/crowdin/platform/CrowdinConfig.kt 50.00% 2 Missing ⚠️
...a/com/crowdin/platform/data/model/ApiAuthConfig.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #272      +/-   ##
============================================
- Coverage     61.20%   59.32%   -1.88%     
- Complexity      367      376       +9     
============================================
  Files            55       57       +2     
  Lines          1884     2008     +124     
  Branches        305      316      +11     
============================================
+ Hits           1153     1191      +38     
- Misses          523      598      +75     
- Partials        208      219      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrii-bodnar andrii-bodnar changed the title feat: Update Screenshot Functionality feat: Update Screenshot Functionality + Screenshot Automation Nov 28, 2024
@andrii-bodnar andrii-bodnar merged commit 93ad752 into master Nov 28, 2024
6 checks passed
@andrii-bodnar andrii-bodnar deleted the task/screenshots-update branch November 28, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants