-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/community management #138
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
Instantiates and registers `DataRepository` instances for `Engagement`, `Report`, and `AppReview`. This makes the data sources for user-generated content available to the rest of the application via dependency injection.
- Add Arabic (app_ar.arb) and English (app_en.arb) translations for community management features - Include translations for navigation items, column headers, actions, statuses, and messages related to engagements, reports, and app reviews - Update descriptions for new and existing localization keys
Adds the newly created `EngagementRepository`, `ReportRepository`, and `AppReviewRepository` to the `MultiRepositoryProvider`. Also provides the new `CommunityManagementBloc` and `CommunityFilterBloc` to the `MultiBlocProvider`, making them accessible throughout the widget tree.
Adds a new route constant `communityManagement` for the new feature section. This ensures a single source of truth for the route path and name, preventing typos.
Updates the `routePermissions` map to grant `admin` users access to the new `communityManagementName` route. This ensures that only administrators can access the new community management section.
Integrates the new "Community" section into the main application navigation. A `NavigationDestination` is added to the `AdaptiveScaffold`, and the filtering logic is updated to display it based on the user's role permissions.
Adds a new `StatefulShellBranch` for the community management section. This branch defines the main `/community-management` route and its sub-routes for the filter dialog, ensuring correct navigation and state preservation for the feature.
Creates the `CommunityManagementBloc` to manage the state for the entire community feature. It handles loading data for engagements, reports, and app reviews based on the active tab and applied filters. It also listens to the filter BLoC and repository updates to trigger data refreshes.
Creates the main `CommunityManagementPage`, which serves as the shell for the feature. It includes a `TabBar` for navigating between Engagements, Reports, and App Reviews, and integrates with the `CommunityManagementBloc` to manage tab state and actions like opening the filter dialog.
- Implement EngagementsPage StatefulWidget - Add loading, failure, and empty states handling - Display engagements in a paginated data table - Include filters and actions functionality - Support responsive design for mobile and desktop views
- Implement CommunityActionButtons widget for engagement, report, and app review items - Add primary actions and secondary actions with overflow menu - Implement copy user ID functionality - Add action handlers for approve/reject comments and mark/resolve reports - Use AppLocalizations for internationalization
- Add ReportsPage widget to display user reports - Implement pagination and filtering functionality - Show loading and error states - Display report details in a table format - Include action buttons for each report
- Implement AppReviewsPage widget for displaying app reviews - Add loading, error, and empty states - Include pagination and filtering functionality - Display review details and action buttons
- Create CommunityFilterBloc to manage community filter state - Add event handlers for filter application and reset - Define state properties for search query
- Create CommunityFilterDialogBloc to manage state of community filter dialog - Add event handlers for various filter options and search query - Implement reset functionality to clear filters - Update state based on user interactions with the dialog
- Implement CommunityFilterDialog StatefulWidget - Add functionality to apply and reset filters - Include tab-specific filter options for engagements, reports, and app reviews - Use BlocBuilder for state management with CommunityFilterDialogBloc - Implement search functionality with customizable hints based on active tab - Create UI components for comment status, report status, and initial feedback selection
- Create abstract CommunityManagementEvent class - Add CommunityManagementTabChanged event - Implement LoadEngagementsRequested, LoadReportsRequested, and LoadAppReviewsRequested events - Define properties and equality for all events
- Define enums for CommunityManagementTab and CommunityManagementStatus - Create CommunityManagementState class with properties for active tab, status, data, cursors, and pagination - Implement copyWith method for state mutation - Override props for Equatable comparison
- Create CommunityFilterEvent abstract class - Implement CommunityFilterApplied event with filter parameters - Implement CommunityFilterReset event for resetting filters
- Create a new CommunityFilterState class for managing community filter states - Include properties for search query, comment status, report status, reportable entity, and initial feedback - Implement copyWith method for state immutability - Override props for Equatable comparison
- Define abstract CommunityFilterDialogEvent class - Implement various event classes for community filter dialog interactions - Add events for initialization, search query change, comment status change, report status change, reportable entity change, initial feedback change, and reset
- Create new state class for community filter dialog - Include properties for active tab, search query, and selected filter options - Implement copyWith method for state immutability - Extend Equatable for optimized performance
- Import necessary packages for community management - Add route constant for community filter dialog
- Add logging for entity updates and list reloads - Implement proper error handling for HttpExceptions - Refactor entity update subscription using StreamController - Add logging before loading engagements, reports, and app reviews - Improve error handling by logging exceptions and updating state accordingly
- Remove import of PendingDeletionsService - Remove PendingDeletionsService from CommunityManagementBloc constructor - Remove _pendingDeletionsService field from CommunityManagementBloc
…d English localizations - Add 'yes' and 'no' translations to app_ar.arb and app_en.arb - Include descriptions for new translations - Maintain consistent formatting with existing translations
- Add new translations for admin-centric comment statuses and report reasons - Include translations for moderation actions like rejecting comments - Add translations for searching and viewing user feedback history - Provide translations for copying IDs and confirmation messages - Contribute Arabic and English translations for these new strings
- Reordered localization entries for better organization - Added missing "reportResolved" entry for both Arabic and English - Restored previously removed entries and placed them at the end - Updated descriptions for some entries
- Add support for approving, rejecting, and resolving community content - Implement undo functionality for pending updates - Display snackbar notifications for update confirmation and provide undo option - Refactor CommunityManagementBloc to handle new update-related events - Update UI to show snackbar notifications and handle undo actions
…ktop-specific code - Remove comment and report status columns from engagements and reports tables on mobile - Adjust column sizes for better layout consistency - Remove unused import statements - Improve code formatting and readability
…gements, and reports - Create AppReviewDetailsDialog to display detailed feedback for app reviews - Implement EngagementDetailsDialog to show engagement information and moderation options - Add ReportDetailsDialog for viewing report details and resolution
- Implement PendingUpdatesService to manage delayed item updates - Add PendingUpdatesServiceImpl as a concrete implementation - Integrate PendingUpdatesService into the app's dependency injection - Define UpdateEvent and UpdateStatus for tracking update events
- Replace direct navigation with details dialogs for engagements and reports - Add visual indicator for pending review items - Remove unused imports and BLoC related code - Extract app review details dialog to a separate widget - Add copy headline ID functionality
- Add Arabic and English translations for "Report Details" and "Comment Details" - Update existing translations for consistency
- Remove unused imports and widgets - Replace custom localization methods with AppLocalizations.of(context) - Streamline dialog content and reduce complexity - Update dialog titles to be more specific (e.g., "commentDetails" instead of "engagements")
…ined - Update icon in CommunityActionButtons widget from more_horiz to comment_outlined - Apply change to both instances of IconButton in the widget
- Add transparent background color to entity type chip in reports page - Remove chip border for a cleaner look - Improve visual consistency with theme color scheme
- Implement _getReactionColor function to assign colors based on reaction type - Update Chip widget to use the new background color function - Add variety of colors using Theme colorScheme and custom opacity values
- Replace uniform chip background color with entity-specific colors - Implement _getEntityTypeColor function to map entity types to colors - Update chip design to improve visual distinction across different report entity types
- Add max width and height constraints to dialog content - Enhance styling for no reason provided text - Adjust font styles for report details
- Remove check for non-null and non-empty feedback details - Ensure the button is always enabled, providing a consistent user experience - Improve accessibility by allowing users to always access the feedback details dialog
- Update translations for community management-related strings - Remove redundant entries for community management label - Add new localized strings for navigation items in content, user, and community management
- Replace contentManagement with navContent - Replace userManagement with navUsers - Replace communityManagement with navCommunity
- Introduce a new section detailing comprehensive moderation capabilities - Highlight unified content review, streamlined moderation workflow, and direct user insight features - Emphasize the advantages of fostering a positive community, protecting brand, and gathering user insights -
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 delivers a significant new feature: Community Management. It provides administrators with a powerful, centralized dashboard to oversee and moderate all user-generated content, including comments, reports, and app reviews. The changes also enhance existing management sections with more flexible search options and introduce a robust pending updates service for moderation actions. 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 significant new feature for community management, including moderation of engagements, reports, and app reviews. The implementation is well-structured, utilizing BLoC for state management, and introduces a reusable PendingUpdatesService for optimistic UI updates with an undo action, which is a great enhancement for user experience. The code is generally clean and follows good practices. I've identified a high-severity bug in the state management logic for the undo functionality and a medium-severity maintainability issue in the state's copyWith method. Addressing these will improve the feature's correctness and long-term maintainability.
- Update state more granularly when receiving remote changes - Ensure lastPendingUpdateId and snackbarMessage are reset in all cases - Improve code readability with more specific state updates
…t nulling bug - Replace Engagement.copyWith with manual instantiation to set comment to null - Add TODO comment for potential future fix in the core model - Update updatedAt timestamp for the engagement
- Correct spelling of 'Fix' in TODO comment - Improve code readability and maintainability
Status
READY
Description
This pull request delivers a significant new feature: Community Management. It provides administrators with a powerful, centralized dashboard to oversee and moderate all user-generated content, including comments, reports, and app reviews. The changes also enhance existing management sections with more flexible search options and introduce a robust pending updates service for moderation actions.
Type of Change