Skip to content

Conversation

@Mayank4352
Copy link
Contributor

@Mayank4352 Mayank4352 commented Jan 15, 2026

Description

Added Empty State screens for friends screen and Friend request screen

Fixes #627

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested Locally

image image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

Summary by CodeRabbit

Release Notes

  • New Features
    • Added empty state screens for Friends and Friend Requests with actionable buttons to discover and invite friends.
    • Introduced friend invitation sharing with pre-formatted shareable invitation text.
    • Enhanced username validation with clear error messages for invalid formats and unavailable usernames.
    • Extended multi-language support for improved accessibility across the app.

✏️ Tip: You can customize this high-level summary in your review settings.

@Mayank4352 Mayank4352 requested a review from M4dhav as a code owner January 15, 2026 17:02
@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This PR adds an empty-state UI component for the Friends and Friend Requests screens, which display when users have no friends or pending requests. It introduces localization entries across multiple languages, a new FriendsEmptyState widget with navigation and sharing actions, and minimal updates to existing friend-related screens.

Changes

Cohort / File(s) Summary
Localization ARB files
lib/l10n/app_en.arb, lib/l10n/app_hi.arb, lib/l10n/app_pa.arb
Added 9–10 new translation keys for friend-related UI and messages (noFriendsYet, noFriendsDescription, findFriends, inviteFriend, noFriendRequestsYet, noFriendRequestsDescription, inviteToResonate, usernameInvalidFormat, usernameAlreadyTaken) with descriptions and placeholders where applicable.
Generated Localization Dart files
lib/l10n/app_localizations.dart, lib/l10n/app_localizations_en.dart, lib/l10n/app_localizations_bn.dart, lib/l10n/app_localizations_hi.dart, lib/l10n/app_localizations_gu.dart, lib/l10n/app_localizations_kn.dart, lib/l10n/app_localizations_mr.dart, lib/l10n/app_localizations_pa.dart
Added public getters and methods for the new localization keys across all language implementations (e.g., noFriendsYet, findFriends, inviteToResonate(String url)). Updated character limit message for username validation from 5 to 7 characters in base AppLocalizations.
Empty State Widget
lib/views/widgets/friends_empty_state.dart
New FriendsEmptyState widget that displays a responsive empty state with title, description, and action buttons (Find Friends and Invite). Supports toggling between friends and friend requests views via isRequestsScreen flag. Implements navigation to Find Friends tab and share functionality via SharePlus.
Friends & Friend Requests Screens
lib/views/screens/friends_screen.dart, lib/views/screens/friend_requests_screen.dart
Updated to check if list is empty and render FriendsEmptyState instead of ListView. Modified friend_requests_screen to use friendsController.authStateController instead of local authStateController import.
Controller Formatting & Constants
lib/controllers/friends_controller.dart, lib/utils/constants.dart
Minor multi-line formatting change to getFriendsList queries field. Added new public constant playStoreUrl.
Translation Tracking
untranslated.txt
Updated to reflect newly added translation keys and locale-specific changes across Bengali, Gujarati, Kannada, Marathi, and Punjabi.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • #524: Implements the friends system and friends controller that this PR's UI updates enhance
  • #564: Large-scale AppLocalizations modifications and localization entries that overlap with this PR's translation additions
  • #601: Adds friend-related localization keys and modifies AppLocalizations in similar patterns

Suggested labels

translations, ui

Poem

🐰 A rabbit hops through friends so fair,
Now empty states show love and care!
With gentle prompts in every tongue,
"Find your friends!" the widget has sung. 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Several changes appear unrelated to the linked issue #627: localization additions for username validation, a database query formatting change, and a play store URL constant are outside the scope of empty-state UI implementation. Remove or justify out-of-scope changes: username validation localization strings, username character limit increase, playStoreUrl constant, and database query reformatting in friends_controller.dart.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: implementing empty-state UI for Friends and Friend Requests screens, which is the primary objective of the PR.
Linked Issues check ✅ Passed The PR implements all core requirements from issue #627: empty-state UI with messages for Friends and Friend Requests screens, plus actionable buttons (Find Friends and Invite Friend) to guide users.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

🎉 Welcome @Mayank4352!
Thank you for your pull request! Our team will review it soon. 🔍

  • Please ensure your PR follows the contribution guidelines. ✅
  • All automated tests should pass before merging. 🔄
  • If this PR fixes an issue, link it in the description. 🔗

We appreciate your contribution! 🚀

@M4dhav M4dhav added enhancement New feature or request good first issue Good for newcomers design labels Jan 24, 2026
@M4dhav M4dhav linked an issue Jan 24, 2026 that may be closed by this pull request
@override
Widget build(BuildContext context) {
final friendsController = Get.find<FriendsController>();
final authStateController = Get.find<AuthStateController>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please refrain from making changes unrelated to the direct subject of the PR in the future. As it is a small change which is arguably improving the code, we can leave it as is this time.

@M4dhav
Copy link
Contributor

M4dhav commented Jan 24, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@M4dhav
Copy link
Contributor

M4dhav commented Jan 24, 2026

Please fix merge conflicts

@M4dhav M4dhav added the RMC Remove Merge Conflicts, remove the merge conflicts caused by the previous merges label Jan 24, 2026
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: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
lib/l10n/app_en.arb (1)

1793-1836: Remove duplicate failedToDeleteMessage key to keep ARB valid.

The key appears twice, which can break gen-l10n or cause last-one-wins ambiguity. Keep the version with the @failedToDeleteMessage description and remove the earlier duplicate.

🧹 Suggested fix
-"failedToDeleteMessage": "Failed to delete message",
-
 "noFriendsYet": "No Friends Yet",
🤖 Fix all issues with AI agents
In `@lib/l10n/app_localizations_bn.dart`:
- Around line 1387-1419: The new Bengali locale strings are still in
English—update the getters and the inviteToResonate(String url) return to
Bengali (translate noFriendsYet, noFriendsDescription, findFriends,
inviteFriend, noFriendRequestsYet, noFriendRequestsDescription,
inviteToResonate, usernameInvalidFormat, usernameAlreadyTaken) following the
existing translation style in app_localizations_bn.dart; if you cannot provide
proper Bengali translations now, wire these keys to fall back to the English
locale instead (i.e., return the English values from the English localization or
call the fallback helper) so the app behavior is correct until native
translations are added.

In `@lib/l10n/app_localizations_gu.dart`:
- Around line 1377-1400: The new Gujarati localization entries are still in
English; update the getters noFriendsYet, noFriendsDescription, findFriends,
inviteFriend, noFriendRequestsYet, noFriendRequestsDescription and the
inviteToResonate(String url) method to provide proper Gujarati translations
(keeping the $url interpolation unchanged in inviteToResonate), ensuring string
escaping and punctuation follow existing file conventions.

In `@lib/l10n/app_localizations_hi.dart`:
- Around line 1381-1412: Translate the two English validation strings in
app_localizations_hi.dart into Hindi: replace the values returned by the getters
usernameInvalidFormat and usernameAlreadyTaken with appropriate Hindi
translations that match style of surrounding strings (e.g., explain allowed
characters for username and indicate the username is already taken); update the
String getters usernameInvalidFormat and usernameAlreadyTaken so they return the
Hindi text.

In `@lib/l10n/app_localizations_kn.dart`:
- Around line 1384-1416: The Kannada localization currently returns English for
several new keys (noFriendsYet, noFriendsDescription, findFriends, inviteFriend,
noFriendRequestsYet, noFriendRequestsDescription, inviteToResonate,
usernameInvalidFormat, usernameAlreadyTaken); replace the English strings with
accurate Kannada translations for each getter and the inviteToResonate(String
url) method, or implement a clear fallback to another locale if Kannada
translations aren’t available (e.g., call a shared fallback function or
reference an existing en localization), ensuring each symbol returns the
appropriate localized Kannada text.

In `@lib/l10n/app_localizations_mr.dart`:
- Around line 1377-1400: The new empty-state getters (noFriendsYet,
noFriendsDescription, findFriends, inviteFriend, noFriendRequestsYet,
noFriendRequestsDescription) and the inviteToResonate(String url) method are
still in English; replace their English string values with proper Marathi
translations for the mr locale, keeping the inviteToResonate interpolation
($url) intact and escaping any apostrophes as in the file; update the
implementations of those specific symbols so the Marathi texts read naturally
and grammatically correct.

Copy link
Contributor

Choose a reason for hiding this comment

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

Better to move this file to screens, as it is an entire screen, not a widget. Also, rename accordingly.

@Mayank4352 Mayank4352 requested a review from M4dhav January 24, 2026 17:33
@M4dhav M4dhav merged commit d6a8af4 into AOSSIE-Org:dev Jan 24, 2026
2 checks passed
@github-actions
Copy link
Contributor

PR Closed - Thank You, @Mayank4352!

  • If this PR was merged: Congratulations! Your contribution is now part of the project. 🚀
  • If this PR was closed without merging: Don’t worry! You can always improve it and submit again. 💪

We appreciate your effort and look forward to more contributions from you! 🤝

@github-actions
Copy link
Contributor

🔔 Translation Check Notice

The following untranslated language codes were found in untranslated.txt:
Please translate these keys:

{
  bn: [
    audioOptions,
    audioOutput,
    selectPreferredSpeaker,
    noAudioOutputDevices,
    refresh,
    done,
    noFriendsYet,
    noFriendsDescription,
    findFriends,
    inviteFriend,
    noFriendRequestsYet,
    noFriendRequestsDescription,
    inviteToResonate,
    usernameInvalidFormat,
    usernameAlreadyTaken
  ],

  gu: [
    appPreferences,
    transcriptionModel,
    transcriptionModelDescription,
    whisperModelTiny,
    whisperModelTinyDescription,
    whisperModelBase,
    whisperModelBaseDescription,
    whisperModelSmall,
    whisperModelSmallDescription,
    whisperModelMedium,
    whisperModelMediumDescription,
    whisperModelLargeV1,
    whisperModelLargeV1Description,
    whisperModelLargeV2,
    whisperModelLargeV2Description,
    modelDownloadInfo,
    hide,
    removeRoom,
    removeRoomFromList,
    removeRoomConfirmation,
    searchFailed,
    searchRooms,
    searchingRooms,
    clearSearch,
    searchError,
    searchRoomsError,
    searchUpcomingRoomsError,
    search,
    clear,
    audioOptions,
    failedToRemoveRoom,
    roomRemovedSuccessfully,
    audioOutput,
    selectPreferredSpeaker,
    noAudioOutputDevices,
    refresh,
    done,
    noFriendsYet,
    noFriendsDescription,
    findFriends,
    inviteFriend,
    noFriendRequestsYet,
    noFriendRequestsDescription,
    inviteToResonate
  ],

  hi: [
    usernameInvalidFormat,
    usernameAlreadyTaken
  ],

  kn: [
    hide,
    removeRoom,
    removeRoomFromList,
    removeRoomConfirmation,
    searchFailed,
    searchRooms,
    searchingRooms,
    clearSearch,
    searchError,
    searchRoomsError,
    searchUpcomingRoomsError,
    search,
    clear,
    audioOptions,
    failedToRemoveRoom,
    roomRemovedSuccessfully,
    audioOutput,
    selectPreferredSpeaker,
    noAudioOutputDevices,
    refresh,
    done,
    deleteMessageTitle,
    deleteMessageContent,
    thisMessageWasDeleted,
    failedToDeleteMessage,
    noFriendsYet,
    noFriendsDescription,
    findFriends,
    inviteFriend,
    noFriendRequestsYet,
    noFriendRequestsDescription,
    inviteToResonate,
    usernameInvalidFormat,
    usernameAlreadyTaken
  ],

  mr: [
    hide,
    removeRoom,
    removeRoomFromList,
    removeRoomConfirmation,
    searchFailed,
    searchRooms,
    searchingRooms,
    clearSearch,
    searchError,
    searchRoomsError,
    searchUpcomingRoomsError,
    search,
    clear,
    audioOptions,
    failedToRemoveRoom,
    roomRemovedSuccessfully,
    audioOutput,
    selectPreferredSpeaker,
    noAudioOutputDevices,
    refresh,
    done,
    noFriendsYet,
    noFriendsDescription,
    findFriends,
    inviteFriend,
    noFriendRequestsYet,
    noFriendRequestsDescription,
    inviteToResonate
  ],

  ta: [
    noFriendsYet,
    noFriendsDescription,
    findFriends,
    inviteFriend,
    noFriendRequestsYet,
    noFriendRequestsDescription,
    inviteToResonate
  ]
}

📣 Notifying maintainers per language:
Bengali (bn): @codealchemist007
Gujarati (gu): @4555jan
Hindi (hi): @M4dhav
Kannada (kn): @Charan-BS
Marathi (mr): @4555jan
Tamil (ta): @spinola103

Automated post-merge notice by Translation Notifier

@M4dhav
Copy link
Contributor

M4dhav commented Jan 24, 2026

Good work, thank you for the contribution

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

Labels

design enhancement New feature or request good first issue Good for newcomers RMC Remove Merge Conflicts, remove the merge conflicts caused by the previous merges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add UI for Friends & Friend Requests Pages

2 participants