Skip to content

Conversation

@fulleni
Copy link
Member

@fulleni fulleni commented Dec 13, 2025

Status

READY

Description

This pull request refactors and enhances the user interface and underlying logic for content management, specifically focusing on the headlines table. The changes simplify the breaking news filter, improve the user feedback for deletion actions by providing more contextual and localized snackbar messages, and introduce confirmation dialogs for critical content operations. Additionally, the visual presentation of breaking news headlines has been refined for better clarity and user experience.

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 breaking news tooltip
- Update app_ar.arb and app_en
- Replace Stack with RichText for better layout and performance
- Add tooltip for breaking news icon to aid screen readers
- Adjust icon size and spacing for better visual consistency
- Ensure text and icon alignment across different screen sizes
- Add Arabic and English translations for the breaking news filter description
- Extend app_ar.arb and app_en.arb files with new subtitle for the breaking news filter switch
- Replace `BreakingNewsFilterStatus` enum with a simple boolean `isBreaking` flag
- Update default value from `BreakingNewsFilterStatus.all` to `false`
- Adjust property and constructor parameter names accordingly
- Change HeadlinesBreakingNewsFilterChanged to use bool instead of BreakingNewsFilterStatus
- Update HeadlinesFilterApplied to use bool for isBreaking
- Simplify props list in both events
perf- Remove(content_management unused Breaking): optimizeNewsFilter breaking newsStatus filter logic enum

-- Simpl Simplifyify is theBreaking breaking filter news logic filter to by only removing include unused ' enumtrue values'
 condition-
 Improve- query Improve performance code by readability only and adding ' reduceis complexityBreaking
'
- Change `isBreaking` from BreakingNewsFilterStatus to bool
- Update default value from BreakingNewsFilterStatus.all to false
- Remove outdated comments explaining the previous enum-based logic
- Update type of isBreaking parameter in FilterDialogBreakingNewsChanged event from BreakingNewsFilterStatus to bool
- Remove unused import statement
- Modify reset logic to set isBreaking to false
- Improve code readability by using copyWith method
- Remove unused import of BreakingNewsFilterStatus
- Simplify isBreaking filter condition
- Update comments and documentation
- Remove BreakingNewsFilterStatus enum
- Replace with a simple boolean isBreaking
- Update UI to use SwitchListTile instead of ChoiceChip
- Update localization keys and remove unused ones
- Adjust layout and spacing
- Add Arabic and English translations for publishing, archiving, restoring, and deleting items
- Include titles and content for confirmation dialogs related to item actions
- Add confirmation dialog for publish, archive, restore, and delete actions
- Refactor content action handling
…nackbar message

- Add Arabic translations for item action confirmations in app_ar.arb
- Update app_en.arb to include item deletion snackbar message
- Modify existing confirmation messages for consistency across both languages
…gDeletion

- Remove snackbarMessage field from ContentManagementState
- Add itemPendingDeletion field of type FeedItem?
- Update copyWith method to use new field
- Update props list in Equatable to include new field
- Replace snackbarMessage with itemPendingDeletion in state
- Remove messageBuilder from undo deletions
- Clear itemPendingDeletion on undo or deletion completion
- Update comments to explain changes in snackbar logic
- Replace generic snackbar message with specific item-related message
- Add logic to determine deleted item type and name
- Update UI to display customized snackbar message for deleted items
- Add message field to DeletionEvent class
- Add messageBuilder parameter to requestDeletion method
- Implement message building in PendingDeletionsServiceImpl
- Update _PendingDeletion class to include message field
…n switch statement

- Add a case for DeletionStatus.requested in the switch statement
- Include a comment explaining that this case is now handled by the optimistic UI update in specific delete handlers
- Mention that the itemPendingDeletion is set in those handlers, which the UI uses to build the snackbar message
…nding deletions

- Add DeletionStatus.requested enum value to represent a pending deletion request
- Implement functionality to immediately notify listeners when a deletion is requested
- Update PendingDeletionsServiceImpl to send a DeletionEvent with requested status upon request
- Add Arabic translations for 'headline', 'topic', and 'source'
- Include descriptions for new labels in both Arabic and English files
- Maintain consistency in translation style and formatting
- Change 'headlines' to 'headline'
- Change 'topics' to 'topic'
- Change 'sources' to 'source'
- Add placeholders for item type in confirmation dialog messages
- Update translations for publish, archive, restore, and delete actions
- Improve clarity of messages, especially for delete action
…nt types

- Introduce type-specific confirmation dialogs for publish, archive, restore, and delete actions
- Replace generic item-related messages with type (headline, topic, or source) specific messages
- Improve user experience by providing more context in confirmation dialogs
@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 refactors and enhances the user interface and underlying logic for content management, specifically focusing on the headlines table. The changes simplify the breaking news filter, improve the user feedback for deletion actions by providing more contextual and localized snackbar messages, and introduce confirmation dialogs for critical content operations. Additionally, the visual presentation of breaking news headlines has been refined for better clarity and user experience.

Highlights

  • Simplified Breaking News Filter: The BreakingNewsFilterStatus enum has been replaced with a simpler boolean isBreaking flag across the content management and filter BLoCs, streamlining the logic for filtering breaking news headlines.
  • Enhanced Deletion Feedback: The deletion mechanism now passes the itemPendingDeletion directly to the UI, allowing for dynamic and localized snackbar messages when an item is deleted, improving user feedback.
  • Confirmation Dialogs for Actions: Confirmation dialogs have been introduced for content actions such as publishing, archiving, restoring, and deleting items, preventing accidental operations and improving the user experience.
  • Improved Breaking News UI: The display of breaking news headlines in the table has been enhanced using RichText and WidgetSpan to embed the breaking news icon directly within the headline text, ensuring better visual alignment and adding a Tooltip for clarity.
  • New Localization Keys: Several new localization keys have been added to support singular item types (headline, topic, source), a breaking news hint, filter descriptions, and the new confirmation dialogs and snackbar messages.
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 and well-executed refactoring of the content management UI and its underlying logic. The simplification of the 'breaking news' filter from an enum to a boolean improves clarity and simplifies the UI. The refactoring of the deletion flow, moving snackbar message creation to the UI layer and enhancing the PendingDeletionsService, is a great architectural improvement that enhances separation of concerns. Furthermore, the UI for displaying breaking news headlines has been improved using RichText, and the addition of confirmation dialogs for actions is a welcome UX enhancement. I've found one critical issue where delete functionality for Topics and Sources has been unintentionally removed during the refactor. Apart from that, the changes are excellent and improve the codebase's quality and maintainability.

@fulleni fulleni merged commit f1bddb4 into main Dec 13, 2025
2 of 3 checks passed
@fulleni fulleni deleted the refactor/enhance-headlines-table-ui branch December 13, 2025 09:32
@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