-
Notifications
You must be signed in to change notification settings - Fork 8
[feature] Randomize rating links #253
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
Conversation
There was a problem hiding this 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 refactors the rating prompt system to move channel labels from hardcoded resource files into a flexible configuration system. The changes introduce a configuration provider that loads rating prompt settings from JSON, supporting per-locale labels with culture fallback logic (exact culture → neutral culture → English → domain name). The PR maintains existing behavior where Store channels are shown for MSIX installations, while non-MSIX installations show AlwaysInclude channels plus randomized Additional channels.
Key changes:
- Introduced
RatingPromptConfigurationandRatingPromptConfigurationProviderto parse and validate rating prompt settings from configuration - Updated
RatingPromptServiceto use configuration-driven labels with culture fallback chain - Added comprehensive test coverage for configuration parsing and label resolution
- Removed obsolete rating channel entries from resource files
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
src/ByteSync.Client/Services/Ratings/RatingPromptService.cs |
Refactored to use configuration provider for channels, added label resolution with culture fallback and domain extraction logic |
src/ByteSync.Client/Services/Ratings/RatingPromptConfigurationProvider.cs |
New provider that parses RatingPrompt configuration section with validation and graceful fallbacks |
src/ByteSync.Client/Interfaces/Services/Ratings/RatingPromptConfiguration.cs |
New record types for rating prompt configuration model |
src/ByteSync.Client/Interfaces/Services/Ratings/IRatingPromptConfigurationProvider.cs |
New interface for configuration provider |
src/ByteSync.Client/local.settings.template.json |
Added RatingPrompt configuration schema with example structure |
tests/ByteSync.Client.UnitTests/Services/Ratings/RatingPromptServiceTests.cs |
Updated tests with configuration stub, added test for culture-based label resolution |
tests/ByteSync.Client.UnitTests/Services/Ratings/RatingPromptConfigurationProviderTests.cs |
New test suite for configuration parsing and validation logic |
src/ByteSync.Client/Assets/Resources/Resources.resx |
Removed channel-specific resource entries |
src/ByteSync.Client/Assets/Resources/Resources.fr.resx |
Removed channel-specific French resource entries |
src/ByteSync.Client/Assets/Resources/Resources.Designer.cs |
Removed generated code for deleted resource entries |
Files not reviewed (1)
- src/ByteSync.Client/Assets/Resources/Resources.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/ByteSync.Client.UnitTests/Services/Ratings/RatingPromptServiceTests.cs
Show resolved
Hide resolved
tests/ByteSync.Client.UnitTests/Services/Ratings/RatingPromptServiceTests.cs
Show resolved
Hide resolved
src/ByteSync.Client/Services/Ratings/RatingPromptConfigurationProvider.cs
Show resolved
Hide resolved
src/ByteSync.Client/Services/Ratings/RatingPromptConfigurationProvider.cs
Show resolved
Hide resolved
|



Summary
Changes
Implementation