Document that show_copy_button in gr.Textbox is not visible when show_label=False (#8012)

* Document that show_copy_button in gr.Textbox is not visible when show_label=False
Remove dict_to_dataclass since its not used

* add changeset

* tweak wording

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
Michael 2024-04-12 20:17:19 +02:00 committed by GitHub
parent 06bdf0eddf
commit 299c87c477
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"gradio": patch
---
feat:Document that show_copy_button in gr.Textbox is not visible when show_label=False

View File

@ -63,7 +63,7 @@ class Textbox(FormComponent):
label: The label for this component. Appears above the component and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component is assigned to.
info: additional component description.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
show_label: if True, will display label. If False, the copy button is hidden as well as well as the label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.

View File

@ -764,6 +764,7 @@ class TestProgressBar:
]
@pytest.mark.asyncio
@pytest.mark.flaky
async def test_progress_bar_track_tqdm_without_iterable(self):
def greet(s, _=gr.Progress(track_tqdm=True)):
with tqdm(total=len(s)) as progress_bar: