[gestalt] Fix tests assuming onDismissStart would be a valid child#58291
Conversation
|
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. gestalt (unpkg)was missing the following properties:
as well as these 3 other properties...MasonryUniformRowLayout, ScrollFetch, useColorScheme |
| onDismiss={() => {}} | ||
| footer={<Heading>Footer</Heading>} | ||
| > | ||
| {({ onDismissStart }) => <Heading>Content {onDismissStart}</Heading>} |
There was a problem hiding this comment.
Can't render a function.
| />; | ||
| <Checkbox id={'1'} onChange={() => {}} />; | ||
| <Collage columns={1} height={1} renderImage={({ height, index, width }) => () => {}} width={1} />; | ||
| <Collage columns={1} height={1} renderImage={({ height, index, width }) => null} width={1} />; |
There was a problem hiding this comment.
We can't render a function i.e. <div>{() => {}}</div> would throw.
|
@eps1lon Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and there were no type definition changes, I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 58291,
"author": "eps1lon",
"headCommitOid": "b5deaca99319b48c00cfcc2bda3ac8afd7c1f97f",
"mergeBaseOid": "c609479376c92be2991c6d072a70201f7e225047",
"lastPushDate": "2022-01-18T19:28:08.000Z",
"lastActivityDate": "2022-01-19T05:59:40.000Z",
"mergeOfferDate": "2022-01-18T20:06:53.000Z",
"mergeRequestDate": "2022-01-19T05:59:40.000Z",
"mergeRequestUser": "eps1lon",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": "gestalt",
"kind": "edit",
"files": [
{
"path": "types/gestalt/gestalt-tests.tsx",
"kind": "test"
}
],
"owners": [
"serranoarevalo",
"joshgachnang",
"calvinchhour",
"zifahm",
"k-yle",
"jimenezff",
"czgu",
"keyworks",
"v4iv",
"juanjalvarez"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "czgu",
"date": "2022-01-18T20:06:16.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 1015778082,
"ciResult": "pass"
} |
|
🔔 @serranoarevalo @joshgachnang @CalvinChhour @zifahm @k-yle @jimenezff @czgu @keyworks @v4iv @juanjalvarez — please review this PR in the next few days. Be sure to explicitly select |
|
@eps1lon: Everything looks good here. I am ready to merge this PR (at b5deaca) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@serranoarevalo, @joshgachnang, @CalvinChhour, @zifahm, @k-yle, @jimenezff, @czgu, @keyworks, @v4iv, @juanjalvarez: you can do this too.) |
|
Ready to merge |
…issStart` would be a valid child by @eps1lon
We plan to remove
{}fromReactFragmentsince it's not actually an allowed type for children of host components (e.g.<div>{{}}</div>would throw at runtime) (see #56026 for previous attempts).This change is required to pass #56210