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

refactor form filling #173

Closed
wants to merge 5 commits into from
Closed

refactor form filling #173

wants to merge 5 commits into from

Conversation

nsbradford
Copy link
Owner

.

.

.

more

form filler

Copy link

vercel bot commented Jan 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
talk-form-ai ❌ Failed (Inspect) Jan 25, 2024 3:36am

@nsbradford
Copy link
Owner Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@nsbradford nsbradford changed the title . refactor form filling Jan 25, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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>
Copy link
Contributor

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}/>}
Copy link
Contributor

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}
Copy link
Contributor

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}'.

Copy link
Owner Author

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}
Copy link
Contributor

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.

@hbrooks hbrooks closed this Jan 25, 2024
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.

2 participants