mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
Move accordion CHANGELOG entry to next release (#2737)
* Move accordion CHANGELOG entry to next release * trigger ci
This commit is contained in:
parent
5b71ff7e6f
commit
182f79bfaa
57
CHANGELOG.md
57
CHANGELOG.md
@ -1,7 +1,34 @@
|
||||
# Upcoming Release
|
||||
|
||||
## New Features:
|
||||
No changes to highlight.
|
||||
|
||||
### Update Accordion properties from the backend
|
||||
|
||||
You can now update the Accordion `label` and `open` status with `gr.Accordion.update` by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 2690](https://github.com/gradio-app/gradio/pull/2690)
|
||||
|
||||
```python
|
||||
import gradio as gr
|
||||
|
||||
with gr.Blocks() as demo:
|
||||
with gr.Accordion(label="Open for greeting", open=False) as accordion:
|
||||
gr.Textbox("Hello!")
|
||||
open_btn = gr.Button(value="Open Accordion")
|
||||
close_btn = gr.Button(value="Close Accordion")
|
||||
open_btn.click(
|
||||
lambda: gr.Accordion.update(open=True, label="Open Accordion"),
|
||||
inputs=None,
|
||||
outputs=[accordion],
|
||||
)
|
||||
close_btn.click(
|
||||
lambda: gr.Accordion.update(open=False, label="Closed Accordion"),
|
||||
inputs=None,
|
||||
outputs=[accordion],
|
||||
)
|
||||
demo.launch()
|
||||
```
|
||||
|
||||
![update_accordion](https://user-images.githubusercontent.com/41651716/203164176-b102eae3-babe-4986-ae30-3ab4f400cedc.gif)
|
||||
|
||||
|
||||
## Bug Fixes:
|
||||
* Fixed bug where requests timeout is missing from utils.version_check() by [@yujiehecs](https://github.com/yujiehecs) in [PR 2729](https://github.com/gradio-app/gradio/pull/2729)
|
||||
@ -73,34 +100,6 @@ def echo(name, request: gr.Request):
|
||||
io = gr.Interface(echo, "textbox", "textbox").launch()
|
||||
```
|
||||
|
||||
### Update Accordion properties from the backend
|
||||
|
||||
You can now update the Accordion `label` and `open` status with `gr.Accordion.update` by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 2690](https://github.com/gradio-app/gradio/pull/2690)
|
||||
|
||||
```python
|
||||
import gradio as gr
|
||||
|
||||
with gr.Blocks() as demo:
|
||||
with gr.Accordion(label="Open for greeting", open=False) as accordion:
|
||||
gr.Textbox("Hello!")
|
||||
open_btn = gr.Button(value="Open Accordion")
|
||||
close_btn = gr.Button(value="Close Accordion")
|
||||
open_btn.click(
|
||||
lambda: gr.Accordion.update(open=True, label="Open Accordion"),
|
||||
inputs=None,
|
||||
outputs=[accordion],
|
||||
)
|
||||
close_btn.click(
|
||||
lambda: gr.Accordion.update(open=False, label="Closed Accordion"),
|
||||
inputs=None,
|
||||
outputs=[accordion],
|
||||
)
|
||||
demo.launch()
|
||||
```
|
||||
|
||||
![update_accordion](https://user-images.githubusercontent.com/41651716/203164176-b102eae3-babe-4986-ae30-3ab4f400cedc.gif)
|
||||
|
||||
|
||||
## Bug Fixes:
|
||||
* Fixed bug that limited files from being sent over websockets to 16MB. The new limit
|
||||
is now 1GB by [@abidlabs](https://github.com/abidlabs) in [PR 2709](https://github.com/gradio-app/gradio/pull/2709)
|
||||
|
Loading…
Reference in New Issue
Block a user