Skip to content

Conversation

@PrabuckiDominik
Copy link
Collaborator

No description provided.

@PrabuckiDominik PrabuckiDominik linked an issue Jul 30, 2025 that may be closed by this pull request
@PrabuckiDominik PrabuckiDominik marked this pull request as ready for review July 31, 2025 04:06
@PrabuckiDominik PrabuckiDominik requested a review from Copilot July 31, 2025 11:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements profile details functionality, allowing users to view profile pages for other users. The implementation includes new UI components, data layer changes to support fetching user profiles by ID, and refactoring existing profile widgets to support both self and other-user profiles.

  • Adds profile details page with user navigation from event author tiles
  • Refactors profile widgets to accept user data as parameters instead of relying on provider state
  • Implements new data layer methods for fetching user profiles by ID

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/src/shared/domain/models/event_owner.dart Adds id getter to EventOwner interface
lib/src/shared/domain/models/user_model.dart Adds @OverRide annotation for id property
lib/src/shared/domain/models/organization_model.dart Adds @OverRide annotation for id property
lib/src/features/profile/presentation/widgets/profile_stats.dart Refactors to accept User parameter instead of using provider
lib/src/features/profile/presentation/widgets/profile_info_content.dart Refactors to accept User and editable parameters
lib/src/features/profile/presentation/widgets/profile_info_card.dart Refactors to accept User parameter and removes provider dependency
lib/src/features/profile/presentation/widgets/profile_header.dart Removes unused ProfileHeader widget
lib/src/features/profile/presentation/widgets/profile_details/profile_details_header.dart Adds new header component for profile details
lib/src/features/profile/presentation/widgets/profile_details/profile_details_events.dart Adds new events component for profile details
lib/src/features/profile/presentation/providers/user_profile_by_id_provider.dart Adds provider for fetching user profiles by ID
lib/src/features/profile/presentation/providers/profile_details_user_provider.dart Adds state provider for profile details user
lib/src/features/profile/presentation/providers/profile_details_controller_provider.dart Adds controller provider for profile details
lib/src/features/profile/presentation/providers/profile_controller_provider.dart Adds init provider for profile initialization
lib/src/features/profile/presentation/pages/profile_page.dart Updates to use new async initialization pattern
lib/src/features/profile/presentation/pages/profile_details_page.dart Adds new profile details page
lib/src/features/profile/presentation/controllers/profile_details_controller.dart Adds controller for profile details functionality
lib/src/features/profile/presentation/controllers/profile_controller.dart Adds loadUser method
lib/src/features/profile/domain/usecases/get_user_profile_usecase.dart Adds use case for fetching user profiles by ID
lib/src/features/profile/domain/repositories/profile_repository.dart Adds getUserProfile method to repository interface
lib/src/features/profile/domain/providers/get_user_profile_usecase_provider.dart Adds provider for getUserProfile use case
lib/src/features/profile/data/repositories/remote_profile_repository.dart Implements getUserProfile method
lib/src/features/profile/data/data_sources/profile_data_source.dart Adds API call for getUserProfile
lib/src/features/event/presentation/widgets/event_data_time_row.dart Adds text overflow handling
lib/src/features/event/presentation/widgets/event_card.dart Improves layout with width constraints
lib/src/features/event/presentation/widgets/event_author_tile.dart Adds navigation to profile details
lib/src/features/auth/presentation/controllers/auth_controller.dart Updates profile user provider on auth state changes
lib/src/core/routes/app_routes.dart Adds profile details route
lib/src/core/presentation/app_initializer.dart Registers profile details page route
lib/l10n/app_pl.arb Adds Polish localization for error message
lib/l10n/app_en.arb Adds English localization for error message
Comments suppressed due to low confidence (1)

label: localizations.followingCount,
value: user.followingCount,
),
const SizedBox(height: 16),
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

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

A SizedBox with height is being used inside a Row widget. Row widgets arrange children horizontally, so height spacing is not appropriate here. This should likely be a SizedBox with width instead, or this spacing should be moved outside the Row.

Suggested change
const SizedBox(height: 16),
const SizedBox(width: 16),

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +35

}
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

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

The loadUserById method sets _isLoading to true but never sets it back to false. This will cause the loading state to persist indefinitely. Add _isLoading = false; notifyListeners(); before the method ends.

Suggested change
}
} finally {
_isLoading = false;
notifyListeners();
}
}

Copilot uses AI. Check for mistakes.
Widget build(BuildContext context, WidgetRef ref) {
final userId = ModalRoute.of(context)!.settings.arguments as int;
final topPadding = MediaQuery.of(context).padding.top;
final localization = AppLocalizations.of(context)!.failedToLoadUserProfile;
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

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

The localization variable is assigned the specific error message string rather than the AppLocalizations object. This is inconsistent with usage elsewhere in the codebase and makes the variable name misleading. Consider renaming to errorMessage or assign the full AppLocalizations object.

Suggested change
final localization = AppLocalizations.of(context)!.failedToLoadUserProfile;
final errorMessage = AppLocalizations.of(context)!.failedToLoadUserProfile;

Copilot uses AI. Check for mistakes.
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.

Profile details

2 participants