Skip to content

[Dashboard] migrate solidity inputs to shadcn #7148

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

Merged

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented May 23, 2025

Summary

  • migrate solidity bool, int, bytes, and string inputs to shadcn/ui and tailwind

Testing

  • pnpm biome check --apply apps/dashboard/src/contract-ui/components/solidity-inputs/bool-input.tsx apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx apps/dashboard/src/contract-ui/components/solidity-inputs/int-input.tsx apps/dashboard/src/contract-ui/components/solidity-inputs/string-input.tsx
  • pnpm test (fails: spawn anvil ENOENT)

PR-Codex overview

This PR focuses on refactoring the UI components for Solidity inputs in the dashboard. It updates imports, modifies button structures, and adjusts styles to improve the layout and functionality of the components.

Detailed summary

  • Updated imports for Button and Input components.
  • Changed ButtonGroup to a div with custom styles in SolidityBoolInput.
  • Modified button variant from solid to default in SolidityBoolInput.
  • Introduced showConversionButton logic in SolidityIntInput.
  • Replaced InputGroup with a div in SolidityIntInput and SolidityStringInput.
  • Adjusted button placement and styles for IpfsUploadButton in SolidityStringInput.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Style

    • Updated input components to use custom UI elements and Tailwind CSS for consistent styling.
    • Replaced Chakra UI and third-party components with locally defined UI components and native HTML elements.
    • Improved button and input layouts for better visual consistency across boolean, integer, byte, and string input fields.
  • New Features

    • Enhanced integer input with conditional display of a conversion button based on input value format.

@jnsdls jnsdls requested review from a team as code owners May 23, 2025 20:54
@jnsdls jnsdls added the codex label May 23, 2025 — with ChatGPT Connector
Copy link

changeset-bot bot commented May 23, 2025

⚠️ No Changeset found

Latest commit: 11ac5b9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2025 11:06pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) May 23, 2025 11:06pm
login ⬜️ Skipped (Inspect) May 23, 2025 11:06pm
thirdweb_playground ⬜️ Skipped (Inspect) May 23, 2025 11:06pm
wallet-ui ⬜️ Skipped (Inspect) May 23, 2025 11:06pm

@vercel vercel bot temporarily deployed to Preview – docs-v2 May 23, 2025 20:54 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 23, 2025 20:54 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 23, 2025 20:54 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 23, 2025 20:54 Inactive
Copy link
Contributor

coderabbitai bot commented May 23, 2025

## Walkthrough

The Solidity input components for booleans, bytes, integers, and strings were refactored to replace Chakra UI and `tw-components` elements with custom UI components and Tailwind CSS classes. The changes focus on layout, styling, and component imports, without altering the functional logic or exported interfaces of the components.

## Changes

| File(s)                                                                                          | Change Summary                                                                                                   |
|-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| `.../solidity-inputs/bool-input.tsx`                                                            | Replaced Chakra UI `ButtonGroup` and `tw-components` `Button` with custom Button and Tailwind CSS styling.       |
| `.../solidity-inputs/bytes-input.tsx`                                                           | Changed `Input` import from Chakra UI to local custom UI input component.                                        |
| `.../solidity-inputs/int-input.tsx`                                                             | Replaced Chakra UI `InputGroup`/`InputRightElement` with divs and Tailwind; added logic for conditional padding. |
| `.../solidity-inputs/string-input.tsx`                                                          | Replaced Chakra UI layout components with divs and Tailwind; adjusted input and upload button styling.           |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant SolidityInputComponent
    participant CustomUIComponent

    User->>SolidityInputComponent: Interacts with input (bool, int, string, bytes)
    SolidityInputComponent->>CustomUIComponent: Renders input/button using custom UI
    CustomUIComponent-->>SolidityInputComponent: Handles events (onChange, onClick)
    SolidityInputComponent-->>User: Updates value and UI accordingly

Suggested labels

Dashboard

Suggested reviewers

  • MananTank
  • joaquim-verges

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 11ac5b9fc8f76992fe54e7b4c9ede81a820db421 and 6c180b5c8a279235f8284167440df540863f1265.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `apps/dashboard/src/contract-ui/components/solidity-inputs/bool-input.tsx` (2 hunks)
* `apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx` (1 hunks)
* `apps/dashboard/src/contract-ui/components/solidity-inputs/int-input.tsx` (2 hunks)
* `apps/dashboard/src/contract-ui/components/solidity-inputs/string-input.tsx` (3 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (4)</summary>

* apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx
* apps/dashboard/src/contract-ui/components/solidity-inputs/int-input.tsx
* apps/dashboard/src/contract-ui/components/solidity-inputs/string-input.tsx
* apps/dashboard/src/contract-ui/components/solidity-inputs/bool-input.tsx

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (7)</summary>

* GitHub Check: E2E Tests (pnpm, esbuild)
* GitHub Check: E2E Tests (pnpm, webpack)
* GitHub Check: E2E Tests (pnpm, vite)
* GitHub Check: Size
* GitHub Check: Build Packages
* GitHub Check: Lint Packages
* GitHub Check: Analyze (javascript)

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFy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dvGXQjq06VX+dl/4ie9I5OMc7JPSaXXJ1da8u5KYPipxDmeiJ17rWeByykiDOR0xpILjDmH+KFy9QfgpUUmd4dOGniIrNEBs+5h4N/zMXn8nDhZox9i9QABLQAALIAAybmDOHmESPm8I/mHywWoWnQyqHIPkXQ5IJibwMkue5OxYwAV+ek3AeghWu4wA+4eBn+aKJAAkw8HgAuF0zu8B4sk4YuWUI0UubAh47q6YqCLkbAFApAhMju74NBn+K0nQPAXy9AyOAS+AQSHQ8It04g6Ops1e42sUw4uOG4pIJyhOPGFiXQq+qwuWWBtOD+uA9OwsxBX6hohBkgxBrOKgHOBQsWJqfOZOAUJIeaws7QvmhwUBgWjBcBuO0QLCqoaQ9ABALQAkEwvgiA24B0OWRYjElOISb+Si38n+9swog0LmrwkWEhQS5hwASsGA1hhk3hP4vhWwoKPg8IpuQUiU5wo4B86cGAIuaWoQO6CRhmFWVYnWMqcqtAxS9YaO5wR6MaGqyhrBv4/suOChYgGU949Q/MuYQIJAQ0CcUIE0/RFRqwpIu8wemoeEYe6Gy6mGgaD2MeoaogpahGtsrcie6izc5GmclG6e4g+66aOee6ZxuaRA+aRelsFxBGpxCelaSe9xKeTxyaLxtB0adxkA5eQ6VeMxLynR70m+9kE+u+5CpEV0e2oee61UKAgoYmlAKE0MMm7aV8c8SazcrcqEBACmi+m8vcfgyse8ymrQY8J8Kgag58M8YAhglJl06gAA+iUIgEKf4PzDVnQEKTCM4KEHXAYJSdMNMPOAAKwCAACcKwDA8wKwkwAAbBqRqVDisCQKqbMCQJMAILMAwBqXQCQPMCqfMFDgSrQNaVDtMJfIqQ3JAPqQwNMPMASgIKqTqWgFDpMMaQAMyqkrDOnzCzDTD6mTCzCzCukrDmkErzD6mRkrDTBQ76mqlenekQCbzCmininLE0bNS0BClNyXxAA= -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=thirdweb-dev/js&utm_content=7148):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Copy link
Contributor

graphite-app bot commented May 23, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label May 23, 2025
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.68%. Comparing base (3489ece) to head (6c180b5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7148   +/-   ##
=======================================
  Coverage   55.68%   55.68%           
=======================================
  Files         904      904           
  Lines       58324    58324           
  Branches     4113     4113           
=======================================
  Hits        32476    32476           
  Misses      25743    25743           
  Partials      105      105           
Flag Coverage Δ
packages 55.68% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx (1)

15-26: 🛠️ Refactor suggestion

Validation logic runs but errors aren’t surfaced in the UI
You call form.setError and form.clearErrors, but the component never displays any error message or invalid styling. To give users feedback:

  • Wrap the input in a <FormControl> (or equivalent) and pass an isInvalid flag.
  • Render the error text below the input (e.g. via <FormErrorMessage> or a styled <p>).

This is critical so that users know why their input is invalid.

🧹 Nitpick comments (3)
apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx (2)

10-13: Streamline prop filtering via types instead of runtime destructuring
Right now you destructure out size and name at runtime and disable the lint rule. Instead, consider updating the prop type to omit those keys (e.g. Omit<SolidityInputWithTypeProps, 'size' | 'name'>) or alias them in one go:

const { name: inputName, size: _size, ...restOfInputProps } = inputProps;

This removes the need for // eslint-disable and makes the intent clearer.


28-35: Enhance accessibility with explicit labeling
Relying solely on a placeholder can hamper accessibility. Consider:

  • Adding an id={inputName} and pairing it with a <label htmlFor={inputName}>…</label>.
  • Or, if you don’t want a visible label, use an aria-label={solidityType} prop on the Input.

This will help screen‐reader users and improve overall UX.

apps/dashboard/src/contract-ui/components/solidity-inputs/int-input.tsx (1)

50-52: Consider optimizing the boolean condition for better readability.

The condition is functionally correct, but could be more concise:

-  const showConversionButton =
-    formValue.includes(".") || formValue.includes(",");
+  const showConversionButton = /[.,]/.test(formValue);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adc738e and 11ac5b9.

📒 Files selected for processing (4)
  • apps/dashboard/src/contract-ui/components/solidity-inputs/bool-input.tsx (2 hunks)
  • apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx (1 hunks)
  • apps/dashboard/src/contract-ui/components/solidity-inputs/int-input.tsx (2 hunks)
  • apps/dashboard/src/contract-ui/components/solidity-inputs/string-input.tsx (3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/dashboard/src/contract-ui/components/solidity-inputs/bool-input.tsx (1)
apps/dashboard/src/@/components/ui/button.tsx (1)
  • Button (67-67)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx (1)

1-1: Swapped Chakra’s Input for the local Input – verify API compatibility
This replaces @chakra-ui/react’s Input with your custom component. Ensure that the new Input accepts all the props you’re passing (placeholder, value, onChange, etc.) and that its styling, focus ring, and keyboard behaviour match your design specs.

apps/dashboard/src/contract-ui/components/solidity-inputs/bool-input.tsx (1)

1-33: Clean migration from Chakra UI to shadcn/ui completed successfully.

The boolean input component has been migrated effectively with all functionality preserved. The Tailwind CSS styling correctly replicates the button group behavior, and the shadcn/ui Button component integration looks solid.

Key improvements:

  • Consistent styling approach with the rest of the dashboard
  • Proper button group visual connection using border and radius classes
  • Maintained accessibility and interaction patterns
apps/dashboard/src/contract-ui/components/solidity-inputs/int-input.tsx (1)

54-72: Excellent implementation of conditional layout with proper spacing.

The migration successfully replaces Chakra's InputGroup/InputRightElement pattern with:

  • Relative positioning container
  • Conditional padding to prevent text overlap
  • Absolute positioned button with proper alignment

The cn utility usage for dynamic className composition is a best practice for this type of conditional styling.

apps/dashboard/src/contract-ui/components/solidity-inputs/string-input.tsx (1)

36-74: Well-executed migration with excellent responsive design handling.

The migration from Chakra UI to native elements + Tailwind is implemented thoughtfully:

  • Responsive padding (pr-[90px] md:pr-[160px]) properly accommodates the upload button
  • Responsive text visibility (hidden md:block) maintains the mobile-first approach
  • Absolute positioning preserves the original layout behavior
  • The cn utility ensures proper className merging

The functionality for IPFS upload and URI handling is correctly preserved, including the trailing slash logic for updateBatchBaseURI.

Copy link
Contributor

github-actions bot commented May 23, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 61.7 KB (0%) 1.3 s (0%) 376 ms (+59.43% 🔺) 1.7 s
thirdweb (cjs) 344.59 KB (0%) 6.9 s (0%) 1.9 s (+3.43% 🔺) 8.8 s
thirdweb (minimal + tree-shaking) 5.69 KB (0%) 114 ms (0%) 63 ms (+398.1% 🔺) 177 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 23 ms (+441.88% 🔺) 33 ms
thirdweb/react (minimal + tree-shaking) 19.54 KB (0%) 391 ms (0%) 219 ms (+502.26% 🔺) 610 ms

Copy link
Contributor

graphite-app bot commented May 23, 2025

Merge activity

## Summary
- migrate solidity bool, int, bytes, and string inputs to shadcn/ui and tailwind

## Testing
- `pnpm biome check --apply apps/dashboard/src/contract-ui/components/solidity-inputs/bool-input.tsx apps/dashboard/src/contract-ui/components/solidity-inputs/bytes-input.tsx apps/dashboard/src/contract-ui/components/solidity-inputs/int-input.tsx apps/dashboard/src/contract-ui/components/solidity-inputs/string-input.tsx`
- `pnpm test` *(fails: spawn anvil ENOENT)*

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the UI components in the `solidity-inputs` directory to use a consistent styling approach and improve the layout by replacing certain components with more flexible alternatives.

### Detailed summary
- Updated imports from `tw-components` to a local `@/components/ui` for `Button` and `Input`.
- Replaced `ButtonGroup` with a `div` for better styling control in `SolidityBoolInput`.
- Adjusted button variants from `solid` to `default` for consistency.
- Introduced a `showConversionButton` flag in `SolidityIntInput` for conditional rendering.
- Changed `InputGroup` to `div` in `SolidityIntInput` and `SolidityStringInput` for layout flexibility.
- Used `cn` utility for conditional class names in `Input` components.
- Updated button and input placements to enhance responsiveness and styling.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Style**
  - Updated input components to use custom UI elements and Tailwind CSS for consistent styling.
  - Replaced Chakra UI and third-party components with locally defined UI components and native HTML elements.
  - Improved button and input layouts for better visual consistency across boolean, integer, byte, and string input fields.

- **New Features**
  - Enhanced integer input with conditional display of a conversion button based on input value format.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the codex/migrate-dashboard-to-schadcn/ui-and-tailwindcss branch from 11ac5b9 to 6c180b5 Compare May 23, 2025 22:57
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 23, 2025 22:57 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 23, 2025 22:57 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 23, 2025 22:57 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 23, 2025 22:57 Inactive
@graphite-app graphite-app bot merged commit 6c180b5 into main May 23, 2025
24 checks passed
@graphite-app graphite-app bot deleted the codex/migrate-dashboard-to-schadcn/ui-and-tailwindcss branch May 23, 2025 23:07
@vercel vercel bot temporarily deployed to Production – thirdweb_playground May 23, 2025 23:07 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 May 23, 2025 23:07 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codex Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants