Skip to content

feat(sra): Add QR Modal#322

Open
OmarBasem wants to merge 10 commits into
omar/token-dropdownfrom
omar/sra-qr
Open

feat(sra): Add QR Modal#322
OmarBasem wants to merge 10 commits into
omar/token-dropdownfrom
omar/sra-qr

Conversation

@OmarBasem

@OmarBasem OmarBasem commented Jul 13, 2026

Copy link
Copy Markdown
Member

Closes FS-2282

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
zerodev-signer-demo Ready Ready Preview, Comment Jul 20, 2026 8:17am

Request Review

@OmarBasem OmarBasem changed the title feat: qr feat(sra): Add QR Modal Jul 13, 2026
@OmarBasem OmarBasem self-assigned this Jul 13, 2026
@OmarBasem
OmarBasem requested a review from brtkx July 13, 2026 08:18
Comment thread packages/react-ui/package.json Outdated
},
"dependencies": {
"clsx": "^2.1.1",
"qrcode": "^1.5.4",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe we could use https://www.npmjs.com/package/uqr? It's more lightweight for what we're trying to do.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@brtkx good suggestion, swapped

@OmarBasem
OmarBasem force-pushed the omar/token-dropdown branch from 179f991 to cf04c8c Compare July 14, 2026 12:27
@OmarBasem
OmarBasem force-pushed the omar/token-dropdown branch from cf04c8c to d10bcf1 Compare July 14, 2026 12:37
@OmarBasem
OmarBasem force-pushed the omar/token-dropdown branch from d10bcf1 to e7f7f94 Compare July 14, 2026 13:11
@OmarBasem
OmarBasem force-pushed the omar/token-dropdown branch from e7f7f94 to 252b392 Compare July 14, 2026 13:19
@OmarBasem
OmarBasem force-pushed the omar/token-dropdown branch from 252b392 to ec6950c Compare July 15, 2026 05:36
@OmarBasem
OmarBasem force-pushed the omar/token-dropdown branch from ec6950c to 1c0851b Compare July 15, 2026 05:45
@OmarBasem
OmarBasem force-pushed the omar/token-dropdown branch from 1c0851b to 45a13b3 Compare July 15, 2026 13:29
@OmarBasem
OmarBasem force-pushed the omar/token-dropdown branch from 45a13b3 to 3c63b2d Compare July 15, 2026 13:39
@@ -0,0 +1,77 @@
import * as Dialog from '@radix-ui/react-dialog'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reusable bottom sheet

@brtkx brtkx Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice looking good! A few changes I'd make here to make it even smoother:

export const Sheet = Dialog.Root
export const SheetClose = Dialog.Close

export function SheetTitle({ className, ...props }: SheetTitleProps) {
  return <Dialog.Title className={cn('zd:sr-only', className)} {...props} />
}

Rename this:

SheetShell -> SheetContent

And remove this line:

<Dialog.Root open={open} onOpenChange={onOpenChange}>

With this alone we can get rid of all the props, except for children and className. The consumer passes open state to Sheet itself. The consumer looks something like this:

<Sheet open={isOpen}>
  <SheetContent>
    <SheetTitle>{title}</SheetTitle >
    {content}
    // If need a close button
    <SheetClose asChild>
      <Button text="Cancel" />
    </SheetClose>
  <SheetContent /> 
</Sheet>

So I'd drop Shell from the name IMO, was my initial suggestion but I think Sheet is enough.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Refactored

OmarBasem added 10 commits July 20, 2026 11:57
# Conflicts:
#	apps/zerodev-signer-demo/package.json

# Conflicts:
#	packages/smart-routing-address-react-ui/src/pages/Deposit.tsx

# Conflicts:
#	pnpm-lock.yaml
# Conflicts:
#	packages/react-ui/package.json
#	packages/react-ui/src/index.ts
#	pnpm-lock.yaml

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd just make the name future-proof and call it a Sheet. So for example, in the future we can do side: 'bottom' | 'right' without introducing breaking changes.

Also we call it BottomSheet but export components like SheetClose, SheetTitle. So there's already an inconsistency we could resolve by Sheet only.

@brtkx brtkx Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd just keep it in the SRA package. We can't reuse it anywhere else - its content/layout is only relevant to SRA.

Maybe we will be able to do something with it in the future. But going forward when it comes to non-primitive components, even if we have duplicates for a bit, it's much better than early abstractions.

also nit: probs could name it QrSheet since we make a distinction between the two; and it's using Sheet

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