-
Notifications
You must be signed in to change notification settings - Fork 10
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
This is a feature-branch pull-request from feature/labeled-field
to main
#2429
Open
beaesguerra
wants to merge
15
commits into
main
Choose a base branch
from
feature/labeled-field
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
daf459a
LabeledField (part 1): Initial set up for LabeledField component base…
beaesguerra fd29f86
LabeledField(part2): refactor to a function component (#2338)
beaesguerra dea7c71
LabeledField(part3): Wire up attributes (#2339)
beaesguerra 842cdd2
Merge branch 'main' into feature/labeled-field
beaesguerra 0869c5e
LabeledField(part4): styling and error icon (#2344)
beaesguerra 4aceede
Merge branch 'main' into feature/labeled-field
beaesguerra 309adcb
Merge branch 'main' into feature/labeled-field
beaesguerra 5badeed
Merge branch 'main' into feature/labeled-field
beaesguerra d9bc865
LabeledField: integrate with field components and fixes (#2399)
beaesguerra 68221bc
Use LabeledField in other component stories (#2400)
beaesguerra 3e40728
Add more docs around different browser + screen reader behaviours for…
beaesguerra ed8fb7b
LabeledField: Make sure custom required message is shown (#2425)
beaesguerra c6a8cbf
LabeledField: Add a story for custom jsx for props (#2426)
beaesguerra 4c9401f
[feature/labeled-field] Merge branch 'main' into feature/labeled-field
beaesguerra a37305a
LabeledField: fix import (#2427)
beaesguerra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-labeled-field": patch | ||
--- | ||
|
||
LabeledField: Refactor from class component to function component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-form": patch | ||
--- | ||
|
||
TextField and TextArea: Set `aria-required` if it is required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-labeled-field": minor | ||
--- | ||
|
||
- Update `LabeledField` styling to use semantic tokens to match Figma specs | ||
- Add error icon to the error message. This addresses accessibility issues related to color being the only way to communicate information | ||
- Add a labels prop so that a translated label for the error icon can be passed in | ||
- Handle long text overflow with and without word breaks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-form": patch | ||
--- | ||
|
||
TextField and TextArea validation: Always clear error message onChange if instantValidation=false so externally set error state can still be cleared |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-labeled-field": minor | ||
--- | ||
|
||
LabeledField: Wire up attributes for elements and apply attributes to the field element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-labeled-field": patch | ||
--- | ||
|
||
Makes sure custom required messages passed into `LabeledField` or the `field` prop are displayed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-labeled-field": patch | ||
--- | ||
|
||
Set required, error and light props for LabeledField and field component if it is set on either LabeledField or field component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-labeled-field": patch | ||
--- | ||
|
||
Use `errorMessage` prop instead of `error` prop for consistency (`error` prop is used for boolean props in form field components). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-labeled-field": patch | ||
--- | ||
|
||
LabeledField: Let `required` prop be a boolean or string so it can be passed down to the field prop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/wonder-blocks-labeled-field": patch | ||
--- | ||
|
||
Sets up the initial implementation for LabeledField based on the internal FieldHeading component in the form package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note: all of the changesets are marked either a patch or minor update for the
wonder-blocks-labeled-field
package.Currently, the package is at 1.0.5 and exports a string as default as a placeholder (ref).
I was wondering if it would be worth changing to a major version. It isn't currently used in
webapp
orperseus
though, so it might be fine if we leave it at v1.x.x. The new version will be1.1.0
Let me know if anyone has any thoughts or concerns around this!
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.
IMO It's fine marking it as non-breaking change as there's no current usage