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: vertical navbar #1120

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

admsk2
Copy link

@admsk2 admsk2 commented Jul 11, 2024

Ticket:
https://lifi.atlassian.net/browse/LF-8831?atlOrigin=eyJpIjoiMzNiZDVkMmNhYjI5NDViNjkzYjUxNGQ1MGVlODQ0NzIiLCJwIjoiaiJ9

Description:

  • vertical navbar added next to the widget container
  • horizontal navbar removed along with navbar blur
  • XP button in navbar, next to address (only connected wallet)

Copy link

vercel bot commented Jul 11, 2024

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

Name Status Preview Comments Updated (UTC)
jumper-exchange ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2024 11:35am

@admsk2 admsk2 marked this pull request as draft July 11, 2024 09:47
@admsk2 admsk2 added the feature This label will create a dedicated Feature environment label Jul 11, 2024
@admsk2 admsk2 added the WIP Work in Progress label Jul 11, 2024
@admsk2 admsk2 changed the title [WIP] feat: vertical navbar feat: vertical navbar Jul 11, 2024
>
{children}
</WidgetContainer>
{!isLearnPage && !hasTheme ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

we might want to change the location of the navbar component to the widget to avoid these booleans. What do you think @oktapodia ?

Copy link
Author

Choose a reason for hiding this comment

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

we can technically do it, although widget component will not be a single responsibility component then which is usually good

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's think about it later please because I am already changing a lot of structure in a PR soon, would love to avoid more conflicts than we will have

@@ -17,7 +17,7 @@ export const WidgetContainer = styled(Box, {
display: 'flex',
margin: '0 auto 24px',
overflow: !welcomeScreenClosed ? 'hidden' : 'inherit',
width: '100%',
width: 'auto',
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you have to put back to 'auto'? It make some themes bug.

Copy link
Author

Choose a reason for hiding this comment

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

so i have put the navbar next to the widget (wrapped together within <Stack> component) and when widget takes 100% width, then the navbar is being pushed out of the screen. If widget has to have 100% of the width, then the navbar has to be positioned absolute i guess

@admsk2 admsk2 removed the WIP Work in Progress label Jul 15, 2024
@admsk2 admsk2 marked this pull request as ready for review July 15, 2024 14:35
Copy link
Contributor

@oktapodia oktapodia left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +124 to +164
<Stack direction="row" spacing={2}>
<WalletMenuButton id="wallet-digest-button" onClick={handleXPClick}>
<Image
src={`https://effigy.im/a/${account?.address ?? 'jumper.eth'}.png`}
alt="Effigy Wallet Icon"
width={28}
height={28}
priority={false}
unoptimized={true}
style={{
borderRadius: '100%',
borderStyle: 'solid',
borderWidth: '2px',
borderColor:
theme.palette.mode === 'light'
? theme.palette.white.main
: alpha(theme.palette.white.main, 0.08),
}}
/>
{points === undefined ? (
<Skeleton
variant="text"
sx={{
fontSize: { xs: 24, sm: 24 },
minWidth: 25,
marginRight: 1.1,
marginLeft: 1.1,
}}
/>
</WalletMgmtBadge>
) : null}
<Typography
variant={'lifiBodyMediumStrong'}
width={'auto'}
marginRight={0.25}
marginLeft={0.75}
) : (
<Typography
variant={'lifiBodyMediumStrong'}
width={'auto'}
marginRight={1.1}
marginLeft={1}
>
{points}
</Typography>
)}
<XPIcon size={28} />
</WalletMenuButton>
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this whole section could become it´s own styled-component?

Copy link
Author

Choose a reason for hiding this comment

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

we can do it, but then i would create it's own styled-component for connected button as well; @tcheee what is your take here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This label will create a dedicated Feature environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants