-
Notifications
You must be signed in to change notification settings - Fork 2
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(works-to-trees): Add DateInputField
to List
component
#3519
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -70,10 +70,20 @@ export const Zoo: Schema = { | |
{ id: "meat", data: { text: "Meat" } }, | ||
{ id: "leaves", data: { text: "Leaves" } }, | ||
{ id: "bamboo", data: { text: "Bamboo" } }, | ||
{ id: "fruit", data: { text: "fruit" } }, | ||
{ id: "fruit", data: { text: "Fruit" } }, | ||
], | ||
}, | ||
}, | ||
// Date | ||
{ | ||
type: "date", | ||
data: { | ||
title: "What's their birthday?", | ||
fn: "birthday", | ||
min: "1970-01-01", | ||
max: "2999-12-31" | ||
}, | ||
}, | ||
], | ||
min: 1, | ||
max: 3, | ||
|
@@ -97,6 +107,7 @@ export const mockZooPayload = { | |
name: "Richard Parker", | ||
size: "Medium", | ||
food: ["meat", "leaves", "bamboo"], | ||
birthday: "1988-07-14", | ||
}, | ||
{ | ||
age: 10, | ||
|
@@ -105,6 +116,7 @@ export const mockZooPayload = { | |
name: "Richard Parker", | ||
size: "Medium", | ||
food: ["meat", "leaves", "bamboo"], | ||
birthday: "1988-07-14", | ||
}, | ||
], | ||
"mockFn.one.age": 10, | ||
|
@@ -113,12 +125,14 @@ export const mockZooPayload = { | |
"mockFn.one.name": "Richard Parker", | ||
"mockFn.one.size": "Medium", | ||
"mockFn.one.food": ["meat", "leaves", "bamboo"], | ||
"mockFn.one.birthday": "1988-07-14", | ||
"mockFn.two.age": 10, | ||
"mockFn.two.cuteness.amount": "Very", | ||
"mockFn.two.email.address": "[email protected]", | ||
"mockFn.two.name": "Richard Parker", | ||
"mockFn.two.size": "Medium", | ||
"mockFn.two.food": ["meat", "leaves", "bamboo"], | ||
"mockFn.two.birthday": "1988-07-14", | ||
"mockFn.total.listItems": 2, | ||
}, | ||
}; |
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.
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.
As we think next about how to better share "schemas" between components that may use them (
List
here,MapAndLabel
next) - I'm very interested if thisuseListContext()
could be extracted out into auseSchemaContext
or similar ?? Then the "Schema" becomes a Context & formik aware component that can be referenced in many components?Was anticipating "fields" would be something I could externally reference/"just pull into" initial
MapAndLabel
setup - but this bit of context very much collided / lead me to initially just duplicating field definitions with a minoruseMapAndLabelContext()
difference.Definitely not a thing to address in this PR, just starting to think bigger direction!
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.
Totally - this is the exact issue I hit when I was trying to rush out
Page
before show and tell 😅There's really two layers of responsibility here - something which handles fields, and something which handles lists (or the wider component). So errors relating to min, max, etc would be in the lists "layer" and the field validation logic etc can we handled elsewhere.
Planning on taking a look at this next pretty much as I know it's a bit of a blocker atm 👍