Screenshot updater#31
Draft
duartebarbosadev wants to merge 4 commits into
Draft
Conversation
- Added `isAccessibilityServiceEnabled` extension function to check the status of accessibility services. - Created `ic_github.xml` as a new drawable. - Introduced `AccessibilityExplainerDialog` to guide users on enabling accessibility service. - Added logic to `HomeFragment` to utilize the `isAccessibilityServiceEnabled` method. - Added safeguard to prevent actions when accessibility service is not enabled. - Created `fade_in_slow.xml`, `rounded_dialog_background.xml`, `step_circle_background.xml`, `pulse_animation.xml`, `circle_background.xml`, and `dialog_gradient_background.xml` for new animation and style purposes. - Added new string resources for `AccessibilityExplainerDialog` - Created `dialog_accessibility_explainer.xml` to handle `AccessibilityExplainerDialog` UI. - Replaced the previous `detailsDeleteButton` by `detailsHelpButton` on `fragment_home.xml` and refactored its logic. - Added a new svg logo `ic_logo.xml`
This commit introduces a new GitHub Actions workflow that automatically updates app screenshots whenever there are significant UI changes. - A new workflow file `update-screenshots.yml` was created, that triggers on `push` and `pull_request` to the main branch, watching for changes in layouts, drawables, styles, themes, colors, and specific Kotlin feature files. - It uses a macOS environment with hardware acceleration to run Android emulator. - A new test file `CaptureAppScreenshotsTest.kt` was introduced, which uses `UiDevice` to capture screenshots of the home screen and the accessibility explainer dialog. - The build process was modified to support screenshot testing: - Added new dependencies for screenshot testing, including `uiautomator` and `roborazzi`. - Added a new `executeScreenshotTests` task. - Configured test options for animations to be disabled and to use `ANDROIDX_TEST_ORCHESTRATOR`. - The README was updated to include a note about the automatic screenshot updates and fixed english grammar.
Contributor
There was a problem hiding this comment.
PR Overview
This pull request introduces a new CI pipeline for automatically updating app screenshots along with supporting changes for screenshot testing and improved accessibility.
- Added a GitHub Actions workflow (.github/workflows/update-screenshots.yml) for automating screenshot updates.
- Updated documentation (README.md) to explain the new CI pipeline for screenshots.
Reviewed Changes
| File | Description |
|---|---|
| .github/workflows/update-screenshots.yml | Introduces a new GitHub Actions workflow for updating app screenshots. |
| README.md | Updates documentation to include a note about the automated CI pipeline. |
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
.github/workflows/update-screenshots.yml:78
- The script assumes that 'art/screenshots/home_screen.png' exists. Consider adding a conditional check to verify the file exists before attempting to copy it, to prevent the workflow from failing unexpectedly.
cp art/screenshots/home_screen.png art/scrollessapp.png
…m build.gradle.kts
Contributor
There was a problem hiding this comment.
Copilot reviewed 6 out of 18 changed files in this pull request and generated 1 comment.
Files not reviewed (12)
- app/build.gradle.kts: Language not supported
- app/src/main/res/anim/fade_in_slow.xml: Language not supported
- app/src/main/res/anim/pulse_animation.xml: Language not supported
- app/src/main/res/drawable/circle_background.xml: Language not supported
- app/src/main/res/drawable/dialog_gradient_background.xml: Language not supported
- app/src/main/res/drawable/ic_github.xml: Language not supported
- app/src/main/res/drawable/ic_logo.xml: Language not supported
- app/src/main/res/drawable/rounded_dialog_background.xml: Language not supported
- app/src/main/res/drawable/step_circle_background.xml: Language not supported
- app/src/main/res/layout/dialog_accessibility_explainer.xml: Language not supported
- app/src/main/res/layout/fragment_home.xml: Language not supported
- app/src/main/res/values/strings.xml: Language not supported
| } | ||
|
|
||
| binding.detailsHelpButton.setOnClickListener { | ||
| if (!requireContext().isAccessibilityServiceEnabled(HomeFragment::class.java)) { |
There was a problem hiding this comment.
The accessibility service check uses HomeFragment::class.java instead of the intended accessibility service class (ScrollessBlockAccessibilityService). Please update the parameter to use the correct service class.
Suggested change
| if (!requireContext().isAccessibilityServiceEnabled(HomeFragment::class.java)) { | |
| if (!requireContext().isAccessibilityServiceEnabled(ScrollessBlockAccessibilityService::class.java)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new CI pipeline for automatically updating app screenshots, along with several related changes to support screenshot testing and improve the user experience. The most important changes include adding a GitHub Actions workflow for updating screenshots, updating the
README.mdto reflect the new CI pipeline, modifying thebuild.gradle.ktsto include necessary configurations and dependencies, adding a test class for capturing screenshots, and implementing an accessibility explainer dialog.CI Pipeline for Screenshot Updates:
.github/workflows/update-screenshots.yml: Added a new GitHub Actions workflow to automate the process of updating app screenshots whenever significant UI changes are made.Documentation Updates:
README.md: Updated to include a note about the automatic screenshot updates by the CI pipeline.Build Configuration:
app/build.gradle.kts: Added configurations for screenshot testing, including test options and dependencies for screenshot capturing tools. [1] [2] [3]Screenshot Testing:
app/src/androidTest/kotlin/com/scrolless/app/screenshots/CaptureAppScreenshotsTest.kt: Added a new test class for capturing screenshots of various screens in the app, which will be used by the CI pipeline.User Experience Improvements:
app/src/main/kotlin/com/scrolless/app/features/dialogs/AccessibilityExplainerDialog.kt: Implemented a new dialog to explain to users why accessibility permissions are needed and guide them through enabling these permissions.app/src/main/kotlin/com/scrolless/app/features/home/HomeFragment.kt: Integrated the accessibility explainer dialog into the home fragment, ensuring users are informed about the need for accessibility permissions. [1] [2] [3] [4] [5]