Skip to content

feat(react-ui): SelectDropdown component#321

Open
OmarBasem wants to merge 6 commits into
mainfrom
omar/token-dropdown
Open

feat(react-ui): SelectDropdown component#321
OmarBasem wants to merge 6 commits into
mainfrom
omar/token-dropdown

Conversation

@OmarBasem

@OmarBasem OmarBasem commented Jul 10, 2026

Copy link
Copy Markdown
Member

Closes FS-2398

@vercel

vercel Bot commented Jul 10, 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 17, 2026 7:46am

Request Review

@OmarBasem OmarBasem changed the title feat: SelectDropdown feat(react-ui): SelectDropdown component Jul 10, 2026
@OmarBasem OmarBasem self-assigned this Jul 10, 2026
@OmarBasem
OmarBasem marked this pull request as draft July 10, 2026 08:17
@OmarBasem OmarBasem changed the title feat(react-ui): SelectDropdown component feat(sra): SelectDropdown component Jul 10, 2026
@OmarBasem OmarBasem changed the title feat(sra): SelectDropdown component feat(react-ui): SelectDropdown component Jul 10, 2026
@OmarBasem
OmarBasem marked this pull request as ready for review July 10, 2026 09:38
@OmarBasem
OmarBasem requested a review from brtkx July 10, 2026 09:40
@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-list-item branch from 809972b to 72405d7 Compare July 14, 2026 12:27
@OmarBasem
OmarBasem force-pushed the omar/token-list-item branch from 72405d7 to dd32b76 Compare July 14, 2026 12:37
@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-list-item branch from 030f2e7 to c55bfa9 Compare July 14, 2026 13:19
@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-list-item branch from 997be70 to 1acb066 Compare July 15, 2026 05:45
@OmarBasem
OmarBasem requested a review from andrascodes July 15, 2026 12:32
@@ -0,0 +1,216 @@
import {

@andrascodes andrascodes Jul 15, 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.

Image

The Default story looks a bit off. It might be just an issue with the story file layout itself

@pkg-pr-new

pkg-pr-new Bot commented Jul 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/zerodevapp/zerodev-wallet-sdk/@zerodev/wallet-core@321
npm i https://pkg.pr.new/zerodevapp/zerodev-wallet-sdk/@zerodev/wallet-react@321
npm i https://pkg.pr.new/zerodevapp/zerodev-wallet-sdk/@zerodev/react-ui@321
npm i https://pkg.pr.new/zerodevapp/zerodev-wallet-sdk/@zerodev/wallet-react-ui@321

commit: 8f3fce3

# Conflicts:
#	packages/react-ui/src/components/DataRow/index.tsx
#	packages/smart-routing-address-react-ui/src/components/LabeledValueRow/LabeledValueRow.stories.tsx

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

# Conflicts:
#	packages/react-ui/src/components/PillItem/PillItem.test.tsx
#	packages/react-ui/src/components/PillItem/index.tsx
# Conflicts:
#	pnpm-lock.yaml
@OmarBasem
OmarBasem requested a review from andrascodes July 17, 2026 07:44
@OmarBasem

Copy link
Copy Markdown
Member Author

@andrascodes @brtkx thanks for your reviews, I have refactored to using Radix

)

return (
<Popover.Root>

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.

This is not the right component - we should be using https://www.radix-ui.com/primitives/docs/components/select

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 call it Select - it's pretty standard for UI libraries.

}

const trigger = (
<PillItem

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 feel like PillItem is quite out of place in react-ui in general. It looks like a disabled select trigger - I would just move it back to SRA. Even if it's used in other packages later, it's just icon and text aligned horizontally. IMO this doesn't justify being in the shared package.

@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.

I don't think we should be using radix this way. We should do it shadcn style where we export styled radix components and the consumer does what it wants with them. With the current implementation the code is bloated (a lot of props), and the consumer can only build token related components with it.

https://github.com/zerodevapp/zerodev-dashboard/blob/main/src/components/ui/select.tsx
ZeroDev dashboard is a good example how Select component has been exported.
Also can see here how shadcn exports radix components:
https://github.com/shadcn-ui/ui/blob/main/apps/v4/registry/bases/radix/ui/select.tsx

Feel free to take some time to dive deep into other projects, including ZeroDev dashboard, and check out how they export and consume radix.

@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.

#322
For example the other component you've implemented is quite nice, one thing we can do is get rid of props by utilizing radix to its full potential. Generally radix allows us to avoid using monolith components - so that the consumer can build anything with styled blocks instead of passing props.

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.

3 participants