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

Shadcn migration - desktop nav menu & search modal fixes #13647

Merged
merged 16 commits into from
Sep 10, 2024
Merged

Conversation

pettinarip
Copy link
Member

@pettinarip pettinarip commented Aug 15, 2024

Description

Styles the desktop nav menu using Tailwind & refactors the search modal logic.

@github-actions github-actions bot added the dependencies 📦 Changes related to project dependencies label Aug 15, 2024
Copy link

netlify bot commented Aug 15, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 154bc3c
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/66df217e8b4c6b0008da637f
😎 Deploy Preview https://deploy-preview-13647--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 36 (🔴 down 12 from production)
Accessibility: 92 (🔴 down 1 from production)
Best Practices: 89 (🔴 down 3 from production)
SEO: 92 (🔴 down 1 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Initial observations:

Animations are a bit more jumpy, and flashy... this could bother people with certain sensitivities. Recording shows production first, then PR:

Screen.Recording.2024-08-15.at.17.47.07.mov

Prod:
image
PR:
image

  • Gap is now present between the selected menu item and the next column, when before were connected
  • Search previously collapsed to the magnifying glass icon, while now it collapses to a box with just a keyboard command

src/components/Search/SearchButton.tsx Outdated Show resolved Hide resolved
@pettinarip
Copy link
Member Author

Animations are a bit more jumpy, and flashy... this could bother people with certain sensitivities. Recording shows production first, then PR:

@wackerow thanks for the early feedback. Good catch, didn't notice that while doing the transition, will take a look and see what Im missing.

  • Gap is now present between the selected menu item and the next column, when before were connected

Correct, I still need to implement this case.

  • Search previously collapsed to the magnifying glass icon, while now it collapses to a box with just a keyboard command

Good observation, I must have missed something here. Thanks

@pettinarip pettinarip marked this pull request as ready for review August 19, 2024 16:14
@wackerow
Copy link
Member

Awesome @pettinarip !

Screen.Recording.2024-08-20.at.10.34.14.mov
image

Tiny thing I'm noting, which I'll let @nloureiro or @konopkja weigh in on, where the background of the sub-section fades in, the parent/trigger background overlaps a little which didn't happen before. It's quick and subtle, just noting


Second thing, just noting we lost our "hover" styling for the magnifying glass / search component.

@pettinarip
Copy link
Member Author

@wackerow fixed the extra spacing on the open menus and fixed the hover colors for the search icon. Good eyes, thanks for the level of detail I was missing.

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

This looks great @pettinarip! Left a couple small comments, but don't see those as blockers to this PR (can be addresses separately).

Pulling in!

src/components/Nav/types.ts Show resolved Hide resolved
src/components/Nav/useNav.ts Show resolved Hide resolved
@@ -20,20 +22,12 @@ const DesktopNavMenu = ({ toggleColorMode }: DesktopNavMenuProps) => {
const { locale } = useRouter()
const languagePickerRef = useRef<HTMLButtonElement>(null)

const ThemeIcon = useColorModeValue(<MdBrightness2 />, <MdWbSunny />)
const ThemeIcon = useColorModeValue(MdBrightness2, MdWbSunny)
Copy link
Member

Choose a reason for hiding this comment

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

Not at all against this, but just noting an alternative way this can be done as we migrate to TW:

<MdBrightness2 className="dark:hidden" />
<MdWbSunny className="not-[dark]:hidden" />

Can see where both approaches could come in handy, not sure I have a strong preference or desire to standardize it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Great idea! I haven't thought about that option, I like the no-js dependency. I'll test it out and let you know.

@wackerow wackerow merged commit 1d4e2cc into dev Sep 10, 2024
8 of 10 checks passed
@wackerow wackerow deleted the shadcn-nav branch September 10, 2024 19:54
@corwintines corwintines mentioned this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 📦 Changes related to project dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants