Skip to content

Conversation

@aliabid94
Copy link
Collaborator

Two annoying bugs fixed for gr.HTML:

  1. Templating errors sometimes didn't show the error message, because both HTML and CSS were being templated, and if only one failed, eg.g HTML failed but CSS passed and CSS was templated after HTML, we would assume that there was no error. Now we check to make sure both CSS and HTML templating work
  2. If a gr.HTML had an object-type property, the first update didn't work because the update check logic used to compare old_props with props had the issue that initially, old_props = props, so updating one updated the other. Now we make a deep copy of props and set that to old props so that they work.

You can see the last two items in the super_html demo to demonstrate these changes,

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 18, 2025

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-pypi-previews.s3.amazonaws.com/41222f964b2ae87b120588a2548b2f3fa23b58f0/gradio-6.1.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@41222f964b2ae87b120588a2548b2f3fa23b58f0#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/41222f964b2ae87b120588a2548b2f3fa23b58f0/gradio-client-2.0.0.tgz

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 18, 2025

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/html patch
gradio patch

  • Two bugs for gr.HTML

✅ Changeset approved by @freddyaboulton

  • Maintainers can remove approval by unchecking this checkbox.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@aliabid94 aliabid94 changed the title Two fixed for gr.HTML Two bugs for gr.HTML Dec 18, 2025
>:</strong
>
<code class="error-message">{error_message}</code>
<code class="error-message">{html_error_message || css_error_message}</code>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo better to show both errors if there are both html and css errors, otherwise a user might think that the fix for the html error caused the css error.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I think displaying all the error info is useful to users/developers

@abidlabs
Copy link
Member

Nice @aliabid94 changes look good but even after pulling the latest version of this PR and rebuilding the frontend, I see that the the first update doesn't work:

Screen.Recording.2025-12-18.at.12.46.58.PM.mov

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the correct behavior in the dev server. This LGTM @aliabid94 but would be good to check with @abidlabs !

html-build

@freddyaboulton freddyaboulton added v: patch A change that requires a patch release t: fix A change that implements a fix labels Dec 19, 2025
@freddyaboulton freddyaboulton merged commit 184c596 into main Dec 19, 2025
19 of 20 checks passed
@freddyaboulton freddyaboulton deleted the improve_html_docs branch December 19, 2025 17:28
@freddyaboulton
Copy link
Collaborator

Merging for the release! Thanks @aliabid94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t: fix A change that implements a fix v: patch A change that requires a patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants