Skip to content

Conversation

@fulleni
Copy link
Member

@fulleni fulleni commented Dec 13, 2025

Status

READY

Description

This pull request focuses on improving the user management module by refactoring the user filtering system to be more robust and user-friendly. It introduces new enums for authentication and subscription status filtering, enhances the visual representation of user roles in the UI, and standardizes confirmation prompts for sensitive actions. These changes aim to streamline user administration and provide a clearer interface for managing user permissions.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

- Add Arabic and English translations for confirm promotion and demotion titles and messages
- Include placeholders for user email in promotion and demotion messages
- Create new extension on AppUserRole for UI-related functionalities
- Add isPremium getter to check if user role is premium
- Implement premiumIcon getter to return a gold star icon for premium users
- Create a reusable confirmation dialog widget for user actions
- Include customizable title, content, and confirmation button text
- Support for localization through AppLocalizationsX
- Provide callback functionality for confirmed actions
- Add support for advanced filtering by authentication and subscription status
- Implement logical OR conditions for search queries
- Refactor user filter map building process for better readability and maintainability
- Introduce new enums for authentication and subscription filtering
…iltering

- Replace selectedAppRoles and selectedDashboardRoles with individual filters
- Add AuthenticationFilter, SubscriptionFilter, and DashboardUserRole? for more granular filtering
- Update copyWith method to accommodate new filter structure
- Modify props to include new filter properties
…ve unused events

- Remove UserFilterAppRolesChanged and UserFilterDashboardRolesChanged events
- Update UserFilterApplied event to use authenticationFilter, subscriptionFilter, and dashboardRole instead of selectedAppRoles and selectedDashboardRoles
- Update corresponding props in UserFilterApplied event
- Replace app and dashboard role filters with authentication and subscription filters
- Update filter applied logic based on new filter types
- Remove unused event handlers for app and dashboard roles
- Add new enums for authentication and subscription filters
- Introduce AuthenticationFilter enum to define user authentication status filters
- Implement AuthenticationFilterL10n extension for localized string retrieval
- Add necessary imports for Flutter and localization support
- Create SubscriptionFilter enum to define filter options for user's subscription status
- Add SubscriptionFilterL10n extension to provide localized strings for subscription filter options
- Implement localization support using AppLocalizationsX
- Create a new extension on DashboardUserRole to provide UI-related helpers
- Add a convenience getter 'isPrivileged' to check if the user has an admin or publisher role
…e actions

- Add ConfirmationDialog widget for promote and demote actions
- Implement showDialog for confirmation before changing user role
- Update localization keys for new dialog messages
- Replace selectedAppRoles and selectedDashboardRoles with individual filter fields
- Add AuthenticationFilter, SubscriptionFilter, and dashboardRole
- Update copyWith method and props list to reflect changes
- Rename and update filter-related events
- Introduce new events for authentication, subscription, and dashboard role filters
- Update existing events to accommodate new filter types
*/

- Remove UserFilterDialogAppRolesChanged event
- Remove UserFilterDialogDashboardRolesChanged event
- Add UserFilterDialogAuthenticationChanged event
- Add UserFilterDialogSubscriptionChanged event
- Add UserFilterDialogDashboardRoleChanged event
- Replace appRoles and dashboardRoles with authenticationFilter, subscriptionFilter, and dashboardRole
- Update event handlers to reflect new filter structure
- Implement toggle functionality for dashboardRole
- Update state initialization to use new filter types
- Replace multi-select filters with single selection filters
- Add authentication, subscription, and dashboard role filters
- Implement _FilterSection widget for consistent filter UI
- Update UserFilterApplied event with new filter parameters
- Remove unused imports and organize dependencies
- Add Arabic and English translations for premium user and privileged user tooltips
- Include descriptions for new localization strings in both languages
- Remove _IndicatorDot widget
- Replace premium user dot with amber star icon
- Replace privileged user dot with blue shield icon
- Add tooltips for both premium and privileged user icons
- Split "privilegedUserTooltip" into "adminUserTooltip" and "publisherUserTooltip" for more granular role definitions
- Shorten "premiumUserTooltip" text in English for better icon label visibility
- Update Arabic translations for new tooltip texts
- Adjust tooltip descriptions in both languages for clarity and consistency
- Implement filtering by dashboard role in user management
- Add conditional logic to apply filter only when a specific role is selected
- Ensure 'Any' selection does not apply any filters
…rolling

- Replace Stack with SingleChildScrollView to allow horizontal scrolling for long email addresses
- Remove positional dots and replace with horizontal layout
- Add icons for premium and privileged users with appropriate tooltips
- Improve layout for admin and publisher indicators
- Remove unnecessary condition for DashboardUserRole.none
- Directly assign dashboardRole to filter when it's not null
- Add null safety to authentication and subscription filters
- Update dashboard role filter values and selection logic
- Modify filter section to handle nullable values consistently
…ogBloc

- Enhance the logic for toggling dashboard role selection
- Increase code readability with the addition of comments and restructuring conditional logic
- Optimize variable assignment for clarity
- Remove toggling logic for dashboard role selection
- Allow direct setting of role, including null value
@fulleni fulleni added this to the Market Contender Edition milestone Dec 13, 2025
@fulleni fulleni self-assigned this Dec 13, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @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 focuses on improving the user management module by refactoring the user filtering system to be more robust and user-friendly. It introduces new enums for authentication and subscription status filtering, enhances the visual representation of user roles in the UI, and standardizes confirmation prompts for sensitive actions. These changes aim to streamline user administration and provide a clearer interface for managing user permissions.

Highlights

  • Refactored User Filtering Logic: The user filtering mechanism has been significantly refactored, moving from direct lists of AppUserRole and DashboardUserRole to more structured AuthenticationFilter and SubscriptionFilter enums. This improves clarity and maintainability of the filtering state.
  • Enhanced User Display in UI: The UsersPage now visually distinguishes users by their roles. Premium, Admin, and Publisher users are indicated with specific icons and tooltips next to their email addresses, providing a quick overview of user privileges.
  • Introduced Generic Confirmation Dialog: A new reusable ConfirmationDialog widget has been added to standardize user action confirmations, such as promoting or demoting users. This promotes consistency across the application's UI.
  • Updated Localization Strings: New localization keys and their English and Arabic translations have been added for the confirmation dialogs (promotion/demotion) and the new user role tooltips, ensuring a consistent multilingual experience.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 refactoring of the user filtering functionality, replacing multi-select inputs with more intuitive choice chips for a better user experience. It also enhances the user list by adding role-based icons and confirmation dialogs for promotion/demotion actions, improving both UI clarity and safety. My review includes suggestions to remove some dead code resulting from the refactoring and to further improve code maintainability by centralizing UI logic for role icons in extension methods.

- Add AppLocalizations import for localization support
- Rename getPremiumIcon method and add AppLocalizations parameter
- Wrap premium icon with Tooltip widget for accessibility
- Update tooltip message using localization
- Remove the unused buildFilterMap method from the UserFilterBloc class
- This function was likely intended to build a filter map for querying the data repository, but it is no longer needed in its current form
- Replace SingleChildScrollView with Row and Flexible for email display
- Add TextOverflow.ellipsis for long email addresses
- Simplify premium and role icon display logic
- Use getPremiumIcon and getRoleIcon methods for better maintainability
@fulleni fulleni merged commit c5656f7 into main Dec 13, 2025
2 of 3 checks passed
@fulleni fulleni deleted the refactor/ui-enhacement branch December 13, 2025 06:47
@github-project-automation github-project-automation bot moved this from Backlog to Done in Flutter News App Project Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants