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

Generate invoke host function inputs from JSON Spec #1250

Merged
merged 9 commits into from
Feb 13, 2025

Conversation

jeesunikim
Copy link
Contributor

@jeesunikim jeesunikim commented Feb 13, 2025

Summary/This PR includes::

  • Create inputs based on JsonSpec Schema
  • We are not using react-jsonschema-form library because the library is huge and includes many stuff that we do not need (components, ex). I confirmed with Willem that our spec schema is simple - there is no circular or external reference so we should be able to implement our own. But the library is included in feature-invoke-host-function so that we could test our implementation against it
    -- yarn.lock file should include less changes once we remove this library

This PR does not include:

  • tying schema inputs value to zustand store
  • when a type is an array, the button Add {label} should apper; however, but it's not adding a new item yet
  • minLength and maxLength limit from spec
  • design implementation is incomplete. waiting on design parts for the nested inputs and header

invoke

@@ -22,13 +22,17 @@
"@creit.tech/stellar-wallets-kit": "^1.2.5",
"@ledgerhq/hw-app-str": "^7.0.4",
"@ledgerhq/hw-transport-webusb": "^6.29.4",
"@rjsf/core": "^5.24.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

included for feature-invoke-host-function branch so that we can use it as an example and test our implementation

@stellar-jenkins
Copy link

<Button
variant="secondary"
size="md"
onClick={() => {}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

its onClick to add implementation will be added in the next PR

@jeesunikim jeesunikim requested a review from quietbits February 13, 2025 19:01
@stellar-jenkins
Copy link

case "I64":
case "I128":
case "I256":
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious: why are we not rendering these types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah I was going to create a component that allows both positive and negative number. I'll do that next!

Co-authored-by: Iveta <quietbits@users.noreply.github.com>
@stellar-jenkins
Copy link

@jeesunikim jeesunikim merged commit ecd6e77 into feature-invoke-host-function Feb 13, 2025
5 checks passed
@jeesunikim jeesunikim deleted the genereate-func-args branch February 13, 2025 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants