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

feat: DSW-1597: Update input version and update form integrations #110

Merged
merged 7 commits into from
Apr 23, 2024

Conversation

jamieomaguire
Copy link
Contributor

@jamieomaguire jamieomaguire commented Apr 16, 2024

Update the test form to use the newly styled pie-input component and uses the input for all fields in the integration form

@github-actions github-actions bot temporarily deployed to vanilla-app-pr-110 April 16, 2024 15:34 Inactive
@github-actions github-actions bot temporarily deployed to nextjs-app-pr-110 April 16, 2024 15:37 Inactive
@github-actions github-actions bot temporarily deployed to vanilla-app-pr-110 April 16, 2024 15:43 Inactive
@github-actions github-actions bot temporarily deployed to nextjs-app-pr-110 April 16, 2024 15:48 Inactive
@github-actions github-actions bot temporarily deployed to vanilla-app-pr-110 April 16, 2024 15:59 Inactive
@github-actions github-actions bot temporarily deployed to nextjs-app-pr-110 April 16, 2024 16:03 Inactive
@github-actions github-actions bot temporarily deployed to vanilla-app-pr-110 April 18, 2024 13:32 Inactive
@github-actions github-actions bot temporarily deployed to nextjs-app-pr-110 April 18, 2024 13:37 Inactive
@jamieomaguire jamieomaguire changed the title use latest input feat: DSW-1599: Update input version and update form integrations Apr 19, 2024
@github-actions github-actions bot temporarily deployed to vanilla-app-pr-110 April 19, 2024 14:19 Inactive
@jamieomaguire jamieomaguire changed the title feat: DSW-1599: Update input version and update form integrations feat: DSW-1597: Update input version and update form integrations Apr 19, 2024
@github-actions github-actions bot temporarily deployed to nextjs-app-pr-110 April 19, 2024 14:24 Inactive
@github-actions github-actions bot temporarily deployed to vanilla-app-pr-110 April 19, 2024 15:20 Inactive
@github-actions github-actions bot temporarily deployed to nextjs-app-pr-110 April 19, 2024 15:25 Inactive

const handleEmailChange = (event: React.ChangeEvent<HTMLInputElement>) => {
setEmail(event.target.value);
const handleEmailInput = (event: InputEvent) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this would be clearer or not (or even work like I think it may), but seeing the repetition made me think of doing something like this:

const handleInput = (handlerFn) => {
    return handlerFn((event.target as HTMLInputElement).value);
}

const handleEmailInput = handleInput(setEmail);
const handleUrlInput = handleInput(setUrl);
const handleTelInput = handleInput(setTel);
const handlePasswordInput = handleInput(setPassword);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe in a future PR :)

Copy link
Contributor

@ashleynolan ashleynolan left a comment

Choose a reason for hiding this comment

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

Looks good – one small suggestion that may or not be a good idea, otherwise LGTM :shipit:

@jamieomaguire jamieomaguire merged commit f9fdb65 into main Apr 23, 2024
14 checks passed
@jamieomaguire jamieomaguire deleted the dsw-1599-input-styles branch April 23, 2024 14:30
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.

3 participants