Skip to content
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

improve debug struct UI #726

Merged
merged 9 commits into from Feb 15, 2024
Merged

improve debug struct UI #726

merged 9 commits into from Feb 15, 2024

Conversation

carletex
Copy link
Member

@carletex carletex commented Feb 14, 2024

First iteration on #725

1. Fix padding

This odd padding won't let me sleep haha (also making sure the inner structs padding looks good too)
304829304-0d18fc28-b681-48f1-bf40-1f7644d62207

Now:
image

As Shiv mentioned, maybe it's a good idea to have a label on the value input too.

Fix accordion style

In the current version, the text felt a bit "lost"
304828797-4416cf52-a63f-4030-b983-49025fac8f5e

Made a couple of tweaks:

  1. add some background
    image
  2. Add a border. If not, the inner struct will have the same problem (its background is the same as the parent bg). A border fixed it
    image

We can add more stuff here, or keep iterating in another PR.

Copy link
Collaborator

@rin-st rin-st left a comment

Choose a reason for hiding this comment

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

looks much better!

Copy link
Collaborator

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

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

Small changes but big visual improvement! 🙌🔥

Left a couple of nitpick comments to save some future sleep problems haha. Feel free to ignore 👌

Copy link
Collaborator

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

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

Tysm !! Love this, it looks soo much better now!!

Agree with all the review comments from Pablo 🙌

As Shiv mentioned, maybe it's a good idea to have a label on the value input too.

Maybe something like this :

Screenshot 2024-02-15 at 9 54 52 AM

Its just so that people can easily review while sending final transaction and don't loose what that last input is

We can update :

With this :
 {abiFunction.stateMutability === "payable" ? (
<div className="flex flex-col gap-1 w-full">
  <div className="flex items-center">
    <span className="text-xs font-medium mr-2 leading-none">value to send</span>
    <span className="block text-xs font-extralight leading-none">wei</span>
  </div>
  <IntegerInput
    value={txValue}
    onChange={updatedTxValue => {
      setDisplayedTxResult(undefined);
      setTxValue(updatedTxValue);
    }}
    placeholder="value (wei)"
  />
</div>
) : null}

@carletex
Copy link
Member Author

Thanks all for the review! Appreciate the nitpicking @Pabl0cks

Since we are at it, fixed a few little things:

  • More subtle color for the struct title
  • Align internal padding with inputs
  • Spacing between label / input or struct (1 => 1.5)
  • Increase left padding of label (if not, because of the input/struct border radius, felt that was non-aligned)
  • The difference of the radius (between inputs and structs) still bugs me, but cant have full radius on accordions.

image

  • Added the label to value fields (thanks for the snippet @technophile-04 !!)
  • I used "payable value". Not sure if the best option, but I wanted the "payable" word to be there.

image

@carletex
Copy link
Member Author

Oh, forgot:

Better formatting for the tuple index indicator & buttons (+ / -) colors

image

@technophile-04
Copy link
Collaborator

Since we are at it, fixed a few little things:

It just get better and better, love it !!


Really sorry, just pushed a very small nitpick 7c766d0, doesn't change any thing on light just affects the badge color in dark mode :

Before After
Screenshot 2024-02-15 at 2 45 01 PM Screenshot 2024-02-15 at 2 40 06 PM

Didn't change + / - btn color to bg-base-300 since because of shadow they looks good 🙌

But incase if we don't like we can always update / iterate in future PR, Tysm !!

@technophile-04 technophile-04 merged commit 22f4a05 into main Feb 15, 2024
1 check passed
@technophile-04 technophile-04 deleted the 725#improve-debug-struct-ui branch February 15, 2024 09:22
@Pabl0cks
Copy link
Collaborator

Good job! We got a GREAT debug struct UI now 🚀🚀

@github-actions github-actions bot mentioned this pull request Feb 15, 2024
kmjones1979 added a commit that referenced this pull request Feb 15, 2024
* Add Optimism Sepolia config (#711)

* Use arbitrumSepolia instead of Goerli (#716)

* up rainbowkit version to 1.3.5 (#719)

* removing lock file

* use next-themes to handle theme and update usehooks-ts (#707)

* Feat: Better complex struct inputs (#702)

* improve debug struct UI (#726)

* add basic example to show connected address (#721)

---------

Co-authored-by: winnsterx <46658657+winnsterx@users.noreply.github.com>
Co-authored-by: Shiv Bhonde | shivbhonde.eth <shivbhonde04@gmail.com>
Co-authored-by: Carlos Sánchez <oceanrdn@gmail.com>
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.

None yet

4 participants