-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/app version enforcement #134
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
- Add package_info_plus: ^9.0.0 to pubspec.yaml - Update pub_semver to ^2.2.0 in pubspec.yaml - Add package_info_plus and its dependency package_info_plus_platform_interface to pubspec.lock - Update pub_semver version in pubspec.lock
- Add PackageInfoService import to bootstrap.dart - Initialize PackageInfoServiceImpl in the bootstrap process - Update AppGlobals to include packageInfoService
- Add new event to request application version check against remote config - Include remoteConfig and isBackgroundCheck parameters - Update props to include new parameters
…on enforcement - Add currentAppVersion to AppState for version tracking - Implement latestAppVersion getter for remote config access - Update AppState constructor, copyWith method, and equatable props
- Add PackageInfoService to retrieve current app version - Implement version comparison logic in AppBloc - Handle version enforcement during app startup and background checks - Transition app to 'updateRequired' state when version is outdated - Log appropriate messages for version check outcomes - Update imports and event handlers for new version check feature
…ality - Add PackageInfoService to the app dependencies - Inject PackageInfoService into App and _AppView widgets - Update UpdateRequiredPage to use app status from remote config - Enhance App widget to handle package info related features
- Introduce PackageInfoService abstract class for retrieving app version - Implement PackageInfoServiceImpl using package_info_plus package - Add logging for successful fetch and potential failures - Ensure null safety and platform compatibility
- Add platform-specific update buttons for iOS and Android - Implement conditional rendering for web platform - Improve UI with better spacing and styling - Remove dependency on AppBloc for update URLs - Update imports and remove unused packages
…nd package updates - Add `UpdateRequiredPage` for users with outdated app versions - Integrate `package_info_plus` and `pub_semver` for version management - Update CHANGELOG.md with new version details
- Adjust comment positioning in AppVersionCheckRequested event - Ensure consistent code formatting and readability
Summary of ChangesHello @fulleni, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a critical new feature for app version enforcement. It leverages remote configuration to determine if a user's app version is outdated and requires an update. If an update is necessary, the application will direct the user to a new dedicated page, providing clear instructions and links to the relevant app store. This ensures a consistent user experience and that all users are running on supported application versions. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request successfully implements app version enforcement by introducing a PackageInfoService
for better testability and refactoring the AppBloc
to handle version checks through a dedicated event. The UpdateRequiredPage
is also improved to be more platform-aware and decoupled from the BLoC. I've identified a logical issue in the AppBloc
where a state update could be lost, and a couple of improvements for the UpdateRequiredPage
to enhance the user experience when opening store links. Overall, this is a solid feature addition with good architectural choices.
- Update AppBloc to set currentAppVersion in more states after version check - Modify emit statements to include currentAppVersion when updating state - Ensure consistent state updates for both version mismatch and up-to-date scenarios
…message - Add Arabic translation for "couldNotOpenUpdateUrl" message in app_ar.arb - Add English translation for "couldNotOpenUpdateUrl" message in app_en.arb - Include description and placeholder for the new translation entries
- Add snackbar notification when iOS or Android update URL cannot be opened - Change launch mode to external application for both URLs - Check if context is mounted before showing snackbar
- Add 'currentAppVersionLabel' and 'latestRequiredVersionLabel' in Arabic and English localization files - Include placeholders for version numbers in both languages - These new labels will be used to display current and required app versions to users
- Add currentAppVersion and latestRequiredVersion parameters to UpdateRequiredPage - Display current and latest required version information below the update message - Use l10n for localized version labels - Add conditional rendering to show version info only when both values are provided
- Add currentAppVersion and latestRequiredVersion to the update check process - This allows for more precise version comparison and update handling
- Invert condition to check if current version is up to date or newer - Move update required logic to else block - Improve code readability and maintain the same functionality
Status
READY
Description
This pull request introduces a critical new feature for app version enforcement. It leverages remote configuration to determine if a user's app version is outdated and requires an update. If an update is necessary, the application will direct the user to a new dedicated page, providing clear instructions and links to the relevant app store. This ensures a consistent user experience and that all users are running on supported application versions.
Type of Change