Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Title: Feat: Add comprehensive user profile page
Overview
This pull request introduces a new, feature-rich user profile page (profile.html) that allows logged-in users to view and manage their personal fitness information. This feature enhances the user experience by providing a centralized dashboard for tracking progress and updating details, making the application feel more personalized and interactive.
The implementation continues to use the simple and reliable localStorage system, ensuring the new features work without requiring external services or complex setup.
Key Features Implemented
User Details Display:
The page dynamically displays the user's name, email, and a profile picture.
It also shows mock data for membership type and status (e.g., "Yearly Plan - Active").
Editable Information:
Users can now edit their display name directly on the profile page.
Users can also edit their contact number and fitness goal. Changes are saved and persist across sessions.
Fitness Tracking:
Weight/BMI Tracking: Users can add new weight entries, which are displayed in a reverse chronological list.
Workout History: Users can log their workouts (e.g., "Chest Day"), which are also displayed in a historical list.
Seamless Integration:
The index.html navigation bar has been updated to link directly to this new profile page when a user is logged in.
The page is fully themed to match the existing design of the website.
How to Test
Log in to the application via the login.html page.
On the index.html homepage, click on your "Welcome, [username]!" message in the navigation bar.
You should be redirected to the new profile.html page.
Verify that your name, email, and default profile data are displayed correctly.
Click the "Edit" button next to your name, change it, and click "Save". Verify the name updates.
Click the "Edit" button in the "Personal Information" section, change the contact number and goal, and click "Save". Verify the information updates.
Add a new entry to the "Weight / BMI Tracking" and "Workout History" sections and verify they appear at the top of their respective lists.
Navigate back to the homepage and verify your (potentially new) name is still displayed correctly.
This PR adds significant value to the user experience and provides a solid foundation for future profile-related features.