-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle the case where examples is
null
for all components (#7192)
* handle null examples * add changeset * add changeset * lint * merge conflict * fixes * add changeset * stories * feedback * examples --------- Co-authored-by: gradio-pr-bot <[email protected]>
- Loading branch information
1 parent
e3217b4
commit 8dd6f4b
Showing
25 changed files
with
380 additions
and
205 deletions.
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,23 @@ | ||
--- | ||
"@gradio/audio": patch | ||
"@gradio/checkbox": patch | ||
"@gradio/code": patch | ||
"@gradio/colorpicker": patch | ||
"@gradio/dataset": patch | ||
"@gradio/dropdown": patch | ||
"@gradio/file": patch | ||
"@gradio/fileexplorer": patch | ||
"@gradio/image": patch | ||
"@gradio/markdown": patch | ||
"@gradio/model3d": patch | ||
"@gradio/number": patch | ||
"@gradio/radio": patch | ||
"@gradio/simpledropdown": patch | ||
"@gradio/simpleimage": patch | ||
"@gradio/simpletextbox": patch | ||
"@gradio/textbox": patch | ||
"@gradio/video": patch | ||
"gradio": patch | ||
--- | ||
|
||
fix:Handle the case where examples is `null` for all 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,24 @@ | ||
<script> | ||
import { Meta, Template, Story } from "@storybook/addon-svelte-csf"; | ||
import Audio from "./Example.svelte"; | ||
</script> | ||
|
||
<Meta title="Components/Audio/Example" component={Audio} /> | ||
|
||
<Template let:args> | ||
<Audio {...args} /> | ||
</Template> | ||
|
||
<Story | ||
name="Audio file" | ||
args={{ | ||
value: "cantina.mp3" | ||
}} | ||
/> | ||
|
||
<Story | ||
name="Null" | ||
args={{ | ||
value: null | ||
}} | ||
/> |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script> | ||
import { Meta, Template, Story } from "@storybook/addon-svelte-csf"; | ||
import ColorPicker from "./Example.svelte"; | ||
</script> | ||
|
||
<Meta title="Components/Color Picker/Example" component={ColorPicker} /> | ||
|
||
<Template let:args> | ||
<ColorPicker {...args} /> | ||
</Template> | ||
|
||
<Story | ||
name="Color value" | ||
args={{ | ||
value: "#ff0000" | ||
}} | ||
/> | ||
|
||
<Story | ||
name="Null" | ||
args={{ | ||
value: null | ||
}} | ||
/> |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script> | ||
import { Meta, Template, Story } from "@storybook/addon-svelte-csf"; | ||
import Image from "./Example.svelte"; | ||
</script> | ||
|
||
<Meta title="Components/Image/Example" component={Image} /> | ||
|
||
<Template let:args> | ||
<Image {...args} /> | ||
</Template> | ||
|
||
<Story | ||
name="Image file" | ||
args={{ | ||
samples_dir: "", | ||
value: { | ||
path: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg", | ||
url: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg", | ||
orig_name: "cheetah.jpg" | ||
} | ||
}} | ||
/> | ||
|
||
<Story | ||
name="Null" | ||
args={{ | ||
value: null | ||
}} | ||
/> |
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
Oops, something went wrong.