-
Notifications
You must be signed in to change notification settings - Fork 0
Content management UI enhancement #46
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
- Remove CreateHeadlineCountrySearchChanged event from create_headline_event.dart - This event was likely unused and could lead to confusion or unexpected behavior
- Remove _onCountrySearchChanged method and its associated event - Remove droppable transformer from CreateHeadlineCountrySearchChanged event - Adjust country load more functionality to not consider search term
- Remove countrySearchTerm from CreateHeadlineState - Update constructors and copyWith method to reflect the removal - Simplify the state class by removing unused properties
…h DropdownButtonFormField - Replace custom SearchableDropdownFormField with standard DropdownButtonFormField for country selection - Simplify the UI by removing searchable functionality and pagination - Add "None" option as the first dropdown item - Display load more option when there are more countries available
- Remove EditHeadlineCountrySearchChanged event from edit_headline_event.dart - This event was likely unused and unnecessary, simplifying the event structure
…untry load more option - Replaced l10n.loadMore with 'Load More' text - Added const keyword for Center and Text widgets
…edit headline state - Remove countrySearchTerm field from EditHeadlineState - Remove countrySearchTerm parameter from EditHeadlineState constructor - Remove countrySearchTerm from copyWith method - Remove countrySearchTerm from props list in EditHeadlineState
- Remove _onCountrySearchChanged method - Remove EditHeadlineCountrySearchChanged event handler - Remove state related to country search term - Remove filter logic in _onLoadMoreCountriesRequested based on search term
…h DropdownButtonFormField - Replace custom SearchableDropdownFormField with DropdownButtonFormField for country selection - Simplify the UI for better maintainability and readability - Improve performance by removing unnecessary search and load more functionality
- Remove CreateSourceCountrySearchChanged and CreateSourceLanguageSearchChanged events - These events were not used in the bloc logic and have been removed to simplify the codebase
- Remove countrySearchTerm and languageSearchTerm properties from CreateSourceState
- Remove CreateSourceCountrySearchChanged and CreateSourceLanguageSearchChanged event handlers - Remove associated transformer parameters from on<CreateSourceSubmitted> event - Update _onLoadMoreCountriesRequested and _onLoadMoreLanguagesRequested to no longer filter based on search terms
…h DropdownButtonFormField - Replace SearchableDropdownFormField for language and headquarters selection with DropdownButtonFormField - Add support for loading more items in the dropdown menu - Improve UI by using a standard dropdown approach
- Remove EditSourceCountrySearchChanged and EditSourceLanguageSearchChanged events - These events were not being used in the bloc logic, likely because the UI already has direct access to the search text controllers
- Remove countrySearchTerm and languageSearchTerm properties from EditSourceState - Update constructors and copyWith method to reflect the removal of these properties - Adjust the class to maintain functionality without search term tracking
- Remove EditSourceCountrySearchChanged and EditSourceLanguageSearchChanged event handlers - Remove related code from EditSourceBloc constructor - Remove droppable() transformer usage - Adjust load more countries/languages functions to no longer filter based on search term
…h DropdownButtonFormField - Replace SearchableDropdownFormField with DropdownButtonFormField for language and headquarters selection - Add support for loading more items in the dropdown - Improve UI by using standard DropdownMenuItem widgets - Simplify item builder logic for better readability and maintainability
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.
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!
I've made enhancements to the content management UI by simplifying the country and language selection processes in the headline and source creation/editing forms. The previous search-enabled dropdowns have been replaced with standard dropdowns that now feature an explicit 'Load More' option for fetching additional data. This change streamlines the user experience by removing the search input and provides a clearer mechanism for handling paginated lists of countries and languages, along with corresponding backend logic cleanup.
Highlights
- Simplified Dropdown Interactions: I have removed the search functionality from the country and language selection dropdowns across the 'Create Headline', 'Edit Headline', 'Create Source', and 'Edit Source' forms. This simplifies the interaction by removing the search input field.
- UI Component Migration: The UI components for country and language selection have been migrated from
SearchableDropdownFormField
to standardDropdownButtonFormField
. This change aligns with the removal of the search feature and provides a more direct selection experience. - Explicit Pagination in Dropdowns: Instead of search-driven loading, I've implemented an explicit 'Load More' option within the dropdowns. This allows users to manually fetch additional paginated data when needed, providing clear control over data loading.
- BLoC Logic Refactoring: The corresponding BLoC (Business Logic Component) events, state properties, and methods related to country and language search terms have been removed. This cleans up the BLoC logic, making it more streamlined and focused on the new pagination approach.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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 or fill out our survey to provide feedback.
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
-
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. ↩
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 several UI components by replacing the custom SearchableDropdownFormField
with the standard DropdownButtonFormField
. This removes the search capability from these dropdowns across various content creation and editing screens. While this simplifies the implementation, the new approach for handling pagination ('Load More') within the dropdowns is non-functional due to a known issue with onTap
on DropdownMenuItem
in Flutter. This is a significant functional regression that needs to be addressed.
Status
READY/IN DEVELOPMENT/HOLD
Description
Type of Change