-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor/ad config UI role based #85
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 resolved-ref in pubspec.lock from b6a3fb4 to d7d9afa3
- Remove TabBar and role-based conditional rendering - Update widget documentation - Simplify state management by removing controllers and related methods
...bility - Add TabBar for selecting user roles - Implement role-specific configuration fields for in-article ad slots - Use CheckboxListTile to enable/disable ad slots per role - Update state management with TabController - Refactor UI layout for better readability
- Replace separate frequency and placement interval fields with a single enabled toggle for each role - Restructure ad configuration model to use a map for role-specific settings - Update controller initialization and value updating logic to reflect new model - Modify tab change listener to enforce business rules for premium users - Update ad frequency and placement interval retrieval methods - Remove unnecessary switch statements and simplify configuration updates
- Replace single config object with map for better role-based frequency control - Add checkbox to toggle ad visibility for each user role - Update controllers initialization and updates logic - Simplify transitions retrieval and update methods - Enhance comments and code structure for better readability
- Add Arabic and English translations for new checkbox label related to in-article ads - Introduce placeholder for user role in both Arabic and English versions
...tency - Replace CheckboxListTile with SwitchListTile for better alignment with existing design - Restructure the widget layout to improve usability - Enhance the logic for enabling/disabling in-article ads for different user roles
- Increase TabBarView height for better spacing - Replace CheckboxListTile with SwitchListTile for consistency - Update role visibility toggle label and logic
...ial ad settings - Replace CheckboxListTile with SwitchListTile for better consistency with other screens - Update checkbox labels to follow a more consistent pattern - Adjust code formatting and indentation for improved readability
- Revert SwitchListTile back to CheckboxListTile for in-article ad slot types - Remove premiuim user role special handling - Simplify role slot toggle logic
- Remove _tabController listener for enforcing premium user ad rules - Remove 'isEnabled' check in role-specific fields - Update widget descriptions and switch labels - Remove unnecessary comments
- Remove _tabController.addListener(_onTabChanged) and related logic - Remove automatic setting of transitions to 0 for premium users - Remove isEnabled check from _buildInterstitialRoleSpecificFields - Update switch label to "Visible to [Role]" - Remove.enabled parameter from TextFormField
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 substantial refactoring of the ad configuration user interface, shifting from a generalized approach to a more explicit and granular role-based system. The primary goal is to provide administrators with finer control over ad display settings for different user segments, including guest, standard, and premium users. This change enhances flexibility by allowing specific ad frequencies and placements to be defined for each role, and notably, removes the hardcoded ad-free experience for premium users, making their ad settings fully configurable. 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
|
@gemini-code-assist
gemini-code-assist
bot
left a comment
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 refactors the ad configuration UI to be role-based, moving logic out of a general form into more specific, tabbed widgets for feed, article, and interstitial ads. The changes improve the structure and separation of concerns. My feedback focuses on reducing code duplication within the new onChanged callbacks by extracting the state update logic into helper methods, which will enhance maintainability.
Uh oh!
There was an error while loading. Please reload this page.
Status
READY
Description
This pull request introduces a substantial refactoring of the ad configuration user interface, shifting from a generalized approach to a more explicit and granular role-based system. The primary goal is to provide administrators with finer control over ad display settings for different user segments, including guest, standard, and premium users. This change enhances flexibility by allowing specific ad frequencies and placements to be defined for each role, and notably, removes the hardcoded ad-free experience for premium users, making their ad settings fully configurable.
Type of Change