-
Notifications
You must be signed in to change notification settings - Fork 21
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
refactor form filling #173
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
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.
A few changes required
Summary:
This PR involves renaming and moving several components, replacing 'ErrorAlert' with a shared 'Error' component, and updating URL paths in various components and tests.
Key points:
- Deleted 'ErrorAlert' component and replaced it with a shared 'Error' component.
- Updated 'SignInForm' and 'SignUpForm' components to import the new 'Error' component.
- Renamed 'DashboardMode' component to 'Home' and updated its import paths.
- Moved 'ResponsesTable' component from 'modes' directory to 'home' directory.
- Renamed 'ErrorMode' component to 'Error' and moved it to 'shared' directory.
- Updated URL paths in several components and tests from '/forms/fill/' to '/forms/entry/'.
Something look wrong? You can customize Ellipsis' behavior when reviewing code by editing the config file for this repository.
Generated with ❤️ by ellipsis.dev
@@ -78,7 +78,7 @@ export default function FormDetailPage() { | |||
</span> |
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.
The URL path has been changed from '/forms/fill/' to '/forms/entry/'. Please ensure that this change is consistent across all files and does not break any existing functionality. Also, update any documentation that references the old URL path.
@@ -40,7 +40,7 @@ export default function SignInForm() { | |||
|
|||
return ( | |||
<> | |||
{error && <ErrorAlert error={error} />} | |||
{error && <Error error={error} session={null}/>} |
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.
The 'Error' component is being passed a 'session' prop as 'null'. If the 'Error' component relies on the 'session' prop for its functionality, this could potentially lead to issues. Please ensure that the 'Error' component can handle a 'null' 'session' prop.
<form | ||
className="space-y-6" | ||
action="#" | ||
method="POST" | ||
onSubmit={onFormSubmit} | ||
onSubmit={() => onFormSubmit} |
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.
The 'onSubmit' prop in the form has been changed from a reference to the 'onFormSubmit' function to an arrow function that doesn't call 'onFormSubmit'. This will prevent the form from being submitted as expected. It should be changed back to 'onSubmit={onFormSubmit}'.
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.
@ellipsis-dev fix it
<form | ||
className="space-y-6" | ||
action="#" | ||
method="POST" | ||
onSubmit={onFormSubmit} | ||
onSubmit={() => onFormSubmit} |
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.
@nsbradford, I have addressed your comments in this pull request.
.
.
.
more
form filler