-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor/sync data with the new app aggregator identity pivot #84
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
Refactor/sync data with the new app aggregator identity pivot #84
Conversation
- Define a new enum for headline click behavior - Include options for default, in-app browser, and system browser - Add json_annotation for enum serialization
- Define a new enum to specify how feed item clicks should be handled - Include options for default behavior, internal navigation, and external navigation - Add JSON serialization annotations for each value
- Defines how densely feed item information should be presented - Includes three options: compact, standard, and comfortable
- Introduce FeedItemImageStyle enum to define how feed item images should be displayed - Include options for hidden images, small thumbnails, and large thumbnails
…references - Replace feedPreferences with feedSettings in userAppSettingsFixturesData - Update property names from headline* to feedItems* - Add feedItemsClickBehavior property with default value - Adjust feedItemsDensity and feedItemsImageStyle property values as needed
…on ad config - Update AdPlatformIdentifiers fields for AdPlatformType.admob and AdPlatformType.demo - Replace articleAdConfiguration with navigationAdConfiguration - Update interstitialAdConfiguration to NavigationAdConfiguration - Add defaultHeadlineClickBehavior to RemoteConfig
…model - Remove ArticleAdConfiguration and InterstitialAdConfiguration imports - Add NavigationAdConfiguration import - Replace FeedAdConfiguration with NavigationAdConfiguration in class properties
- Remove feed-specific and in-article specific ad identifiers - Replace with generic native, banner, and interstitial ad identifiers - Update class documentation and property names accordingly
- Rename 'interstitialAdConfiguration' to 'navigationAdConfiguration' - This change ensures consistency with the class property name
- Create new model for master configuration of navigation ads across the application - Include properties for enabled status, ad type, and visibility settings for different user roles - Implement JSON serialization and deserialization - Add copyWith method for easy instance manipulation
- Encapsulates ad frequency for navigation ads - Provides separate controls for internal and external navigations - Implements Equatable for value comparison - Supports JSON serialization and
- Remove excerpt property from Headline class definition - Remove excerpt from props list - Remove excerpt from copyWith method - Adjust constructor and toMap/fromMap methods
…lated properties - Replace headlineDensity with feedItemDensity - Replace headlineImageStyle with feedItemImageStyle - Add new property feedItemClickBehavior - Remove showSourceInHeadlineFeed and showPublishDateInHeadlineFeed - Update class comments and method names accordingly
- Renamed `feedItemsDensity` to `feedItemDensity` - Renamed `feedItemsImageStyle` to `feedItemImageStyle` - Renamed `feedItemsClickBehavior` to `feedItemClickBehavior`
- Add new required field 'feedItemClickBehavior' of type FeedItemClickBehavior - Update constructor to include new parameter - Add documentation for the new field - Update copyWith method to handle new parameter - Update equality check and hashCode to include new field
- Create new file for app settings fixtures - Add demo data for admin, user1, user2, and users 3-10 - Include various display settings, languages, and feed settings configurations
- Add export for app_settings.dart - Remove export for user_app_settings.dart - Reorder exports for better organization
- Create AppSettings class to encapsulate user-specific application settings - Include nested settings for display preferences, language, and feed display options - Implement JSON serialization and deserialization - Add immutable marker and equatable for comparison
- Create FeedSettings class to store user preferences for feed display - Include properties for feed item density, image style, and click behavior - Implement Equatable for value comparison - Add JSON serialization support with json_annotation
- Add export for app_settings.dart - Remove exports for feed_display_preferences.dart and user_app_settings.dart - Rename feed_settings.dart to replace feed_display_preferences.dart
- Remove 'body' field from PushNotificationPayload model - Update in-app notification generation to exclude excerpt as body text - Adjust documentation to reflect changes in notification payload structure
…erty path - Change remoteConfig.feedDecoratorConfig to remoteConfig.features.feed.decorators - This modification ensures the test accesses the correct property path in the remote config object
…ture - Adjust test to reflect changes in the config structure - Access 'features' and 'ads' before retrieving 'feedAdConfiguration' - Ensure the test still correctly accesses the configuration for guest users
- Change pushNotificationConfig reference to remoteConfigsFixturesData.first.features.pushNotifications - Update both instances where the old reference was used
- Add copyWith method to AppConfig, FeaturesConfig, FeedConfig, GeneralAppConfig, and MaintenanceConfig classes - This allows creating new instances with modified values while keeping other values unchanged
- Move copyWith method inside the GeneralAppConfig class - Adjust indentation to match Dart best practices
- Create unit tests for AppConfig model - Verify instantiation, equality, props, JSON conversion, and copyWith functionality - Ensure comprehensive coverage of AppConfig features and behavior
- Add unit tests for FeaturesConfig model - Verify instantiation, equality, props, JSON serialization/deserialization - Test copyWith functionality with and without updated arguments
- Add unit tests for FeedConfig class - Verify instantiation, equality, props, JSON serialization/deserialization - Test copyWith functionality with and without updated values
- Add unit tests for GeneralAppConfig model - Verify instantiation, equality, props, JSON serialization/deserialization - Test copyWith functionality with and without updated values
- Create unit tests for MaintenanceConfig model - Verify instantiation, equality, props, JSON serialization/deserialization - Test copyWith functionality with and without updated values
- Add unit tests for UpdateConfig model - Verify instantiation, equality, props, JSON serialization/deserialization - Test copyWith functionality with and without updated values
- Refactor test structure to improve readability and maintainability - Add tests for JSON serialization and deserialization - Include tests for value equality and prop correctness - Implement tests for copyWith functionality
- Refactor test structure to improve readability and maintainability - Add tests for JSON serialization and deserialization - Include tests for value equality and prop correctness - Implement tests for copyWith functionality
- Implement copyWith method for UserLimitsConfig class - Allows creation of a new UserLimitsConfig instance with modified properties - Facilitates updating specific fields without creating a new instance from scratch
- Implement copyWith method to create a new UserConfig instance with updated values - This change allows for more flexible and concise updates to user configuration
- Replace `userPreferenceConfig` with `user.limits` in test cases - Update `savedHeadlineFiltersLimit` to `savedHeadlineFilters` - Update `savedSourceFiltersLimit` to `savedSourceFilters`
- Implement copyWith method to create a new UpdateConfig instance with modified fields - This enhancement allows for easier updates to the configuration without manually recreating the entire object
- Refactor test to use fixture data for consistency - Update props test to reflect current model structure - Enhance copyWith test to include additional fields - Simplify import statement for core package
- Decrease expected props length from 13 to 12 - Update props list to reflect the correct number of properties
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 significantly refactors the application's core data models and configuration management. The changes aim to introduce a more organized and scalable structure for application settings, user preferences, and feature configurations, aligning with a new 'app aggregator identity pivot'. This involves renaming, reorganizing, and creating several models and enums to improve clarity and maintainability across the codebase. 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 introduces a large-scale and well-executed refactoring of the data models, most notably the RemoteConfig structure. The changes significantly improve the organization, clarity, and type safety of the configuration by grouping related settings into app, user, and features categories. Many models and enums have been renamed for better clarity, shifting from "headline"-specific terms to a more generic "feed_item" approach. A major improvement is the move to a strongly-typed PushNotificationPayload, which enhances maintainability. The refactoring is comprehensive, with consistent updates across models, fixtures, and tests. I have one suggestion regarding the ad configuration fixtures to ensure development workflows are not unintentionally impacted.
- Added AdPlatformIdentifiers for AdPlatformType.demo with placeholder values - Ensures remote_configs.dart fixture now contains all necessary entries
Status
READY
Description
This pull request significantly refactors the application's core data models and configuration management. The changes aim to introduce a more organized and scalable structure for application settings, user preferences, and feature configurations, aligning with a new 'app aggregator identity pivot'. This involves renaming, reorganizing, and creating several models and enums to improve clarity and maintainability across the codebase.
Type of Change