Skip to content

Conversation

@JatsuAkaYashvant
Copy link
Member

@JatsuAkaYashvant JatsuAkaYashvant commented Jun 8, 2025

Fixes #367

Describe the changes you have made in this PR -

  • Removed usage of deprecated flutter_gen
  • Regenerated localization files using modern flutter gen-l10n approach
  • Updated all references to localization imports accordingly
  • Replaced deprecated imageBuilder with custom MarkdownElementBuilder
  • Implemented new CustomImageBuilder for handling image rendering
  • Added support for image tap gestures
  • Enhanced error handling and SVG/network image support
  • Upgraded Flutter SDK to version 3.32.2
  • Updated CI/CD pipelines to support new Flutter version
  • Optimized flutter_gen configuration for better asset management

Screenshots of the changes (If any) -

Not Applicable

  • New Features

    • Added comprehensive localization support for English and Hindi
    • Improved markdown image handling with enhanced SVG/raster support
    • Introduced tap gesture support for images
  • Bug Fixes

    • Fixed localization import paths throughout the app
    • Resolved image rendering edge cases
  • Chores

    • Updated localization configuration
    • Fixed intl package version
    • Increased Gradle JVM heap size
    • Disabled Android Jetifier
  • Style

    • Reformatted files for better consistency
    • Improved code readability

Note: Please check Allow edits from maintainers if you would like us to assist in the PR.

@coderabbitai
Copy link

coderabbitai bot commented Jun 8, 2025

"""

Walkthrough

This update introduces new localization infrastructure for English and Hindi, modifies imports to use the new localization paths, adds LLDB debugging helper scripts for iOS, and updates the intl package dependency to a fixed version. Several files are reformatted, and localization configuration is updated to reflect new output directories.

Changes

Files/Group Change Summary
lib/gen_l10n/app_localizations.dart, lib/gen_l10n/app_localizations_en.dart, lib/gen_l10n/app_localizations_hi.dart Added new localization classes for English and Hindi, providing UI and legal text translations.
l10n.yaml Updated localization config: set output directory and disabled synthetic package.
pubspec.yaml Changed intl dependency from ^0.19.0 to 0.20.2.
lib/main.dart, lib/ui/components/cv_drawer.dart, lib/ui/views/about/about_privacy_policy_view.dart, lib/ui/views/about/about_tos_view.dart, lib/ui/views/about/about_view.dart, lib/ui/views/cv_landing_view.dart, lib/ui/views/projects/featured_projects_view.dart, lib/viewmodels/cv_landing_viewmodel.dart Updated import paths for localization to new generated location.
test/ui_tests/about/about_privacy_policy_view_test.dart, test/ui_tests/about/about_tos_view_test.dart, test/ui_tests/about/about_view_test.dart, test/ui_tests/projects/featured_projects_view_test.dart, test/ui_tests/startup/startup_view_test.dart Updated localization import paths in tests.
ios/Flutter/ephemeral/flutter_lldb_helper.py, ios/Flutter/ephemeral/flutter_lldbinit Added LLDB helper Python script and LLDB init file for iOS debugging integration.
lib/ui/views/ib/ib_page_view.dart Replaced custom markdown image builder with CustomImageBuilder for enhanced image handling.

Assessment against linked issues

Objective Addressed Explanation
Update deprecated dependencies and resolve dependency issues (#367)

Assessment against linked issues: Out-of-scope changes

Code Change (file_path) Explanation
Addition of LLDB helper script and init file (ios/Flutter/ephemeral/flutter_lldb_helper.py, ios/Flutter/ephemeral/flutter_lldbinit) These files add iOS debugging support, which is unrelated to dependency resolution objectives.
Introduction of new localization infrastructure and translations (lib/gen_l10n/*, l10n.yaml, import path changes) Localization infrastructure and translations are not mentioned in the dependency update issue.
Refactoring markdown image handling (lib/ui/views/ib/ib_page_view.dart) Markdown image builder changes are not related to dependency resolution or updates.

Suggested labels

released

Suggested reviewers

  • tachyons
    """

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
lib/ui/views/ib/ib_page_view.dart (1)

146-149: Consider enhancing the image tap handler implementation.

The current implementation only logs the tapped image source. Consider implementing more meaningful functionality such as opening the image in a full-screen viewer, showing image details, or providing user interaction options.

  void _onTapImage(String src) {
-   // Implement your image tap handling logic here
-   debugPrint('Image tapped: $src');
+   // Open image in full-screen viewer or show image dialog
+   showDialog(
+     context: context,
+     builder: (context) => Dialog(
+       child: InteractiveViewer(
+         child: Image.network(src),
+       ),
+     ),
+   );
  }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a869534 and 5d09712.

⛔ Files ignored due to path filters (1)
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (21)
  • ios/Flutter/ephemeral/flutter_lldb_helper.py (1 hunks)
  • ios/Flutter/ephemeral/flutter_lldbinit (1 hunks)
  • l10n.yaml (1 hunks)
  • lib/gen_l10n/app_localizations.dart (1 hunks)
  • lib/gen_l10n/app_localizations_en.dart (1 hunks)
  • lib/gen_l10n/app_localizations_hi.dart (1 hunks)
  • lib/main.dart (1 hunks)
  • lib/ui/components/cv_drawer.dart (1 hunks)
  • lib/ui/views/about/about_privacy_policy_view.dart (1 hunks)
  • lib/ui/views/about/about_tos_view.dart (1 hunks)
  • lib/ui/views/about/about_view.dart (1 hunks)
  • lib/ui/views/cv_landing_view.dart (1 hunks)
  • lib/ui/views/ib/ib_page_view.dart (1 hunks)
  • lib/ui/views/projects/featured_projects_view.dart (1 hunks)
  • lib/viewmodels/cv_landing_viewmodel.dart (1 hunks)
  • pubspec.yaml (1 hunks)
  • test/ui_tests/about/about_privacy_policy_view_test.dart (1 hunks)
  • test/ui_tests/about/about_tos_view_test.dart (1 hunks)
  • test/ui_tests/about/about_view_test.dart (1 hunks)
  • test/ui_tests/projects/featured_projects_view_test.dart (1 hunks)
  • test/ui_tests/startup/startup_view_test.dart (1 hunks)
🧰 Additional context used
🪛 Pylint (3.3.7)
ios/Flutter/ephemeral/flutter_lldb_helper.py

[refactor] 7-7: Useless return at end of function or method

(R1711)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest)
🔇 Additional comments (27)
ios/Flutter/ephemeral/flutter_lldbinit (1)

1-6: Potential inconsistency with PR objectives.

This appears to be auto-generated Flutter iOS debugging tooling, which seems unrelated to the stated PR objectives of fixing flutter_gen and imageBuilder deprecation issues. These files are typically generated automatically as part of Flutter framework updates.

Likely an incorrect or invalid review comment.

ios/Flutter/ephemeral/flutter_lldb_helper.py (3)

7-22: LLDB callback function implementation looks correct.

The handle_new_rx_page function properly intercepts the debugging event, reads CPU registers, and handles memory operations with appropriate error checking. The logic follows LLDB debugging best practices.

🧰 Tools
🪛 Pylint (3.3.7)

[refactor] 7-7: Useless return at end of function or method

(R1711)


24-32: LLDB module initialization is properly implemented.

The __lldb_init_module function correctly sets up the breakpoint using regex-based creation (as noted in the comment, this is necessary over BreakpointCreateByName for callback preservation), configures auto-continue behavior, and provides user feedback.


1-33: Static analysis hint appears to be a false positive.

The Pylint warning about "useless return at end of function" on line 7 seems incorrect. Line 7 is a function definition, and the only return statement (line 22) serves as an early exit for error conditions, which is appropriate.

🧰 Tools
🪛 Pylint (3.3.7)

[refactor] 7-7: Useless return at end of function or method

(R1711)

lib/ui/views/cv_landing_view.dart (1)

15-15: Use new mobile_app/gen_l10n import for AppLocalizations.
Aligns the import with the regenerated localization files under lib/gen_l10n.

lib/ui/views/about/about_view.dart (1)

14-14: Use new mobile_app/gen_l10n import for AppLocalizations.
Ensures localization strings are loaded from the updated gen_l10n output directory.

lib/main.dart (1)

4-4: Use new mobile_app/gen_l10n import for AppLocalizations.
Updates the main app to reference the correct localization package as per l10n.yaml.

lib/viewmodels/cv_landing_viewmodel.dart (1)

9-9: Use new mobile_app/gen_l10n import for AppLocalizations.
Keeps the ViewModel in sync with the new localization package path.

test/ui_tests/about/about_privacy_policy_view_test.dart (1)

9-9: Use new mobile_app/gen_l10n import for AppLocalizations.
Ensures tests reference the regenerated localization files.

test/ui_tests/startup/startup_view_test.dart (1)

10-10: Updated localization import path.

The import now references package:mobile_app/gen_l10n/app_localizations.dart, which aligns with the new l10n output directory.

lib/ui/components/cv_drawer.dart (1)

2-2: Switched to app-specific localization import.

Changing to package:mobile_app/gen_l10n/app_localizations.dart matches the updated localization setup.

pubspec.yaml (1)

47-47: Pinning intl to 0.20.2.

Locking the intl package may introduce conflicts if other dependencies expect a caret range. Please verify compatibility (e.g., via flutter pub outdated) to ensure no transitive version mismatches.

test/ui_tests/about/about_view_test.dart (1)

18-18: Aligned localization import for tests.

The test now imports package:mobile_app/gen_l10n/app_localizations.dart, keeping tests in sync with the new localization files.

lib/ui/views/about/about_tos_view.dart (1)

6-6: Localization import updated.

Switching to package:mobile_app/gen_l10n/app_localizations.dart is consistent with the PR’s l10n configuration.

test/ui_tests/about/about_tos_view_test.dart (1)

9-9: Update localization import path correctly applied
The import now references the new generated localization package under lib/gen_l10n.

lib/ui/views/about/about_privacy_policy_view.dart (1)

4-4: Updated localization import to new generation output
Import uses package:mobile_app/gen_l10n/app_localizations.dart as expected after migrating from flutter_gen.

l10n.yaml (1)

4-5: L10n configuration updated for custom output directory
Setting output-dir to lib/gen_l10n and synthetic-package: false aligns with the new Flutter gen-l10n setup.

lib/ui/views/projects/featured_projects_view.dart (1)

13-13: Localization import path migrated to the new package
This aligns the view with the regenerated localization files located under lib/gen_l10n.

test/ui_tests/projects/featured_projects_view_test.dart (1)

18-18: Test localization import updated correctly
The test now imports from mobile_app/gen_l10n, ensuring it references the regenerated localization files.

lib/ui/views/ib/ib_page_view.dart (1)

174-177: LGTM: Clean integration of CustomImageBuilder.

The integration of the custom image builder into the markdown builders map is well-implemented and follows the existing pattern used for other custom builders.

lib/gen_l10n/app_localizations_hi.dart (2)

1-10: LGTM: Proper localization class structure.

The Hindi localization class follows Flutter's standard localization patterns with correct imports, class inheritance, and constructor implementation.


11-404: Comprehensive Hindi localization coverage.

Excellent comprehensive coverage of UI strings, legal content, Terms of Service, and Privacy Policy in Hindi. The translations appear thorough and include all necessary application text.

lib/gen_l10n/app_localizations_en.dart (2)

1-10: LGTM: Proper localization class structure.

The English localization class follows Flutter's standard localization patterns with correct imports, class inheritance, and constructor implementation.


11-405: Comprehensive English localization coverage.

Excellent comprehensive coverage of UI strings, legal content, Terms of Service, and Privacy Policy in English. The translations provide complete application text coverage matching the Hindi localization scope.

lib/gen_l10n/app_localizations.dart (3)

13-63: Excellent documentation and usage examples.

The comprehensive documentation and code examples provide clear guidance on how to integrate the localization system into the Flutter app. This is particularly helpful for developers working with the localization setup.


64-99: LGTM: Proper abstract class structure and locale configuration.

The abstract class structure is well-designed with appropriate static methods for accessing localizations, proper delegate setup, and correct supported locales configuration for English and Hindi.


768-800: Solid delegate implementation and locale lookup logic.

The localization delegate and lookup function are properly implemented following Flutter's localization patterns. The error handling for unsupported locales provides helpful debugging information.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
android/gradle.properties (1)

1-1: Offer architecture advice on JVM heap size
Increasing org.gradle.jvmargs to -Xmx4g may improve build performance for large projects, but could overwhelm machines with limited RAM (e.g., lower-end developer laptops or CI runners). Consider tuning this value based on your team’s typical environment or making it configurable per user/CI profile.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34d9e95 and e9982a6.

📒 Files selected for processing (1)
  • android/gradle.properties (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: build (macos-latest)
🔇 Additional comments (1)
android/gradle.properties (1)

4-4:

Details

✅ Verification successful

Verify compatibility before disabling Jetifier
Disabling Jetifier (android.enableJetifier=false) assumes all dependencies are fully migrated to AndroidX. Please validate that no legacy com.android.support artifacts remain.

Run a search to ensure compatibility, for example:


🏁 Script executed:

#!/bin/bash
# Search for any leftover Android Support library references
rg --ignore-case 'com\.android\.support' -n .

Length of output: 47


No legacy support libraries detected – disabling Jetifier is safe
The ripgrep search (rg -n 'com\.android\.support') across the repo returned no matches, confirming a full AndroidX migration. Keeping android.enableJetifier=false is safe.

@hardik17771 hardik17771 merged commit 87cbfe9 into CircuitVerse:master Jun 9, 2025
7 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependencies resolution and updation

2 participants