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

Implement profile page #117

Merged
merged 25 commits into from
Jan 19, 2024
Merged

Implement profile page #117

merged 25 commits into from
Jan 19, 2024

Conversation

raymosun
Copy link
Contributor

@raymosun raymosun commented Jan 8, 2024

Info

Closes #29

Description

Implements the user profile page.

Note: the original profile page branch died and wouldn't deploy, possibly because it's too old or something 🤷

Changes

  • /profile redirects to /u/[user_handle]
  • Creates the UserProfilePage component which renders a user profile page
  • Creates the HandleNotFound component which tells users a handle does not exist
  • Creates a new page at /u/[handle] which retrieves the current user, the handle's user, and their attendances, then renders the correct component
  • Updates the utils.js functions getUserRank() and hashUser() with their real functionality
  • Creates the GifSafeImage component which automatically makes next/image Images unoptimized when src is a gif
  • Side effect: deleted width and height attributes from some svgs so they can be used at different sizes on this PR; existing usages have (hopefully) all been updated to manually set the size
  • /constants/majors.json refactored to a .ts file

Type of Change

  • Bug Fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • Logistics Change (A change to a README, description, or dev workflow setup like
    linting/formatting)
  • Continuous Integration Change (Related to deployment steps or continuous integration
    workflows)
  • Other: (Fill In)

Testing

I have tested that my changes fully resolve the linked issue ...

  • locally on Desktop.
  • locally on mobile - use https://ngrok.io to get a copy on a mobile device
  • on the live deployment preview on Desktop.
  • on the live deployment preview on Mobile.
  • I have run and passed all new and existing Cypress tests. Add screenshots below.

Checklist

  • I have performed a self-review of my own code.
  • I have followed the style guidelines of this project.
  • I have documented my code's src/lib functions and commented hard to understand areas
    anywhere else.
  • My changes produce no new warnings.

Screenshots

desktop- own profile - light mode
image

desktop- other's profile - light mode
image

mobile - other's profile - dark mode
image

handle not found - dark mode
image

Copy link

vercel bot commented Jan 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
membership-portal-ui-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 19, 2024 5:31am

@farisashai
Copy link
Member

I would remove the edit button in the about section since it goes to the same place

@raymosun raymosun mentioned this pull request Jan 8, 2024
15 tasks
@farisashai
Copy link
Member

farisashai commented Jan 8, 2024

image

This incentive seems personal so it's strange to see it on someone else's profile. I think we should hide it if they're not viewing their own

Can you also add more gap above the text and left align it

@farisashai
Copy link
Member

image

More gap between the rank and points

Also specify "x All-Time Leaderboard Points"

@farisashai
Copy link
Member

image

Hide the div for social media links if it's empty

@farisashai
Copy link
Member

Fun challenge for later: customizing the pink background per user so everyone's looks different

my idea was that you take their past attendances and proportionally use each of the community colors that they're engaged with in some kind of randomly generated blobs or patterns so the background represents them and it could change every time they attend a new event

Copy link
Member

@farisashai farisashai left a comment

Choose a reason for hiding this comment

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

left some visual nits as comments in addition to these code comments. code looks excellent very clean and readable and the page also looks great excellent work 🤩

src/components/profile/UserProfilePage/index.tsx Outdated Show resolved Hide resolved
src/components/profile/UserProfilePage/index.tsx Outdated Show resolved Hide resolved
src/components/profile/UserProfilePage/index.tsx Outdated Show resolved Hide resolved
src/components/profile/index.ts Outdated Show resolved Hide resolved
src/lib/utils.ts Outdated Show resolved Hide resolved
src/pages/profile.tsx Outdated Show resolved Hide resolved
src/pages/u/[handle].tsx Outdated Show resolved Hide resolved
src/pages/u/[handle].tsx Outdated Show resolved Hide resolved
@raymosun
Copy link
Contributor Author

raymosun commented Jan 9, 2024

image

This incentive seems personal so it's strange to see it on someone else's profile. I think we should hide it if they're not viewing their own

Can you also add more gap above the text and left align it

Have you seen the version on other profiles that uses their name instead of "My Progress"? I think it doesn't feel too weird and helps the page not feel so empty.
image

@raymosun
Copy link
Contributor Author

raymosun commented Jan 9, 2024

I would remove the edit button in the about section since it goes to the same place

Messing with having the the second edit button link to directly editing the 'About me' section, thoughts?

@raymosun
Copy link
Contributor Author

Implemented some changes in latest commit 8a0198f but I want to update icons also soon

src/pages/events.tsx Outdated Show resolved Hide resolved
Copy link
Member

@farisashai farisashai left a comment

Choose a reason for hiding this comment

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

couple of tiny nits but amazing work overall 🎉 code quality is very clean and thoughtful and the UI is in great shape

cypress/e2e/pages/edit-profile.cy.ts Outdated Show resolved Hide resolved
cypress/support/commands.ts Show resolved Hide resolved
src/pages/u/[handle].tsx Outdated Show resolved Hide resolved
src/components/profile/UserProfilePage/index.tsx Outdated Show resolved Hide resolved
@farisashai
Copy link
Member

Closes #33

@farisashai farisashai linked an issue Jan 12, 2024 that may be closed by this pull request
@raymosun raymosun merged commit de359ef into main Jan 19, 2024
5 checks passed
@raymosun raymosun deleted the raymond/user-profile-ii branch January 19, 2024 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show Recently Attended Events On User Profiles Create User Profile Page
4 participants