Skip to content

doc(docs): add brand assets context menu#1406

Open
TheOrcDev wants to merge 3 commits into
nextfrom
feature/brand-assets-dropdown
Open

doc(docs): add brand assets context menu#1406
TheOrcDev wants to merge 3 commits into
nextfrom
feature/brand-assets-dropdown

Conversation

@TheOrcDev
Copy link
Copy Markdown
Collaborator

Summary

  • add a Radix/shadcn context menu to copy nuqs brand SVG assets from the docs wordmark
  • add a separated download action that zips all SVGs from packages/res in-browser
  • wire sonner toasts without adding next-themes directly

Test

  • pnpm --filter docs test

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

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

Project Deployment Actions Updated (UTC)
nuqs Ready Ready Preview, Comment May 20, 2026 3:49pm

Request Review

@TheOrcDev
Copy link
Copy Markdown
Collaborator Author

hm I see I have ❌ Version Bump Check Failed

is it needed for docs too @franky47 ?

@TheOrcDev TheOrcDev changed the title feat(docs): add brand assets context menu doc: add brand assets context menu May 20, 2026
@franky47
Copy link
Copy Markdown
Member

Yeah the feat/fix prefixes only apply to library code and control the version bump by semantic-release. Everything else is a doc/chore/etc.

const copyAsset = async (asset: BrandAsset) => {
const copied = await copyText(asset.svg)
if (copied) {
toast.success(`${asset.toastLabel} copied`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

suggestion: could we show a check icon inline in the menu to indicate the copy?

For a couple of reasons:

  • It keeps the behaviour colocated with the control
  • It avoids pulling in sonner as a dependency

The downside is we have to reserve a place for the checkmark to be displayed (could be overlaid on the left icon?) and it requires keeping the popup open. Maybe too many trade-offs.

What do you think?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah we could put a ghost button on the right side with copy icon that transforms to check to make it more obvious that it is clickable.

Let me see how it looks

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added button!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perfect, we can remove the toast & sonner then.

svg: string
}

const assetsDir = path.resolve(process.cwd(), '../res')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

note: I'll have to make sure this works after ISR, Vercel is/was having issues with relative paths in the ISR lambda:

https://francoisbest.com/posts/2023/reading-files-on-vercel-during-nextjs-isr

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Roger that!

@TheOrcDev TheOrcDev changed the title doc: add brand assets context menu doc(docs): add brand assets context menu May 20, 2026
const copyAsset = async (asset: BrandAsset) => {
const copied = await copyText(asset.svg)
if (copied) {
toast.success(`${asset.toastLabel} copied`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perfect, we can remove the toast & sonner then.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants