-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor/sync with core package update #104
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
- Update git ref in pubspec.yaml and pubspec.lock - Change ref from 064c4387b3f7df835565c41c918dc2d80dd2f49a to c0c41c069b885f0c16d1b134269aa068616341
…ames - Rename UserAppSettings to AppSettings in repository and logger - Adjust repository and logger names for userContentPreferences and pushNotificationDevice
- Replace UserAppSettings with AppSettings in data operation registry - Update related data repository references - Adjust type casting in update operations
- Rename UserAppSettings to AppSettings - Simplify getOwnerId function - Update permissions configuration
- Update collection name in AppDependencies - Update related permissions in Permissions class - Update DataOperationRegistry to use new collection name - Update ModelRegistry to reflect new collection name - Update DatabaseSeedingService to use new collection name These changes ensure consistency across the codebase and database, using the more appropriate "app_settings" collection name instead of "user_app_settings".
- Update UserAppSettings to AppSettings in AuthService - Rename feedPreferences to feedSettings and update related properties - Adjust class names and method calls to reflect new naming conventions
- Update ad config setup in initial configuration - Modify app settings structure for user creation - Refactor user deletion process to remove app settings - Adjust feed preferences to feed settings in default app settings
- Modify the retrieval path for user limits from remote configuration - Update variable names to reflect the new structure of limits configuration - Adjust the limits retrieval logic for different user roles
…mapping - Replace payload.body with payload.title in notification body - Reconstruct data payload from explicit fields instead of using payload.data directly - Update data payload structure to include specific notification details
- Map notification title to 'contents' instead of body - Remove direct payload.data mapping and replace with individual fields - Add 'notificationId', 'notificationType', 'contentType', and 'contentId' to data payload
- Corrected the structure of the PushNotificationPayload - Removed unnecessary fields (body, data) - Added new fields (notificationId, notificationType, contentType, contentId) - Simplified the payload object to improve readability and maintainability
- Change remoteConfig.pushNotificationConfig to remoteConfig.features.pushNotifications - This modification ensures compatibility with the latest remote config structure
- Add FirebaseRequestBody and OneSignalRequestBody models - Include necessary JSON serialization and equity comparison - Export new models from push_notification.dart
- Import core package for PushNotificationPayload - Change data type from Map<String, dynamic> to PushNotificationPayload
…uestBody - Replace `Map<String, dynamic>` with `PushNotificationPayload` for better type safety - Import `core` package to include `PushNotificationPayload` definition
…cation - Replace manual JSON map construction with FirebaseRequestBody model - Simplify requestBody creation by using FirebaseMessage and FirebaseNotification models - Remove redundant fields and improve code readability
…equest - Replace manual JSON construction with OneSignalRequestBody model - Simplify request body creation by using a dedicated model class - Improve code readability and maintainability
- Update _fe_analyzer_shared from 91.0.0 to 92.0.0 - Update analyzer from 8.4.1 to 9.0.0 - Add build_runner and json_serializable dev dependencies - Update other dependencies including build, build_config, build_daemon, checked_yaml, code_builder, dart_style, graphs, pubspec_parse, source_gen, source_helper - Update test from 1.26.3 to 1.28.0 and related test dependencies
- Add 'cast_nullable_to_non_nullable: ignore' to analysis_options.yaml - This change allows ignoring issues related to casting nullable types to non-nullable types
…ation models - Add firebase_request_body.g.dart: generated code for FirebaseRequestBody serialization - Add onesignal_request_body.g.dart: generated code for OneSignalRequestBody serialization
- Adds createFactory: false to the @JsonSerializable annotation in multiple model classes to prevent the generation of `fromJson` factory methods. - This change affects FirebaseRequestBody, FirebaseMessage, FirebaseNotification, and OneSignalRequestBody classes.
- Change DataRepository<UserAppSettings> to DataRepository<AppSettings>
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 primarily focuses on a significant refactoring effort to align the project with updates in its core dependency. Key changes include renaming application settings models and their associated logic from 'UserAppSettings' to 'AppSettings' for improved clarity. Furthermore, it introduces structured models for handling Firebase and OneSignal push notification requests, moving away from ad-hoc map constructions. These changes enhance maintainability and prepare the codebase for future feature development related to push notifications and application settings. 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 primarily refactors the codebase to align with updates in the core package, which includes renaming UserAppSettings to AppSettings and adapting to changes in RemoteConfig and PushNotificationPayload models. It also commendably introduces typed request body models for push notifications. While the refactoring is largely consistent, I've identified a few critical issues. The most significant is that push notification bodies are incorrectly being set to the notification title. Additionally, there are problems with the JSON serialization of the new request body models, one of which results in non-compilable generated code.
- Updated FirebaseNotification model to make the body field optional - Fixed a bug in FirebasePushNotificationClient where the notification body was incorrectly set to the payload title
- Remove requirement for contents in OneSignalRequestBody - Update OneSignalPushNotificationClient to use payload.message instead of payload.title for contents
Status
READY
Description
This pull request primarily focuses on a significant refactoring effort to align the project with updates in its core dependency. Key changes include renaming application settings models and their associated logic from 'UserAppSettings' to 'AppSettings' for improved clarity. Furthermore, it introduces structured models for handling Firebase and OneSignal push notification requests, moving away from ad-hoc map constructions. These changes enhance maintainability and prepare the codebase for future feature development related to push notifications and application settings.
Type of Change