Skip to content

Fix Tab Interactive Bug#13048

Merged
freddyaboulton merged 8 commits intomainfrom
fix-tab-toggle-interactivity
Mar 26, 2026
Merged

Fix Tab Interactive Bug#13048
freddyaboulton merged 8 commits intomainfrom
fix-tab-toggle-interactivity

Conversation

@freddyaboulton
Copy link
Copy Markdown
Collaborator

Description

Closes: #13033

  • We don't mount non-active tabs at first for performance. This means that updating props on non-active tabs does not take effect because the component is not mounted. When update_state receives an update for a non-mounted tabitem, we now update the parent Tabs initial_tabs array so that the prop is reflected when the tab does get mounted. These are the changes to init.svelte.ts
  • In Tabs.svelte, I added sync_tabs method to sync changes from the parent initial_tabs to the child props.
  • Also added an e2e test. I don't think this would be a good candidate for unit tests atm.

AI Disclosure

We encourage the use of AI tooling in creating PRs, but the any non-trivial use of AI needs be disclosed. E.g. if you used Claude to write a first draft, you should mention that. Trivial tab-completion doesn't need to be disclosed. You should self-review all PRs, especially if they were generated with AI.

  • I used AI to... [fill here]
  • I did not use AI

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Testing and Formatting Your Code

  1. PRs will only be merged if tests pass on CI. We recommend at least running the backend tests locally, please set up your Gradio environment locally and run the backed tests: bash scripts/run_backend_tests.sh

  2. Please run these bash scripts to automatically format your code: bash scripts/format_backend.sh, and (if you made any changes to non-Python files) bash scripts/format_frontend.sh

@gradio-pr-bot
Copy link
Copy Markdown
Collaborator

gradio-pr-bot commented Mar 20, 2026

🪼 branch checks and previews

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

Install Gradio from this PR

pip install https://huggingface.co/buckets/gradio/pypi-previews/resolve/c575e3b895480c597af7f231dc8aa8f4cf7aeaee/gradio-6.10.0-py3-none-any.whl

Install Gradio Python Client from this PR

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

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/c575e3b895480c597af7f231dc8aa8f4cf7aeaee/gradio-client-2.1.0.tgz

@gradio-pr-bot
Copy link
Copy Markdown
Collaborator

gradio-pr-bot commented Mar 20, 2026

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/core patch
@gradio/tabs patch
gradio patch

  • Fix Tab Interactive Bug

✅ 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.

Copy link
Copy Markdown
Member

@pngwn pngwn left a comment

Choose a reason for hiding this comment

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

Thanks @freddyaboulton !

@freddyaboulton
Copy link
Copy Markdown
Collaborator Author

tysm @pngwn !

@freddyaboulton freddyaboulton merged commit a5d4096 into main Mar 26, 2026
23 of 25 checks passed
@freddyaboulton freddyaboulton deleted the fix-tab-toggle-interactivity branch March 26, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interactivity of Tab could not be updated to True

3 participants