Skip to content

Refactor rename package #62

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

Merged
merged 23 commits into from
Jul 23, 2025
Merged

Refactor rename package #62

merged 23 commits into from
Jul 23, 2025

Conversation

fulleni
Copy link
Member

@fulleni fulleni commented Jul 23, 2025

Description

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

fulleni added 23 commits July 23, 2025 06:47
- Update analyzer from 7.7.0 to 7.7.1
- Update go_router from 15.1.3 to 16.0.0
- Update very_good_analysis from 7.0.0 to 9.0.0
- Migrate dependencies from headlines-toolkit to flutter-news-app-full-source-code
- Update dependabot.yaml to ignore specific internal dependencies
- Update deploy.yml to reflect new project name in base href
- Rename main.yaml workflow to 'ci' for consistency
- Update namespace in build.gradle.kts
- Update applicationId in build.gradle.kts
- Update project_info in google-services.json
- Update package name in AndroidManifest.xml
- Update package name in MainActivity.kt
- Adjust dynamic link domain in AndroidManifest.xml
- Updated import statements to remove "ht_" prefix from package names
- Renamed classes and methods to remove "ht" prefix
- Updated file paths in import statements
- Changed package names in main.dart
- Update import paths to use new package name 'flutter_news_app_mobile_client_full_source_code'
- Replace 'ht_ui_kit' with 'ui_kit'
- Adjust repository imports to remove 'ht_' prefix
- Update bloc and l10n imports to use new package structure
- Update imports to use core and data_repository packages
- Rename HtAuthRepository to AuthRepository
- Rename HtDataRepository to DataRepository
- Replace HtHttpException with HttpException
- Remove unused imports
- Update class and variable names to use new repository interfaces
- Rename 'ht_' prefix packages to 'flutter_news_app_mobile_client_full_source_code'
- Restructure package imports to use core, data_repository, and kv_storage_service
- Update import paths for consistency and remove redundant ones
- Update import paths for auth_repository, core, and ui_kit
- Replace HtAuthRepository with AuthRepository
- Replace HtHttpException with HttpException
- Update package name in file paths
- Update import statements to use new DataRepository class
- Replace HtDataRepository with DataRepository in bloc classes
- Update exception handling from HtHttpException to HttpException
- Adjust import paths to reflect new repository structure
- Replace HtDataRepository with DataRepository
- Remove ht_shared package imports
- Update UI kit imports
- Rename package and file paths
- Update exception handling from HtHttpException to HttpException
- Update import paths to use new package structure
- Replace HtDataRepository with DataRepository
- Replace HtHttpException with HttpException
- Update widget imports to use new package structure
- Replace ht_data_repository with data_repository
- Replace ht_shared with core
- Update import paths for l10n, router, and ui_kit
- Rename HttpException to HtHttpException
- Replace old package imports with new ones (e.g., core/core.dart)
- Update widget imports to use new package structure
- Replace ht_ui_kit with ui_kit package
- Adjust import paths for entity_details_page.dart and routes.dart
- Update import statements to use new package names
- Replace HtAuthRepository with AuthRepository
- Replace HtDataRepository with DataRepository
- Update repository imports to use new package structure
- Adjust bloc imports to use new package paths
- Change import path from 'package:ht_main/l10n/app_localizations.dart' to 'package:flutter_news_app_mobile_client_full_source_code/l10n/app_localizations.dart'
- Rename project to flutter_news_app_mobile_client_full_source_code
- Update repository URLs and demo link
- Update description to reflect new project name
- Refactor licensing section to use PolyForm Free Trial 1.0.0
- Update git clone instructions with new repository name
- Rename repository in README title
- Enhance feature descriptions and benefits
- Improve licensing explanation
- Expand and clarify getting started instructions
- Add section on running the app in different environments
- Remove duplicate test command at the end
- Remove outdated UI description
- Add information about in-feed messages and calls-to-action
- Improve clarity of the feature description
…PageState

- Use cascade notation to add chips, making the code more concise
- Maintain the original functionality and design of the chips
- Enhance readability by organizing chip creation in a more structured way
…tency

- Replace generic 'user' with my username 'fulleni' in TODO comments
- Improve consistency of TODO comment formatting
- Remove unnecessary comments related to content type filtering
- Adjust comments about localization to reflect current implementation status
- Remove dependencies from root pubspec.yaml
- Add dependencies to individual packages where needed
- Reorder dependencies alphabetically within each package
- Update package imports as necessary
- Combine split import statement into a single line for better readability
- This change does not affect functionality, only code formatting
- Rename workflow name from 'deploy' to 'cd'
- Upgrade actions/checkout from v3 to v4
- Upgrade peaceiris/actions-gh-pages from v3 to v4
@fulleni fulleni merged commit f0503b0 into main Jul 23, 2025
0 of 2 checks passed
@fulleni fulleni deleted the refactor_rename_package branch July 23, 2025 06:44
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.

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 undertakes a significant refactoring effort by renaming the entire project and its underlying package structure. The primary goal is to remove the ht_ prefix from all package names, replacing them with more conventional and descriptive names. This change impacts project configuration, dependency management, and numerous code files, ensuring a cleaner and more standardized codebase for future development.

Highlights

  • Project Renaming: The entire project has been renamed from ht_main to flutter_news_app_mobile_client_full_source_code. This includes updates to the README.md, Android application IDs, package names, and dynamic link hosts.
  • Package Refactoring: All internal and external ht_ prefixed packages (e.g., ht_auth_repository, ht_data_repository, ht_shared, ht_ui_kit) have been renamed to more generic and descriptive names (e.g., auth_repository, data_repository, core, ui_kit). This required extensive import and type updates across the entire codebase.
  • Dependency Updates: The pubspec.yaml and pubspec.lock files have been updated to reflect the new Git dependencies for the refactored packages. Additionally, several hosted package versions, such as go_router, very_good_analysis, and analyzer, have been upgraded.
  • Error Handling Consistency: The custom HtHttpException type has been replaced with the more standard HttpException across all relevant BLoCs and state files, improving consistency in error handling.
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

  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 is a large-scale refactoring to rename the project and its packages. The changes are extensive and touch many files, which is expected for such a task. Overall, the refactoring appears to be mostly complete and consistent.

I've identified a few issues:

  • A critical issue with the Android package name and directory structure mismatch that will likely cause build failures.
  • A high-severity markdown rendering issue in the README.md.
  • Several medium-severity issues related to inconsistent renaming of variables and parameters, which affects code clarity and maintainability.
  • A medium-severity issue in the dependabot.yaml configuration that makes it less maintainable.

Please review the detailed comments for specific suggestions on how to address these points. Once these are resolved, the pull request should be in good shape.

Comment on lines +118 to 128
final AuthRepository authenticationRepository;
final DataRepository<Headline> htHeadlinesRepository;
final DataRepository<Topic> htTopicRepository;
final DataRepository<Country> htCountriesRepository;
final DataRepository<Source> htSourcesRepository;
final DataRepository<UserAppSettings> htUserAppSettingsRepository;
final DataRepository<UserContentPreferences>
htUserContentPreferencesRepository;
final HtDataRepository<RemoteConfig> htAppConfigRepository;
final DataRepository<RemoteConfig> htAppConfigRepository;
final AppEnvironment environment;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The fields in _AppView should also be renamed to remove the ht prefix for consistency.

  final AuthRepository authenticationRepository;
  final DataRepository<Headline> headlinesRepository;
  final DataRepository<Topic> topicRepository;
  final DataRepository<Country> countriesRepository;
  final DataRepository<Source> sourcesRepository;
  final DataRepository<UserAppSettings> userAppSettingsRepository;
  final DataRepository<UserContentPreferences>
  userContentPreferencesRepository;
  final DataRepository<RemoteConfig> appConfigRepository;
  final AppEnvironment environment;

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.

1 participant