Skip to content

Conversation

@AmirAliAzimloo
Copy link

@AmirAliAzimloo AmirAliAzimloo commented Dec 23, 2025

Implements logo and wordmark download functionality as described in this issue.

Changes :

  • Added download logic for both logo and wordmark assets.
  • Implemented support for PNG and SVG formats.
  • Added light and dark theme variants.
  • Verified functionality across Chrome and Safari browsers.

Closes #1253.

@vercel
Copy link

vercel bot commented Dec 23, 2025

@AmirAliAzimloo is attempting to deploy a commit to the 47ng Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Dec 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nuqs Ready Ready Preview, Comment Jan 2, 2026 4:21pm

@franky47 franky47 added the documentation Improvements or additions to documentation label Dec 23, 2025
Copy link
Member

@franky47 franky47 left a comment

Choose a reason for hiding this comment

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

Thanks, could you break down the download code into dedicated functions outside the component body please? This makes a huge wall of text that's hard to maintain.

githubUrl: 'https://github.com/47ng/nuqs',
nav: {
title: <NuqsWordmark className="ml-2 text-xl" />,
title: <NuqsWordmark className="ml-2 text-xl" hasDownloader={true} />,
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: use a shorthand boolean here

Suggested change
title: <NuqsWordmark className="ml-2 text-xl" hasDownloader={true} />,
title: <NuqsWordmark className="ml-2 text-xl" hasDownloader />,


const handleCopyLogoSvg = async () => {
try {
const textPromise = fetch(LOGO_ADDRESS_URL).then(response =>
Copy link
Member

Choose a reason for hiding this comment

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

note: We could get the SVG text in a server component, pass the Promise of its contents down to the client component and consume it with use, no need for a runtime fetch here.

@franky47 franky47 changed the title feat: implement logo downloader logic and structure doc: allow downloading wordmark & logo assets on right-click Dec 23, 2025
@AmirAliAzimloo
Copy link
Author

@franky47 Hi, I’ve completed all the requested changes. When you have a moment, could you please review them again? Thanks.

className="fixed z-50"
style={{ left: position.x, top: position.y }}
>
<div className="w-[240px] overflow-hidden rounded-xl border border-gray-200/80 bg-white shadow-xl backdrop-blur-sm dark:bg-black">
Copy link
Member

Choose a reason for hiding this comment

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

issue: The border-gray-200/80 gives a hard border in dark mode, use border-border/80 for a better effect.

Image

Comment on lines 103 to 104
const computedStyle = window.getComputedStyle(originalPath)
const fillColor = computedStyle.fill
Copy link
Member

Choose a reason for hiding this comment

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

note: Somehow this returns colors in rgb(rrr, ggg, bbb), is there a way to output them as hex instead (more compact) ?

}

export const handleCopyWordmarkPng = async () => {
const wordmark = document.getElementById(
Copy link
Member

Choose a reason for hiding this comment

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

issue: One problem with going via the DOM is that we get different results whether we use this menu in light mode or dark mode.

While it might make sense, I don't think it's intuitive that you need to change the whole site's theme to get a different result.

suggestion: We should have light & dark variants for both SVG & PNG (I have added /ico.dev.svg for the light version of the logo).

'use client'

import { FC, use, useCallback, useEffect, useRef, useState } from 'react'
import { SiGooglephotos, SiSvg } from '@icons-pack/react-simple-icons'
Copy link
Member

@franky47 franky47 Jan 2, 2026

Choose a reason for hiding this comment

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

issue: The google photos icon doesn't work here, could we use the Image icon from lucide instead?

Same for SVG, I don't think a lot of people know the official SVG icon. A double chevron (code from lucide) might work better.

ref={menuRef}
className="fixed z-50"
style={{ left: position.x, top: position.y }}
>
Copy link
Member

Choose a reason for hiding this comment

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

issue: We should use shadcn for custom UI components, as they are accessible by design (arrow navigation & focus management) and follow the design system.

https://ui.shadcn.com/docs/components/dropdown-menu

@AmirAliAzimloo
Copy link
Author

@franky47 Thanks, dear. I implemented the code structure and logic based on our discussion above. Could you please review them? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "copy wordmark & resources" on right-clicking the logo in the docs

2 participants