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

chore(explorer): handle tuples in interact form #3464

Conversation

JamesLefrere
Copy link
Contributor

Fixes #3359 by doing what the user intended and making it clear what to input.

image

Copy link

changeset-bot bot commented Jan 20, 2025

🦋 Changeset detected

Latest commit: b152d79

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@latticexyz/explorer Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/cli Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/dev-tools Patch
@latticexyz/entrykit Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/paymaster Patch
@latticexyz/protocol-parser Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/stash Patch
@latticexyz/store-consumer Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/store Patch
@latticexyz/utils Patch
vite-plugin-mud Patch
@latticexyz/world-module-callwithsignature Patch
@latticexyz/world-module-erc20 Patch
@latticexyz/world-module-metadata Patch
@latticexyz/world-modules Patch
@latticexyz/world Patch

Not sure what this means? Click here to learn what changesets are.

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

@karooolis
Copy link
Contributor

Hey @JamesLefrere , thanks for the contribution, this looks great! We have plans to improve the tuples/arrays support further but this is already very useful. Only issue is that it doesn't seem to work for all tuples, for example batchCall (see the attached screenshot). Seems to happen when the function parameter is an array of tuples.

CleanShot 2025-01-21 at 12 08 53@2x

@JamesLefrere
Copy link
Contributor Author

Ah thanks @karooolis , you're right, looks like we need to make that recursive perhaps and the user could enter [[a, b, c], [d, e]].

@karooolis
Copy link
Contributor

Ah thanks @karooolis , you're right, looks like we need to make that recursive perhaps and the user could enter [[a, b, c], [d, e]].

Yeah good shoutout, a tuple could contain another tuple, and so on.

@JamesLefrere JamesLefrere force-pushed the jameslefrere/handle-tuples-in-explorer-interact branch from d7635b9 to dc3f1c5 Compare January 23, 2025 13:27
@JamesLefrere JamesLefrere force-pushed the jameslefrere/handle-tuples-in-explorer-interact branch from dc3f1c5 to 63089cb Compare January 23, 2025 16:36
@karooolis karooolis force-pushed the jameslefrere/handle-tuples-in-explorer-interact branch from 8d82958 to e304d26 Compare January 23, 2025 18:12
@karooolis
Copy link
Contributor

karooolis commented Jan 23, 2025

Having implemented recursive handling of tuples I'm thinking next to the function name to not show tuples types but rather the tuple's name. And then inside inputs show the types. Added screenshot for the reference on how it currently looks @JamesLefrere . I'll work on this more tomorrow.

CleanShot 2025-01-23 at 20 12 58@2x

@karooolis
Copy link
Contributor

In the end came up with this for now:
CleanShot 2025-01-31 at 17 48 35@2x
CleanShot 2025-01-31 at 17 48 57@2x

karooolis
karooolis previously approved these changes Jan 31, 2025
@karooolis karooolis merged commit c44207f into latticexyz:main Jan 31, 2025
14 of 16 checks passed
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.

"Cannot convert undefined to a BigInt" error when using World Explorer write
3 participants