+
Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Conversation

clintcs
Copy link
Collaborator

@clintcs clintcs commented Aug 28, 2024

🚀 Description

Another thing we don't get for free—even when we use a native form control internally 🤷‍♂️.

📋 Checklist

  • I have read and followed the Contributing Guidelines.
  • I have added tests to cover new or updated functionality.
  • I have created or updated stories in Storybook to document the new functionality.
  • I have included a changeset with this Pull Request if it adds/updates/removes functionality for consumers.
  • I have scheduled a Design Review for these changes, if one is required.
  • I have followed the ARIA Authoring Practices Guide and/or met with the Accessibility Team to ensure this functionality is accessible.

🔬 How to Test

  1. Navigate to each form control story.
  2. Focus the control and press Enter.
  3. Verify the form is submitted.

📸 Images/Videos of Functionality

N/A

Copy link

changeset-bot bot commented Aug 28, 2024

🦋 Changeset detected

Latest commit: 857791f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@crowdstrike/glide-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

expect(component.value).to.deep.equal(['two']);
});

it('has `formData` value when an option is selected', async () => {
Copy link
Collaborator Author

@clintcs clintcs Aug 28, 2024

Choose a reason for hiding this comment

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

All these deleted tests duplicate tests in dropdown.test.form.single.ts and dropdown.test.form.multiple.ts.

Copy link
Contributor

@clintcs clintcs force-pushed the form-controls-submit-on-enter branch from 501577e to 4ea32a4 Compare August 28, 2024 19:12
</script>
<form style="padding: 1.5rem;">
<form action="/" style="padding: 1.5rem;">
Copy link
Collaborator Author

@clintcs clintcs Aug 28, 2024

Choose a reason for hiding this comment

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

You'd think action="/?path=/docs/checkbox--overview" would navigate to the Checkbox story, which would be ideal. But it navigates to /. And action="?path=/docs/checkbox--overview" 404s.

@clintcs clintcs force-pushed the form-controls-submit-on-enter branch from 4ea32a4 to 954ad71 Compare August 28, 2024 19:20
@clintcs clintcs force-pushed the form-controls-submit-on-enter branch from 954ad71 to 857791f Compare August 28, 2024 19:30
@clintcs clintcs marked this pull request as ready for review August 28, 2024 19:32
Copy link
Collaborator

@ynotdraw ynotdraw left a comment

Choose a reason for hiding this comment

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

Nice

@blur=${this.#onBlur}
@change=${this.#onChange}
@input=${this.#onInput}
@keydown=${this.#onKeydown}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see the input stories with forms. Should they be?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I noticed that too. There should be. I'll be following up with more Storybook improvements when @danwenzel merges that PR. I'll wrap Input in a <form> as part of that work.

@clintcs clintcs merged commit 5a13414 into main Aug 29, 2024
@clintcs clintcs deleted the form-controls-submit-on-enter branch August 29, 2024 16:26
@github-actions github-actions bot mentioned this pull request Aug 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载