Skip to content
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

Enhance user profile navigation and details #454

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DonnieBLT
Copy link
Collaborator

@DonnieBLT DonnieBLT commented Oct 16, 2024

Fixes #391

Add functionality to surf other user profiles and update user profile details.

  • User Profile Page (lib/src/pages/home/profile.dart)

    • Add a new constructor parameter user to the UserProfile class to accept a User object.
    • Update the getProfilePicture, build, and initState methods to use the user parameter instead of currentUser.
    • Update various UI elements to display the user details instead of currentUser.
  • Global Leaderboard Page (lib/src/pages/leaderboards/global_leaderboard.dart)

    • Update the ListTile widget to include an onTap callback that navigates to the UserProfile page with the selected user.
  • Monthly Leaderboard Page (lib/src/pages/leaderboards/monthly_leaderboard.dart)

    • Update the ListTile widget to include an onTap callback that navigates to the UserProfile page with the selected user.
  • Issue Detail Page (lib/src/pages/issues/issue_detail.dart)

    • Update the Markdown widget to include an onTapLink callback that navigates to the UserProfile page with the selected user.
  • State Provider (lib/src/pages/sizzle/sizzle_state_provider.dart)

    • Add a new StateProvider<User?> to store the selected user for profile navigation.

For more details, open the Copilot Workspace session.

Fixes #391

Add functionality to surf other user profiles and update user profile details.

* **User Profile Page (`lib/src/pages/home/profile.dart`)**
  - Add a new constructor parameter `user` to the `UserProfile` class to accept a `User` object.
  - Update the `getProfilePicture`, `build`, and `initState` methods to use the `user` parameter instead of `currentUser`.
  - Update various UI elements to display the `user` details instead of `currentUser`.

* **Global Leaderboard Page (`lib/src/pages/leaderboards/global_leaderboard.dart`)**
  - Update the `ListTile` widget to include an `onTap` callback that navigates to the `UserProfile` page with the selected user.

* **Monthly Leaderboard Page (`lib/src/pages/leaderboards/monthly_leaderboard.dart`)**
  - Update the `ListTile` widget to include an `onTap` callback that navigates to the `UserProfile` page with the selected user.

* **Issue Detail Page (`lib/src/pages/issues/issue_detail.dart`)**
  - Update the `Markdown` widget to include an `onTapLink` callback that navigates to the `UserProfile` page with the selected user.

* **State Provider (`lib/src/pages/sizzle/sizzle_state_provider.dart`)**
  - Add a new `StateProvider<User?>` to store the selected user for profile navigation.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/OWASP-BLT/BLT-Flutter/issues/391?shareId=XXXX-XXXX-XXXX-XXXX).
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.

Show more details of user in user profile section let users also surf other user profiles
1 participant