-
Notifications
You must be signed in to change notification settings - Fork 53
Adding form components #69
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
Conversation
🦋 Changeset detectedLatest commit: 459ba5f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
🟢 No design token changes found |
|
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.
Design/styling updates along with the removal of inset
prop from the component API
</FormControl> | ||
) | ||
|
||
const errorIcon = container.querySelector('svg.octicon-alert-fill') |
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.
This is referencing the 12px icon but is being rendered at 16px. We should make an icon request to add and alert-fill
16px icon here since we are intending for larger validation messages.
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.
Sorry @ashygee, not quite following on this one. Do you mean you want me to add a 16px SVG to Octicons and then pull it in here?
As it's a vector it will scale without distortion, so is that necessary? I've already bumped the validation text size in an earlier commit.
A few more design notes: The checkbox isn't keyboard accessible when it's in a borded box: The checkbox animation feels a little slow, and it feels strange that the checkmark turns blue (as opposed to just the border) during the transition from checked to unchecked: The focus style on a text input with a leading visual feels a little "off":
|
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.
@rezrah all of this looks good to me and I really appreciate @mperrotti for sharing those insights as well. In regards to the focus state for the Checkbox input, this is the direction that we've agreed to go in:
This PR is getting quite large and given it's been open for a while, I'm going to merge and iterate on it over the next week in future (smaller) pull requests. Changes that will be carried forward:
cc. @tobiasahlin @ashygee let me know if I've missed anything 🙏 |
Latest update adds new focus styling to Also fixed:
demo.for.new.focus.control.styles.mov |
Summary
Adds a
FormControl
,Select
,Checkbox
andTextInput
component as part of https://github.com/github/primer/issues/1122These components use a mixture of patterns from Primer React and Primer Rails equivalent components.
List of notable changes:
FormControl
,TextInput
,Select
,Checkbox
Out-of-scope in this pull request
What should reviewers focus on?
Documentation preview
Storybook preview
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
Reviewer checklist:
Screenshots:
New leading and trailing text props