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(components): Add description to base FormField component #714

Merged
merged 22 commits into from
Oct 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dcb9037
added description type
Oct 4, 2021
6cc95f3
added component to display form field description
Oct 4, 2021
97e3385
added description usage to the form field
Oct 4, 2021
ef8c8ef
refactored formfield tests
Oct 4, 2021
68b9e27
added test to find description
Oct 4, 2021
43f730f
updated htype declaration
Oct 4, 2021
dbfb53e
added aria-describedby, spacing between description and field, and sw…
Oct 5, 2021
2f94e11
updated snaps
Oct 5, 2021
139199e
updated how input validation and form are styled and grouped together
Oct 7, 2021
291bfa7
updated snaps
Oct 7, 2021
2a1be65
updated styling and composition if inline, description and aria-descr…
Oct 8, 2021
14a6d09
Merge branch 'master' into add-description-field-to-inputs
Oct 19, 2021
5b7ba79
'descriptionUUID' -> 'descriptionIdentifier'
Oct 26, 2021
e22386c
'spacing=small' only added to Tag if inline
Oct 26, 2021
2a6cc95
removed 'renders a field with error' snapshot test as it doesnt provi…
Oct 26, 2021
6dbecb8
'with a placeholder' > 'renders' updated to include 'renders as a lab…
Oct 26, 2021
de95225
'when readonly' > 'renders' updated to get attribute instead of snapshot
Oct 26, 2021
7c5e5d9
'when disabled' > 'renders' updated to check for attribute instead of…
Oct 26, 2021
2e706c1
'when loading' > 'should render the spinner' updated to check if in d…
Oct 26, 2021
b784b3f
'when autocomplete' changed to check for attribute instead of getting…
Oct 26, 2021
cee37b5
removed unneeded expect with 'toHaveBeenCalled'
Oct 26, 2021
1ab04e9
updated how content spacing occurs, instead of using content, using m…
Oct 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/proposals/InputEmail/InputEmail.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ import { InputEmail } "@jobber/components/InputEmail";
message: "Please tell me your name",
},
pattern: {
value: /\A((?:(?:(?:[a-zA-Z0-9\-+_][.\-+_'&]?)*)[a-zA-Z0-9\-+_]))@((?:(?:(?:[a-zA-Z0-9][.\-_]?){0,62})[a-zA-Z0-9])+)\.([a-zA-Z0-9]{2,})\z/,
value:
/\A((?:(?:(?:[a-zA-Z0-9\-+_][.\-+_'&]?)*)[a-zA-Z0-9\-+_]))@((?:(?:(?:[a-zA-Z0-9][.\-_]?){0,62})[a-zA-Z0-9])+)\.([a-zA-Z0-9]{2,})\z/,
message: "That does not look like an email address",
},
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ exports[`it should display headers when headers are passed in 1`] = `
>
<label
className="label"
htmlFor="123e4567-e89b-12d3-a456-426655440018"
htmlFor="123e4567-e89b-12d3-a456-426655440035"
>
placeholder_name
</label>
<input
autoComplete="autocomplete-off"
className="input"
id="123e4567-e89b-12d3-a456-426655440018"
id="123e4567-e89b-12d3-a456-426655440035"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/FormField/FormField.css
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,7 @@
.miniLabel:not(.small) .affixLabel {
padding-top: calc(var(--field--padding-top) - 2px);
}

.description {
margin-top: var(--space-smaller);
}
1 change: 1 addition & 0 deletions packages/components/src/FormField/FormField.css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ declare const styles: {
readonly "suffix": string;
readonly "hasAction": string;
readonly "affixLabel": string;
readonly "description": string;
};
export = styles;

Loading