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

feat: user profile page #394

Merged
merged 71 commits into from
Jun 18, 2024
Merged

feat: user profile page #394

merged 71 commits into from
Jun 18, 2024

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jun 6, 2024

Summary

Closes: #387

This PR is bigger than previous ones, due to including the whole feature in a single PR, instead of breaking them down in multiple PR like previously.

This feature introduce the "User" concept for real, with an usable User profile page, as well as editable profile details.

Changes

  • The profile link in the modal account is now redirecting to the user profile page, instead of etherscan

Screenshot 2024-06-11 at 01 09 58

  • User profile page now has content. As of now, it only show activities from onchains spaces, as offchain leaderboard is not ready yet

Screenshot 2024-06-11 at 01 10 43

  • User profile data are now editable (saved to offchain network), via the edit profile modal

Screenshot 2024-06-11 at 01 11 36

  • The user menu in the page top right is now showing the user's name (as set in the profile) when available
  • Offchain network is now the only source of truth for user metadata (name, about, avatar, etc ...)
  • UI wise, it follows the existing layout from Space overview for the header, and Leaderboard for the activity table, instead of following the figma, which is using different font/line weight and spacing, text alignment, etc ... for more consistency
  • Updating the user profile is done via alias, to avoid signing a transaction each time, similar to follow/unfollow space
  • Checking for profile will not fail if the user does not exist in the database, as long as the address is valid (since onchain users do not exist in the offchain database)
  • A new "Copy link" option has been added to the share dropdown, and has been extracted to its own component for reusability

Screenshot 2024-06-11 at 01 13 11

  • User profile page now have the sidebar from the "My" section (will have the "active" class only if it's your own profile)
  • "My" section sidebar does not require to be logged in anymore, and will display different content depending on connection status: only show "Explore" for guest user
  • UiInputStampCover component has been refactored to also support user cover
  • User cover will default to use the blur avatar when not set, similar to space

How to test

  1. Access your profile via the account modal
  2. It should show your profile
  3. You can edit your profile via the Edit profile modal
  4. Saving should ask for signing an alias if not already done, and just save, and does not ask for a signature.
  5. Your profile should be updated with the newly edited data

TODO

  • Code improvement
  • Fetch user cover from stamp (waiting for feat: add support for user cover stamp-labs/stamp#240) - wrong cover image may be shown until the pr is merged
  • Show user's username in topnav account menu
  • Support starknet user on offchain (will be added in another PR)
  • Get a better message for the social share

@wa0x6e wa0x6e changed the title fix: add user profile page to My sidebar feat: user profile page Jun 7, 2024
@wa0x6e wa0x6e marked this pull request as ready for review June 7, 2024 20:32
@wa0x6e wa0x6e requested a review from bonustrack June 8, 2024 18:10
@wa0x6e
Copy link
Contributor Author

wa0x6e commented Jun 11, 2024

@bonustrack WHen sharing the profile, what should the message be ?

@bonustrack
Copy link
Member

@wa0x6e It should be only the link

@wa0x6e wa0x6e requested a review from Sekhmet June 13, 2024 20:24
Copy link
Member

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

tACK

Copy link
Member

@Sekhmet Sekhmet left a comment

Choose a reason for hiding this comment

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

There is issue with message flashing when opening profiles of people that didn't create their user profile at the API yet.

apps/ui/src/components/ShareDropdown.vue Outdated Show resolved Hide resolved
apps/ui/src/components/UserCover.vue Outdated Show resolved Hide resolved
apps/ui/src/composables/useWeb3.ts Show resolved Hide resolved
apps/ui/src/helpers/utils.ts Outdated Show resolved Hide resolved
apps/ui/src/views/User.vue Outdated Show resolved Hide resolved
apps/ui/src/views/User.vue Outdated Show resolved Hide resolved
Copy link
Member

@Sekhmet Sekhmet left a comment

Choose a reason for hiding this comment

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

tACK

@Sekhmet Sekhmet merged commit bc7102e into master Jun 18, 2024
3 checks passed
@Sekhmet Sekhmet deleted the feat-387-user-profile branch June 18, 2024 15:28
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.

feat: user profile
3 participants