Skip to content

Code Quality: Added sponsor flyout for sideload versions #17240

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

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

yaira2
Copy link
Member

@yaira2 yaira2 commented Jul 2, 2025

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

  • Closes #

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. Opened Files ...
  2. ...

@yaira2 yaira2 requested a review from Copilot July 2, 2025 22:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new sponsor prompt for sideload environments, refactors the existing review prompt logic, and updates resource keys and settings to support both prompts.

  • Added a Sponsor TeachingTip to MainPage.xaml, with new ShowSponsorPrompt binding and commands.
  • Renamed and consolidated resource keys for review and sponsor UI strings.
  • Updated the ViewModel and settings service to track prompt clicks and adjusted launch-count logic.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Files.App/Views/MainPage.xaml Added sponsor TeachingTip and updated the review prompt title
src/Files.App/ViewModels/MainPageViewModel.cs Introduced ShowSponsorPrompt, commands, and renamed review flags
src/Files.App/Strings/en-US/Resources.resw Renamed ReviewFilesTitle to Hello, added sponsor strings
src/Files.App/Services/Settings/ApplicationSettingsService.cs Renamed ClickedToReviewApp, added HasClickedSponsorPrompt
src/Files.App/Data/Contracts/IApplicationSettingsService.cs Updated interface for renamed and new prompt settings
src/Files.App/Helpers/Application/AppLifecycleHelper.cs Changed launch-count assignment to use TryParse
src/Files.App/Constants.cs Updated SupportUsUrl for the sponsor link
Comments suppressed due to low confidence (2)

src/Files.App/Views/MainPage.xaml:371

  • [nitpick] Using the resource key Hello for both review and sponsor titles is ambiguous. Consider restoring a descriptive key like ReviewFilesTitle and adding a new SponsorTitle resource.
			Title="{helpers:ResourceString Name=Hello}"

src/Files.App/Helpers/Application/AppLifecycleHelper.cs:65

  • [nitpick] Parsing the launch count by converting to string adds unnecessary overhead. Consider using launchCount is long l ? l + 1 : 1 for direct pattern matching.
			TotalLaunchCount = long.TryParse(launchCount?.ToString(), out var v) ? v + 1 : 1;

@yaira2 yaira2 force-pushed the ya/SponsorFlyout branch from 0d76242 to 45f83a0 Compare July 2, 2025 22:58
@yaira2 yaira2 merged commit edb945b into main Jul 2, 2025
2 of 3 checks passed
@yaira2 yaira2 deleted the ya/SponsorFlyout branch July 2, 2025 22:59
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.

1 participant