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: improving profile section #247

Merged
merged 6 commits into from
Oct 19, 2023
Merged

Conversation

Marchand-Nicolas
Copy link
Collaborator

close: #165 close: #225

@vercel
Copy link

vercel bot commented Oct 14, 2023

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

Name Status Preview Comments Updated (UTC)
goerli-starknet-quest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2023 4:40pm
starknet-quest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2023 4:40pm

Copy link
Contributor

@fricoben fricoben left a comment

Choose a reason for hiding this comment

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

Some changes especially on the Popup, I didn't see it before (sorry) but we need to keep our use of meterial UI modal.

buttonName,
onClick,
children,
bottomContent = null,
onClose,
}) => {
return (
<div className={styles.popupContainer}>
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to use the modal from Material UI as in wallets for example.

Because with your current custom modal some things doesn't work (like if I click outside of the modal it doesn't close), sometimes the navbar goes on top of it ...

Considering that we're using the Material Ui modal everywhere on app.starknet.id but also here, I think you should use it.

components/UI/menus/bannerPopup.tsx Show resolved Hide resolved
{typeof addressOrDomain === "string" &&
isHexString(addressOrDomain)
? minifyAddressWithChars(addressOrDomain, 8)
: minifyAddressWithChars(identity?.addr, 8)}
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the goal of that ? We can make a function ? Move it to utils stringService and test it ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It checks if addressOrDomain is an address, if so it minifies it. Else, it gets the address from the identity and minifies it. But I don't know why we don't simply directly minify the address from the identity

@fricoben fricoben added ❌ Change request Change requested from reviewer and removed 🔥 Ready for review This pull request needs a review labels Oct 15, 2023
Copy link
Contributor

@fricoben fricoben left a comment

Choose a reason for hiding this comment

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

Almost there, You have some code changes and on the front we have the following.

Make the social smaller, less gap between each icon and more space between the icon part and the share button (like in the figma).

Capture d’écran 2023-10-17 à 12 09 58

Add more space to the achievement section (the goal of this refactoring was to add this space)

Capture d’écran 2023-10-17 à 12 10 16

@@ -89,3 +89,16 @@ export function numberToString(element: number | undefined): string {
export function convertNumberToFixedLengthString(number: string): string {
return number.padStart(12, "0");
}

export function minifyAddressFromStrings(
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to test this function on stringService.test.js

Here is a way to do it using chat gpt.

https://app.skiff.com/file/8282cddd-9cd9-420c-a636-f2d81aec00c3

@@ -235,59 +239,74 @@ const AddressOrDomain: NextPage = () => {
title={identity?.domain ?? minifyAddress(identity.addr)}
isUppercase={true}
content={
<div className={styles.nameCard}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we put all the content in the ProfileCard component directly? Will we use this profile elsewhere? if not I think we can put it directly in because it's cleaner imo

@fricoben fricoben added ❌ Change request Change requested from reviewer and removed 🔥 Ready for review This pull request needs a review labels Oct 17, 2023
Copy link
Contributor

@fricoben fricoben left a comment

Choose a reason for hiding this comment

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

lgtm

@fricoben fricoben merged commit 1245471 into testnet Oct 19, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔥 Ready for review This pull request needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restructuring the social networks Share profil
2 participants