gradio
gradio copied to clipboard
Markdown and HTML component changes size even when show_progress is disabled
Describe the bug
For many components, setting show_progress to False or "hidden" seems to work correctly. However, for the Markdown component, although the visual and textual progress parts are hidden, the component still expands and contracts as if it was still there. This makes updating a Markdown component dynamically a poor experience and it's useful for things like labels.
Using the below code, press the button over and over. You will see that although progress is hidden, the button underneath jumps up and down as the container above resizes. I'm guessing it's because the progress isn't being disabled correctly as with other components.
Have you searched existing issues? 🔎
- [X] I have searched and found no existing issues
Reproduction
import gradio as gr
with gr.Blocks() as model_test_harness:
def markdown_change(value):
return value
def button_click():
return "Clicked"
markdown = gr.Markdown(value="Start")
markdown.change(
markdown_change, inputs=markdown, outputs=markdown, show_progress="hidden"
)
button = gr.Button(value="Click me")
button.click(button_click, outputs=[markdown], show_progress="hidden")
model_test_harness.launch()
Screenshot
No response
Logs
No response
System Info
gradio==4.21.0
Severity
Blocking usage of gradio
The HTML component suffers from this as well, so can't be used as a workaround.