-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Shadcn migration - mobile menu #13449
Conversation
7bdd73a
to
eba5968
Compare
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pettinarip Overall looks good! Left one comment which appears to be a visual regression. If we patch that I think this is ready to be pulled in.
strokeWidth="2px" | ||
display="inline-block" | ||
stroke="currentColor" | ||
className="relative inline-block h-6 w-6 stroke-current stroke-2 group-hover:text-primary-hover" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this is prod:
https://github.com/user-attachments/assets/d223a229-0c69-46a9-ad9a-efa5226c2656
Edit: in the video you can see that we have a hover style on the icon.
Anyway, now that I think, it doesn't really matter, this is a mobile only menu where we are not going to have hover events. So, happy to remove it to make it cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Hm.. On production I'm seeing this effect only in nested menus that have been closed after opening (the + ends up colored). I suspect that is a design bug to begin with, with the intended effect being no colored svg's throughout (the svg shape change and menu folding/unfolding is enough of an effect)
With this PR, once a menu is activated, there is always one of these svg icons in primary color. And note on mobile "hover", it does change color when I tap on a menu, and doesn't go away when I lift my finger (Safari, iOS):
RPReplay_Final1722975035.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nit-picky though, and as I noted, I think there is an inconsistency we could work out on the side anyways to polish up that particular styling, and don't see it as a blocker to this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @pettinarip! Left a couple comments but going to pull this in
strokeWidth="2px" | ||
display="inline-block" | ||
stroke="currentColor" | ||
className="relative inline-block h-6 w-6 stroke-current stroke-2 group-hover:text-primary-hover" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Hm.. On production I'm seeing this effect only in nested menus that have been closed after opening (the + ends up colored). I suspect that is a design bug to begin with, with the intended effect being no colored svg's throughout (the svg shape change and menu folding/unfolding is enough of an effect)
With this PR, once a menu is activated, there is always one of these svg icons in primary color. And note on mobile "hover", it does change color when I tap on a menu, and doesn't go away when I lift my finger (Safari, iOS):
RPReplay_Final1722975035.mp4
strokeWidth="2px" | ||
display="inline-block" | ||
stroke="currentColor" | ||
className="relative inline-block h-6 w-6 stroke-current stroke-2 group-hover:text-primary-hover" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nit-picky though, and as I noted, I think there is an inconsistency we could work out on the side anyways to polish up that particular styling, and don't see it as a blocker to this PR.
1: { | ||
subtext: isLight ? "text-gray-400" : "text-gray-400", | ||
background: isLight ? "bg-white" : "bg-black", | ||
activeBackground: isLight ? "bg-gray-150" : "bg-gray-700", | ||
}, | ||
2: { | ||
subtext: isLight ? "text-gray-400" : "text-gray-300", | ||
background: isLight ? "bg-gray-150" : "bg-gray-700", | ||
activeBackground: isLight ? "bg-gray-200" : "bg-gray-600", | ||
}, | ||
3: { | ||
subtext: isLight ? "text-gray-500" : "text-gray-300", | ||
background: isLight ? "bg-gray-200" : "bg-gray-600", | ||
activeBackground: isLight ? "bg-gray-100" : "bg-gray-700", | ||
}, | ||
4: { | ||
subtext: isLight ? "text-gray-700" : "text-gray-300", | ||
background: isLight ? "bg-gray-300" : "bg-gray-700", | ||
activeBackground: isLight ? "bg-gray-200" : "bg-gray-800", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we want to tackle with this PR, but ideally we extract these as css variables in global.css
—one under :root
and one under [data-theme="dark"]
for each with the same name, then add these as tokens in tailwind.config.ts
.
I'm working on theming separately, so happy to just handle this as part of that process.
Description
Mobile menu implementation using Shadcn.
Related Issue
Depends on #13411 and #13419