Skip to content

[SSF-166] profile page#131

Merged
amywng merged 10 commits intomainfrom
acw/SSF-166-initial-profile-page
Mar 22, 2026
Merged

[SSF-166] profile page#131
amywng merged 10 commits intomainfrom
acw/SSF-166-initial-profile-page

Conversation

@amywng
Copy link
Member

@amywng amywng commented Mar 16, 2026

ℹ️ Issue

Closes SSF-166

📝 Description

  • created profile page components under frontend/src/components/profile
  • added profilePage in frontend/src/containers, route to app.tsx (http://localhost:4200/profile), and link to profile page in homepage
  • changed getMyId to return whole User object from req
  • added getInitials utils function
  • changed update user role to update user in apiClient (which should work once [SSF-102] Add endpoints to update user info #79 goes in)

✔️ Verification

verified pages render properly for different roles and changed tests pass
Screenshot 2026-03-16 at 9 21 39 AM
Screenshot 2026-03-16 at 9 21 52 AM
Screenshot 2026-03-16 at 9 22 07 AM
Screenshot 2026-03-16 at 9 22 29 AM

@dburkhart07 dburkhart07 self-requested a review March 17, 2026 04:00
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

some very small things. amazing initial pass! 😴 👎

if (isLoading) {
return (
<Center minH="100vh">
<Spinner />

Choose a reason for hiding this comment

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

Note to @sam-schu and @Yurika-Kan: I've noticed the usage of the isLoading + Spinner combo has been used pretty inconsistently throughout the app. We have a lot of attributes that make API calls and could use an isLoading attribute, for a potential future cleanup ticket. We should decide though whether we want to make most API calls like this utilize a loader, or just not use it at all.

@amywng amywng requested a review from dburkhart07 March 18, 2026 14:56
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

Correct me if I'm wrong, but I feel like this whole profile system is unnecessarily abstracted, to the point where it just feels kinda hard to read and work with for future changes we may make. Could we just have this structure instead:

profilePage.tsx: General wrapper that has the "Profile" header at the top, and then calls components profileLeftPanel, and profileAccountInfo components.

profileLeftPanel: Can keep as is

profileAccountInfo: Should have the info of both the account and layout, with all the saving and editing functionality. Passing the editing function as a prop seems somewhat extra, and I feel like we could easily just keep track of a simple useState editing or not in this component. The saving functionality I get since we need to fetch them again, but the editing seems over-abstracted. With that, I also feel like we really only need 1 component, and should be able to merge profileAccountInfo and profileLayout together.

lmk if u disagree ✂️

Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

I am also getting an error when saving changes that I edit:
Cannot read properties of undefined (reading 'label')

Can you look into this?

Looking great so far! Everything feels so much cleaner now 😋 🚗 💸 👎

@amywng amywng requested a review from dburkhart07 March 20, 2026 22:03
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

small things so imma trust to approve. we are so back! 💃 8️⃣ 0️⃣

Copy link
Collaborator

@Yurika-Kan Yurika-Kan left a comment

Choose a reason for hiding this comment

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

good stuff!!!!

small nits but lgtm

so exciting to have profile pages ~ thank you amy!

@amywng amywng requested a review from Yurika-Kan March 22, 2026 14:58
Copy link
Collaborator

@Yurika-Kan Yurika-Kan left a comment

Choose a reason for hiding this comment

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

LGTMMM thank youuu

@amywng amywng merged commit 4b69a6b into main Mar 22, 2026
4 checks passed
@amywng amywng deleted the acw/SSF-166-initial-profile-page branch March 22, 2026 15:09
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.

3 participants