Skip to content

Conversation

@fulleni
Copy link
Member

@fulleni fulleni commented Oct 24, 2025

Status

READY

Description

This pull request introduces the capability to manage a 'Logo URL' for sources within the content management system. It integrates this new field across the application's BLoC state management, user interface for creation and editing, and provides localization. Additionally, it includes a comprehensive update of various project dependencies to ensure stability and leverage the latest features.

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

- Update auth-related packages from v1.0.0 to v1.0.1
- Update core package from v1.2.0 to v1.3.1
- Update data-related packages from v1.0.0 to v1.0.1
- Update bloc from v9.0.0 to v9.1.0
- Update go_router from v16.2.2 to v16.3.0
- Update google_fonts from v6.3.1 to v6.3.2
- Update path_provider related packages to latest versions
- Update shared_preferences related packages to latest versions
Adds the `logoUrl` field to the `CreateSourceState`.

This change updates the state class to manage the new logo URL, including modifications to the constructor, `copyWith` method, `props` for equatability, and the `isFormValid` getter to enforce the new required field.
Introduces the `CreateSourceLogoUrlChanged` event to handle updates to the new `logoUrl` field within the `CreateSourceBloc`.
Updates the `CreateSourceBloc` to fully manage the new `logoUrl` field.

This change introduces a new event handler `_onLogoUrlChanged` to update the state with the logo URL from the UI. It also registers this handler and modifies the `_onSavedAsDraft` and `_onPublished` methods to include the `logoUrl` when creating a new `Source` instance, resolving the compilation errors. Comments for future logging have been added to enhance maintainability.
Adds the `logoUrl` field to the `EditSourceState`.

This change updates the state class to manage the new logo URL for the editing workflow. It includes modifications to the constructor, `copyWith` method, `props` for equatability, and the `isFormValid` getter to enforce the new required field.
Introduces the `EditSourceLogoUrlChanged` event. This allows the UI to notify the `EditSourceBloc` when the user modifies the `logoUrl` field, enabling state updates for the editing workflow.
Updates the `EditSourceBloc` to fully manage the new `logoUrl` field.

This change introduces and registers the `_onLogoUrlChanged` event handler. It also updates the `_onEditSourceLoaded` method to populate the `logoUrl` from the fetched source. Finally, it modifies the `_onSavedAsDraft` and `_onPublished` methods to include the `logoUrl` when updating the `Source` instance. Comments for future logging have been added to enhance maintainability.
Integrates the `logoUrl` input field into the `CreateSourcePage` UI.

This change adds the necessary `TextEditingController` and `TextFormField` to allow users to input a URL for the source's logo. The controller is properly initialized and disposed, and the text field is connected to the `CreateSourceBloc` to handle state updates.
Integrates the `logoUrl` input field into the `EditSourcePage` UI.

This change adds the necessary `TextEditingController` and `TextFormField` to allow users to edit the URL for the source's logo. The controller is properly initialized, disposed, and updated from the BLoC state. The text field is connected to the `EditSourceBloc` to handle state updates.
Corrects a compilation error in `filter_dialog.dart` by adding the required `logoUrl` parameter to the `Source` constructor within an `orElse` block. This dummy object is used as a fallback and now aligns with the updated `Source` model.
- Add Arabic and English translations for "logoUrl" label
- Update descriptions for "saveAdMessage" localization entries
@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 introduces the capability to manage a 'Logo URL' for sources within the content management system. It integrates this new field across the application's BLoC state management, user interface for creation and editing, and provides localization. Additionally, it includes a comprehensive update of various project dependencies to ensure stability and leverage the latest features.

Highlights

  • New Feature: Logo URL for Sources: A new 'Logo URL' field has been introduced for both creating and editing sources, allowing users to associate a logo with each source. This includes updates to the BLoC state, events, and UI components.
  • BLoC Logic Enhancements: The CreateSourceBloc and EditSourceBloc have been updated to handle the new logoUrl property. This involves new event handlers, state updates, and inclusion of the logoUrl when saving or publishing a source.
  • User Interface Integration: Text input fields for the 'Logo URL' have been added to the CreateSourcePage and EditSourcePage, ensuring that users can input and manage this new information directly from the UI.
  • Localization Support: The application's localization files (app_localizations.dart, app_localizations_ar.dart, app_localizations_en.dart, app_ar.arb, app_en.arb) have been updated to include the 'Logo URL' label in both English and Arabic.
  • Dependency Updates: Numerous package dependencies, including several internal git repositories (e.g., auth_api, core, data_api) and hosted packages (e.g., bloc, go_router, google_fonts), have been updated to their latest versions, ensuring the project uses up-to-date libraries.
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.

@fulleni fulleni self-assigned this Oct 24, 2025
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 new logoUrl field for sources and updates various dependencies. The changes for the new field are well-integrated across the BLoCs, states, events, and UI. My feedback focuses on improving code quality by removing placeholder log comments, addressing a minor formatting inconsistency, and suggesting a refactoring to reduce significant code duplication in the BLoC files. Overall, the changes are good and align with the PR's objectives.

…tion and editing

- Remove commented-out log statements in CreateSourceBloc and EditSourceBloc
- These comments were likely intended for debugging purposes but are no longer
@fulleni fulleni merged commit 7238b04 into main Oct 24, 2025
1 check failed
@fulleni fulleni deleted the build/update-dependencies branch October 24, 2025 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants