Add a Submit and close icon to the Customize component.#2087
Merged
Conversation
Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Pull Request Overview
Adds a “Submit and close” button (checkmark icon) to the Customize Request component, enabling users to submit form data and close the modal in one action.
- Introduced
onModalCloseprop in the parent component to propagate closing logic. - Imported and wired up a new
SubmitIconandhandleSubmitAndClosehandler inInteractiveBox. - Updated footer button styles for spacing, consistent sizing, hover states, and dark-theme support.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/components/ParserOpenRPC/index.tsx | Passes onModalClose into InteractiveBox to enable modal closing. |
| src/components/ParserOpenRPC/InteractiveBox/styles.module.scss | Adjusts .footerButtonsLeft and .footerButtonLeft: adds flex gap, sizes, hover, and theme styles. |
| src/components/ParserOpenRPC/InteractiveBox/index.tsx | Imports SubmitIcon, extends props with onModalClose, adds handleSubmitAndClose, and inserts the new button. |
Comments suppressed due to low confidence (1)
src/components/ParserOpenRPC/InteractiveBox/index.tsx:348
- There’s no existing test to cover the new "Submit and close" button. Consider adding a unit or integration test that simulates a click and verifies both
onParamChangeand the correct close callback are invoked.
<Tooltip message="Submit and close">
Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
alexandratran
approved these changes
Jun 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add "Submit and close" functionality to Customize Request component
Problem
The Customize Request component had "Reset fields" and "Clear fields" actions, but lacked a quick way to indicate to the user to submit changes and close the component in one action. Clicking close (X) does this, but it's not obvious.
The term "Submit" is superficial, because the request is updated without needing to click anything. But this does improve the UI.
Solution
Added a new "Submit and close" button to the Customize Request component that:
Changes
submit-icon.svgwith a checkmark designhandleSubmitAndClosefunction that:Testing
Checklist
Complete this checklist before merging your PR: