-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add support to defender deploy #416
Conversation
…penZeppelin/contracts-wizard into add-support-to-defender-deploy
…penZeppelin/contracts-wizard into add-support-to-defender-deploy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far, thanks! Just left some initial comments.
I also notice if I close the iframe and re-open it, the API key needs to be entered again. Do we have a way to persist that information just for the current session? Or avoid truly closing it, but just hide it.
packages/ui/src/App.svelte
Outdated
|
||
const dispatch = createEventDispatcher(); | ||
|
||
// listens to contract changes and posts them to the defender deploy iframe. | ||
// we debounce the call to avoid sending too many messages while the user is editing. | ||
const debouncedPostMessage = debouncer((contract) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this is waiting for the debounce timeout, there is no indication to the user that the iframe is waiting to be updated. The iframe just gets updated 600 ms later, which "feels" like lag.
@makiopen Any suggestions on how to add some indication that the iframe is pending an update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can display some loading state with some "compiling contract" message. We would need to make another post message (instantly) to the iframe to activate the loading state until the debounced message arrives
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even a spinner would be enough tbh
@ericglau Thanks! I ended up hiding the iframe instead of conditionally loading the component, a bit hacky but works |
The AI Assistant icon also seems missing, not sure where it went. Perhaps due to the formatting changes. |
some z-index issues, brought it back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added title (hover) text for "Copy to Clipboard" and "Open in Remix" since they are now icon-only and it may not be obvious what they do.
LGTM, thanks!
Description
Adds a modal that connects the wizard with the Defender Deploy Plugin (currently only supported in remix).
The modal contains an Iframe that points to the live version of the remix plugin.